hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1139470 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java
Date Sat, 25 Jun 2011 00:06:41 GMT
Author: tedyu
Date: Sat Jun 25 00:06:41 2011
New Revision: 1139470

URL: http://svn.apache.org/viewvc?rev=1139470&view=rev
Log:
HBASE-451   Remove HTableDescriptor from HRegionInfo
            addendum that fixes TestTableMapReduce

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1139470&r1=1139469&r2=1139470&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Sat Jun 25 00:06:41 2011
@@ -11,6 +11,8 @@ Release 0.91.0 - Unreleased
    HBASE-3629  Update our thrift to 0.6 (Moaz Reyad)
    HBASE-1502  Remove need for heartbeats in HBase
    HBASE-451   Remove HTableDescriptor from HRegionInfo (Subbu M Iyer)
+   HBASE-451   Remove HTableDescriptor from HRegionInfo
+               addendum that fixes TestTableMapReduce
 
   BUG FIXES
    HBASE-3280  YouAreDeadException being swallowed in HRS getMaster

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java?rev=1139470&r1=1139469&r2=1139470&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/MultiRegionTable.java Sat Jun 25 00:06:41
2011
@@ -21,8 +21,11 @@ package org.apache.hadoop.hbase;
 
 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 @@ public class MultiRegionTable extends HB
   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;
@@ -115,4 +124,4 @@ public class MultiRegionTable extends HB
     region.close();
     region.getLog().closeAndDelete();
   }
-}
\ No newline at end of file
+}



Mime
View raw message