Index: src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java (revision 1139453) +++ src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java (working copy) @@ -21,8 +21,11 @@ import java.io.IOException; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.FSUtils; /** * Utility class to build a table of multiple regions. @@ -82,6 +85,12 @@ protected void preHBaseClusterSetup() throws Exception { try { // Create a bunch of regions + FileSystem filesystem = FileSystem.get(conf); + Path rootdir = filesystem.makeQualified( + new Path(conf.get(HConstants.HBASE_DIR))); + filesystem.mkdirs(rootdir); + FSUtils.createTableDescriptor(fs, rootdir, desc); + HRegion[] regions = new HRegion[KEYS.length]; for (int i = 0; i < regions.length; i++) { int j = (i + 1) % regions.length;