Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java?rev=1135385&r1=1135384&r2=1135385&view=diff ============================================================================== --- hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (original) +++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java Tue Jun 14 05:40:32 2011 @@ -131,7 +131,7 @@ public class TestHBaseFsck { htd, byte[] startKey, byte[] endKey) throws IOException { HTable meta = new HTable(conf, HConstants.META_TABLE_NAME); - HRegionInfo hri = new HRegionInfo(htd, startKey, endKey); + HRegionInfo hri = new HRegionInfo(htd.getName(), startKey, endKey); Put put = new Put(hri.getRegionName()); put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER, Writables.getBytes(hri));
Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java?rev=1135385&r1=1135384&r2=1135385&view=diff ============================================================================== --- hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java (original) +++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java Tue Jun 14 05:40:32 2011 @@ -136,8 +136,8 @@ public class TestMergeTable { private HRegion createRegion(final HTableDescriptor desc, byte [] startKey, byte [] endKey, int firstRow, int nrows, Path rootdir) throws IOException { - HRegionInfo hri = new HRegionInfo(desc, startKey, endKey); - HRegion region = HRegion.createHRegion(hri, rootdir, UTIL.getConfiguration()); + HRegionInfo hri = new HRegionInfo(desc.getName(), startKey, endKey); + HRegion region = HRegion.createHRegion(hri, rootdir, UTIL.getConfiguration(), desc); LOG.info("Created region " + region.getRegionNameAsString()); for(int i = firstRow; i < firstRow + nrows; i++) { Put put = new Put(Bytes.toBytes("row_" + String.format("%1$05d", i))); @@ -156,10 +156,11 @@ public class TestMergeTable { protected void setupROOTAndMeta(Path rootdir, final HRegion [] regions) throws IOException { HRegion root = - HRegion.createHRegion(HRegionInfo.ROOT_REGIONINFO, rootdir, UTIL.getConfiguration()); + HRegion.createHRegion(HRegionInfo.ROOT_REGIONINFO, rootdir, + UTIL.getConfiguration(), HTableDescriptor.ROOT_TABLEDESC); HRegion meta = HRegion.createHRegion(HRegionInfo.FIRST_META_REGIONINFO, rootdir, - UTIL.getConfiguration()); + UTIL.getConfiguration(), HTableDescriptor.META_TABLEDESC); HRegion.addRegionToMETA(root, meta); for (HRegion r: regions) { HRegion.addRegionToMETA(meta, r); Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java?rev=1135385&r1=1135384&r2=1135385&view=diff ============================================================================== --- hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java (original) +++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java Tue Jun 14 05:40:32 2011 @@ -71,31 +71,36 @@ public class TestMergeTool extends HBase * Create the HRegionInfos for the regions. */ // Region 0 will contain the key range [row_0200,row_0300) - sourceRegions[0] = new HRegionInfo(this.desc, Bytes.toBytes("row_0200"), + sourceRegions[0] = new HRegionInfo(this.desc.getName(), + Bytes.toBytes("row_0200"), Bytes.toBytes("row_0300")); // Region 1 will contain the key range [row_0250,row_0400) and overlaps // with Region 0 sourceRegions[1] = - new HRegionInfo(this.desc, Bytes.toBytes("row_0250"), + new HRegionInfo(this.desc.getName(), + Bytes.toBytes("row_0250"), Bytes.toBytes("row_0400")); // Region 2 will contain the key range [row_0100,row_0200) and is adjacent // to Region 0 or the region resulting from the merge of Regions 0 and 1 sourceRegions[2] = - new HRegionInfo(this.desc, Bytes.toBytes("row_0100"), + new HRegionInfo(this.desc.getName(), + Bytes.toBytes("row_0100"), Bytes.toBytes("row_0200")); // Region 3 will contain the key range [row_0500,row_0600) and is not // adjacent to any of Regions 0, 1, 2 or the merged result of any or all // of those regions sourceRegions[3] = - new HRegionInfo(this.desc, Bytes.toBytes("row_0500"), + new HRegionInfo(this.desc.getName(), + Bytes.toBytes("row_0500"), Bytes.toBytes("row_0600")); // Region 4 will have empty start and end keys and overlaps all regions. sourceRegions[4] = - new HRegionInfo(this.desc, HConstants.EMPTY_BYTE_ARRAY, + new HRegionInfo(this.desc.getName(), + HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY); /* @@ -134,7 +139,8 @@ public class TestMergeTool extends HBase */ for (int i = 0; i < sourceRegions.length; i++) { regions[i] = - HRegion.createHRegion(this.sourceRegions[i], this.testDir, this.conf); + HRegion.createHRegion(this.sourceRegions[i], this.testDir, this.conf, + this.desc); /* * Insert data */
