hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1049249 - in /hbase/trunk: ./ src/main/java/org/apache/hadoop/hbase/master/ src/main/java/org/apache/hadoop/hbase/replication/ src/main/java/org/apache/hadoop/hbase/replication/regionserver/
Date Tue, 14 Dec 2010 20:26:30 GMT
Author: jdcryans
Date: Tue Dec 14 20:26:30 2010
New Revision: 1049249

URL: http://svn.apache.org/viewvc?rev=1049249&view=rev
Log:
   HBASE-3355  Stopping a stopped cluster leaks an HMaster
   HBASE-3356  Add more checks in replication if RS is stopped

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1049249&r1=1049248&r2=1049249&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Dec 14 20:26:30 2010
@@ -775,6 +775,8 @@ Release 0.90.0 - Unreleased
    HBASE-3351  ReplicationZookeeper goes to ZK every time a znode is modified
    HBASE-3326  Replication state's znode should be created else it 
                defaults to false
+   HBASE-3355  Stopping a stopped cluster leaks an HMaster
+   HBASE-3356  Add more checks in replication if RS is stopped
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java?rev=1049249&r1=1049248&r2=1049249&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java Tue Dec
14 20:26:30 2010
@@ -157,6 +157,9 @@ public class HMasterCommandLine extends 
   private int stopMaster() {
     HBaseAdmin adm = null;
     try {
+      Configuration conf = getConf();
+      // Don't try more than once
+      conf.setInt("hbase.client.retries.number", 1);
       adm = new HBaseAdmin(getConf());
     } catch (MasterNotRunningException e) {
       LOG.error("Master not running");

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java?rev=1049249&r1=1049248&r2=1049249&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Tue Dec 14 20:26:30 2010
@@ -612,6 +612,10 @@ public class ReplicationZookeeper {
       ZKUtil.deleteNodeRecursively(this.zookeeper,
           this.rsServerNameZnode);
     } catch (KeeperException e) {
+      // if the znode is already expired, don't bother going further
+      if (e instanceof KeeperException.SessionExpiredException) {
+        return;
+      }
       this.abortable.abort("Failed delete of " + this.rsServerNameZnode, e);
     }
   }

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java?rev=1049249&r1=1049248&r2=1049249&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
Tue Dec 14 20:26:30 2010
@@ -150,7 +150,7 @@ public class ReplicationSourceManager {
     for (String id : this.zkHelper.getPeerClusters().keySet()) {
       addSource(id);
     }
-    List<String> currentReplicators = this.zkHelper.getRegisteredRegionServers();
+    List<String> currentReplicators = this.zkHelper.getListOfReplicators();
     if (currentReplicators == null || currentReplicators.size() == 0) {
       return;
     }
@@ -406,6 +406,9 @@ public class ReplicationSourceManager {
      * @param path full path of the deleted node
      */
     public void nodeDeleted(String path) {
+      if (stopper.isStopped()) {
+        return;
+      }
       boolean cont = refreshRegionServersList(path);
       if (!cont) {
         return;
@@ -419,6 +422,9 @@ public class ReplicationSourceManager {
      * @param path full path of the node whose children have changed
      */
     public void nodeChildrenChanged(String path) {
+      if (stopper.isStopped()) {
+        return;
+      }
       refreshRegionServersList(path);
     }
 



Mime
View raw message