hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1511061 - in /hbase/branches/0.89-fb: bin/rolling_restart_v2 src/main/java/org/apache/hadoop/hbase/util/RollingRestart.java
Date Tue, 06 Aug 2013 18:18:22 GMT
Author: liyin
Date: Tue Aug  6 18:18:22 2013
New Revision: 1511061

URL: http://svn.apache.org/r1511061
Log:
[HBASE-8500] Adding success message to Rolling Restart script and bailing out in case region
movement fails

Author: rshroff

Summary:
It will better to dump out a success message when the rolling restart
for a node succeeds.

Also, it fixes the case when the move of a region fails.

Test Plan:
tested it on TSH025, killed a region server while it was
moving
and also checked the log message on a successful rolling restart

Reviewers: aaiyer, kknapp

Reviewed By: kknapp

CC: hbase-eng@

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

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

Modified: hbase/branches/0.89-fb/bin/rolling_restart_v2
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/bin/rolling_restart_v2?rev=1511061&r1=1511060&r2=1511061&view=diff
==============================================================================
--- hbase/branches/0.89-fb/bin/rolling_restart_v2 (original)
+++ hbase/branches/0.89-fb/bin/rolling_restart_v2 Tue Aug  6 18:18:22 2013
@@ -152,6 +152,7 @@ if (hosts != null) {
       HServerInfo host = 
         admin.getConnection().getHRegionConnection(serverAddr).getHServerInfo();
       restartRegionServer(admin, host, conf, rollingRestartArgs, logsFolder, verifyRSRestart);
+      println "\nRolling Restart for "+ serverAddr + " succeeded.";
     } catch (Exception e) {
       e.printStackTrace();
       println "\nERROR: "+ server + " Failed.";
@@ -163,6 +164,7 @@ if (hosts != null) {
   for (host in admin.getClusterStatus().getServerInfo()) { 
     try {
       restartRegionServer(admin, host, conf, rollingRestartArgs, logsFolder, verifyRSRestart);
+      println "\nRolling Restart for "+ host + " succeeded.";
     } catch (Exception e) {
       e.printStackTrace();
       println "\nERROR: "+ host + " Failed.";

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=1511061&r1=1511060&r2=1511061&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 Aug  6 18:18:22 2013
@@ -288,7 +288,9 @@ public class RollingRestart {
           region.getRegionNameAsString().contains(",,")) {
         continue;
       }
-      moveRegion(region);
+      if (!moveRegion(region)) {
+        throw new IOException("Failed to move region " + region.getRegionNameAsString() +
". Aborting");
+      }
       Thread.sleep(this.regionDrainInterval);
     }
   }
@@ -302,7 +304,9 @@ public class RollingRestart {
           region.getRegionNameAsString().contains(",,")) {
         continue;
       }
-      moveRegion(region);
+      if (!moveRegion(region)) {
+        throw new IOException("Failed to move region " + region.getRegionNameAsString() +
". Aborting");
+      }
       Thread.sleep(this.regionUndrainInterval);
     }
   }



Mime
View raw message