Index: hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (revision 1574385) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (working copy) @@ -531,13 +531,13 @@ List regions = MetaScanner.listAllRegions(getConf(), false); final RegionBoundariesInformation currentRegionBoundariesInformation = new RegionBoundariesInformation(); + Path hbaseRoot = FSUtils.getRootDir(getConf()); for (HRegionInfo regionInfo : regions) { + Path tableDir = FSUtils.getTableDir(hbaseRoot, regionInfo.getTable()); currentRegionBoundariesInformation.regionName = regionInfo.getRegionName(); // For each region, get the start and stop key from the META and compare them to the // same information from the Stores. - Path path = new Path(getConf().get(HConstants.HBASE_DIR) + "/" - + Bytes.toString(regionInfo.getTable().getName()) + "/" - + regionInfo.getEncodedName() + "/"); + Path path = new Path(tableDir, regionInfo.getEncodedName()); FileSystem fs = path.getFileSystem(getConf()); FileStatus[] files = fs.listStatus(path); // For all the column families in this region... Index: hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (revision 1574385) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (working copy) @@ -2249,6 +2249,19 @@ } } + @Test + public void testRegionBoundariesCheck() throws Exception { + HBaseFsck hbck = doFsck(conf, false); + assertNoErrors(hbck); // no errors + try { + hbck.checkRegionBoundaries(); + } catch (IllegalArgumentException e) { + if (e.getMessage().endsWith("not a valid DFS filename.")) { + fail("Table directory path is not valid." + e.getMessage()); + } + } + } + @org.junit.Rule public TestName name = new TestName(); }