You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/01/13 06:58:53 UTC

svn commit: r734047 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HConnectionManager.java

Author: stack
Date: Mon Jan 12 21:58:51 2009
New Revision: 734047

URL: http://svn.apache.org/viewvc?rev=734047&view=rev
Log:
HBASE-1121 Cluster confused about where -ROOT- is; commit better logging

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=734047&r1=734046&r2=734047&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Jan 12 21:58:51 2009
@@ -139,6 +139,7 @@
    HBASE-1114  Weird NPEs compacting
    HBASE-1116  generated web.xml and svn don't play nice together
    HBASE-1119  ArrayOutOfBoundsException in HStore.compact
+   HBASE-1121  Cluster confused about where -ROOT- is
 
   IMPROVEMENTS
    HBASE-901   Add a limit to key length, check key and value length on client side

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=734047&r1=734046&r2=734047&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java Mon Jan 12 21:58:51 2009
@@ -211,13 +211,13 @@
             }
             
           } catch (IOException e) {
-            if(tries == numRetries - 1) {
+            if (tries == numRetries - 1) {
               // This was our last chance - don't bother sleeping
               break;
             }
-            LOG.info("Attempt " + tries + " of " + this.numRetries +
-              " failed with <" + e + ">. Retrying after sleep of " +
-              getPauseTime(tries));
+            LOG.info("getMaster attempt " + tries + " of " + this.numRetries +
+              " failed; retrying after sleep of " +
+              getPauseTime(tries), e);
           }
 
           // Cannot connect to master or it is not running. Sleep & retry
@@ -550,9 +550,9 @@
           }
           if (tries < numRetries - 1) {
             if (LOG.isDebugEnabled()) {
-              LOG.debug("Attempt " + tries + " of " + this.numRetries +
-                " failed with <" + e + ">. Retrying after sleep of " +
-                getPauseTime(tries));
+              LOG.debug("locateRegionInMeta attempt " + tries + " of " +
+                this.numRetries + " failed; retrying after sleep of " +
+                getPauseTime(tries), e);
             }
             relocateRegion(parentTable, metaKey);
           } else {
@@ -747,7 +747,6 @@
       HServerAddress rootRegionAddress = null;
       for (int tries = 0; tries < numRetries; tries++) {
         int localTimeouts = 0;
-        
         // ask the master which server has the root region
         while (rootRegionAddress == null && localTimeouts < numRetries) {
           rootRegionAddress = master.findRootRegion();
@@ -772,13 +771,13 @@
 
         // get a connection to the region server
         HRegionInterface server = getHRegionConnection(rootRegionAddress);
-
         try {
           // if this works, then we're good, and we have an acceptable address,
           // so we can stop doing retries and return the result.
           server.getRegionInfo(HRegionInfo.ROOT_REGIONINFO.getRegionName());
           if (LOG.isDebugEnabled()) {
-            LOG.debug("Found ROOT " + HRegionInfo.ROOT_REGIONINFO);
+            LOG.debug("Found ROOT at " + rootRegionAddress +
+              " (server=" + server + ")");
           }
           break;
         } catch (IOException e) {
@@ -875,7 +874,8 @@
 
     private HRegionLocation
     getRegionLocationForRowWithRetries(byte[] tableName, byte[] rowKey, 
-        boolean reload) throws IOException {
+      boolean reload)
+    throws IOException {
       getMaster();
       List<Throwable> exceptions = new ArrayList<Throwable>();
       HRegionLocation location = null;