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 2011/02/17 18:48:51 UTC

svn commit: r1071726 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Author: stack
Date: Thu Feb 17 17:48:51 2011
New Revision: 1071726

URL: http://svn.apache.org/viewvc?rev=1071726&view=rev
Log:
HBASE-3545 Possible liveness issue with MasterServerAddress in HRegionServer getMaster

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1071726&r1=1071725&r2=1071726&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Feb 17 17:48:51 2011
@@ -1,4 +1,10 @@
 HBase Change Log
+Release 0.90.2 - February 9th, 2011
+  BUG FIXES
+   HBASE-3545  Possible liveness issue with MasterServerAddress in
+               HRegionServer getMaster (Greg Bowyer via Stack)
+    
+
 Release 0.90.1 - February 9th, 2011
 
   NEW FEATURES

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1071726&r1=1071725&r2=1071726&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Thu Feb 17 17:48:51 2011
@@ -1430,15 +1430,12 @@ public class HRegionServer implements HR
    */
   private HServerAddress getMaster() {
     HServerAddress masterAddress = null;
-    while ((masterAddress = masterAddressManager.getMasterAddress()) == null) {
-      if (stopped) {
-        return null;
-      }
-      LOG.debug("No master found, will retry");
-      sleeper.sleep();
-    }
     HMasterRegionInterface master = null;
+
     while (!stopped && master == null) {
+
+      masterAddress = getMasterAddress();
+      LOG.info("Attempting connect to Master server at " + masterAddress);
       try {
         // Do initial RPC setup. The final argument indicates that the RPC
         // should retry indefinitely.
@@ -1462,6 +1459,18 @@ public class HRegionServer implements HR
     return masterAddress;
   }
 
+  private HServerAddress getMasterAddress() {
+    HServerAddress masterAddress = null;
+      while ((masterAddress = masterAddressManager.getMasterAddress()) == null) {
+        if (stopped) {
+          return null;
+        }
+        LOG.debug("No master found, will retry");
+        sleeper.sleep();
+      }
+      return masterAddress;
+   }
+
   /**
    * @return True if successfully invoked {@link #reportForDuty()}
    * @throws IOException