hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1496584 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java
Date Tue, 25 Jun 2013 18:51:46 GMT
Author: liyin
Date: Tue Jun 25 18:51:46 2013
New Revision: 1496584

URL: http://svn.apache.org/r1496584
Log:
[HBASE-8500] Fixes Minor bug in RollingRestart

Author: rshroff

Summary:
In case of drain and stop only scenario, the Utility was not stopping
the RegionChecker and hence the java process would never exit.

The fix stops the regionchecker in all the scenarios.

Test Plan: tests on dev cluster

Reviewers: manukranthk

Reviewed By: manukranthk

Differential Revision: https://phabricator.fb.com/D855139

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java?rev=1496584&r1=1496583&r2=1496584&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java
Tue Jun 25 18:51:46 2013
@@ -330,7 +330,7 @@ public class RollingRestart {
     LOG.info("Setup Complete");
   }
 
-  public void clear() {
+  public void clear(boolean drainAndRestartOnly) {
 
     for (RegionChecker r : this.regionCheckers) {
       r.stop();
@@ -338,6 +338,11 @@ public class RollingRestart {
     }
     this.regionCheckers.clear();
 
+    if (drainAndRestartOnly) {
+      LOG.warn("Not removing the regionserver from the blacklist.");
+      return;
+    }
+
     try {
       admin.getMaster().clearBlacklistedServer(
           getHRegionConnection(serverAddr).getHServerInfo().getHostnamePort());
@@ -535,7 +540,7 @@ public class RollingRestart {
     Logger.getLogger("org.apache.hadoop.hbase").setLevel(Level.INFO);
 
     if (cmd.hasOption("c")) {
-      rr.clear();
+      rr.clear(false);
       return;
     }
 
@@ -572,9 +577,7 @@ public class RollingRestart {
          default:
        }
     } finally {
-      if (!drainAndStopOnly) {
-        rr.clear();
-      }
+      rr.clear(drainAndStopOnly);
     }
   }
 }



Mime
View raw message