hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r616505 - in /hadoop/core/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/HTable.java src/test/org/apache/hadoop/hbase/MultiRegionTable.java
Date Tue, 29 Jan 2008 20:06:23 GMT
Author: stack
Date: Tue Jan 29 12:06:19 2008
New Revision: 616505

URL: http://svn.apache.org/viewvc?rev=616505&view=rev
Log:
HADOOP-2631 2443 breaks HTable.getStartKeys when there is more than one table
or table you are enumerating isn't the first table

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

Modified: hadoop/core/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/CHANGES.txt?rev=616505&r1=616504&r2=616505&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ hadoop/core/trunk/src/contrib/hbase/CHANGES.txt Tue Jan 29 12:06:19 2008
@@ -155,6 +155,8 @@
    HADOOP-2718 Copy Constructor HBaseConfiguration(Configuration) will override
                hbase configurations if argumant is not an instance of
                HBaseConfiguration.
+   HADOOP-2631 2443 breaks HTable.getStartKeys when there is more than one
+               table or table you are enumerating isn't the first table
    
   IMPROVEMENTS
    HADOOP-2401 Add convenience put method that takes writable

Modified: hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java?rev=616505&r1=616504&r2=616505&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java (original)
+++ hadoop/core/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java Tue Jan
29 12:06:19 2008
@@ -197,7 +197,8 @@
 
     Text startRow = new Text(tableName.toString() + ",,999999999999999");
     HRegionLocation metaLocation = null;
-
+    HRegionInterface server;
+    
     // scan over the each meta region
     do {
       try{
@@ -206,13 +207,13 @@
           connection.locateRegion(META_TABLE_NAME, startRow);
 
         // connect to the server hosting the .META. region
-        HRegionInterface server = 
+        server = 
           connection.getHRegionConnection(metaLocation.getServerAddress());
 
         // open a scanner over the meta region
         scannerId = server.openScanner(
           metaLocation.getRegionInfo().getRegionName(),
-          COLUMN_FAMILY_ARRAY, EMPTY_START_ROW, LATEST_TIMESTAMP,
+          COLUMN_FAMILY_ARRAY, tableName, LATEST_TIMESTAMP,
           null);
         
         // iterate through the scanner, accumulating unique table names
@@ -233,19 +234,20 @@
               }
 
               if (info.isOffline()) {
-                LOG.debug("Region " + info + " was offline!");
-                break;
+                continue SCANNER_LOOP;
               }
 
               if (info.isSplit()) {
-                LOG.debug("Region " + info + " was split!");
-                break;
+                continue SCANNER_LOOP;
               }
 
               keyList.add(info.getStartKey());
             }
           }
         }
+        
+        // close that remote scanner
+        server.close(scannerId);
           
         // advance the startRow to the end key of the current region
         startRow = metaLocation.getRegionInfo().getEndKey();          

Modified: hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java?rev=616505&r1=616504&r2=616505&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
(original)
+++ hadoop/core/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
Tue Jan 29 12:06:19 2008
@@ -311,7 +311,7 @@
    * @param r
    * @throws IOException
    */
-  private static void compact(final MiniHBaseCluster cluster,
+  protected static void compact(final MiniHBaseCluster cluster,
       final HRegionInfo r)
   throws IOException {
     if (r == null) {



Mime
View raw message