hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r591039 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/test/org/apache/hadoop/hbase/MultiRegionTable.java
Date Thu, 01 Nov 2007 15:01:44 GMT
Author: stack
Date: Thu Nov  1 08:01:43 2007
New Revision: 591039

URL: http://svn.apache.org/viewvc?rev=591039&view=rev
Log:
HADOOP-2083 TestTableIndex failed in patch build #970 and #956

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

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=591039&r1=591038&r2=591039&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Thu Nov  1 08:01:43 2007
@@ -17,6 +17,7 @@
    HADOOP-2056 A table with row keys containing colon fails to split regions
    HADOOP-2079 HADOOP-2056 Fix generated HLog, HRegion names
    HADOOP-2124 Use of `hostname` does not work on Cygwin in some cases
+   HADOOP-2083 TestTableIndex failed in #970 and #956
 
   IMPROVEMENTS
     HADOOP-2401 Add convenience put method that takes writable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java?rev=591039&r1=591038&r2=591039&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
Thu Nov  1 08:01:43 2007
@@ -75,19 +75,27 @@
     HTable meta = new HTable(conf, HConstants.META_TABLE_NAME);
     int count = count(meta, tableName);
     HTable t = new HTable(conf, new Text(tableName));
+    // We created the table.  Get the parent region here now.  One will
+    // have been created though nought in it.
+    HRegionInfo parent =
+      t.getRegionLocation(HConstants.EMPTY_START_ROW).getRegionInfo();
+    LOG.info("Parent region " + parent.toString());
+    // Now add content.
     addContent(new HTableIncommon(t), columnName);
     LOG.info("Finished content loading");
     
     // All is running in the one JVM so I should be able to get the single
-    // region instance and bring on a split.
-    // Presumption is that there is only one regionserver.
+    // region instance and bring on a split. Presumption is that there is only
+    // one regionserver.   Of not, the split may already have happened by the
+    // time we got here.  If so, then the region found when we go searching
+    // with EMPTY_START_ROW will be one of the unsplittable daughters.
     HRegionInfo hri = null;
     HRegion r = null;
     for (int i = 0; i < 30; i++) {
       hri = t.getRegionLocation(HConstants.EMPTY_START_ROW).getRegionInfo();
       LOG.info("Region location: " + hri);
       r = cluster.getRegionThreads().get(0).getRegionServer().
-          onlineRegions.get(hri.getRegionName());
+        onlineRegions.get(hri.getRegionName());
       if (r != null) {
         break;
       }
@@ -121,9 +129,8 @@
     // Get info on the parent from the meta table.  Pass in 'hri'. Its the
     // region we have been dealing with up to this. Its the parent of the
     // region split.
-    Map<Text, byte []> data = getSplitParentInfo(meta, hri);
-    HRegionInfo parent =
-      Writables.getHRegionInfoOrNull(data.get(HConstants.COL_REGIONINFO));
+    Map<Text, byte []> data = getSplitParentInfo(meta, parent);
+    parent  = Writables.getHRegionInfoOrNull(data.get(HConstants.COL_REGIONINFO));
     LOG.info("Found parent region: " + parent);
     assertTrue(parent.isOffline());
     assertTrue(parent.isSplit());



Mime
View raw message