hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181398 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Tue, 11 Oct 2011 02:05:13 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:05:12 2011
New Revision: 1181398

URL: http://svn.apache.org/viewvc?rev=1181398&view=rev
Log:
HMaster can not shut itself down

Summary:
HMaster main thread stuck at waiting for other threads to exit.

Test Plan:
manual test

DiffCamp Revision: 159146
Reviewed By: kannan
CC: hkuang, kannan, hbase@lists
Tasks:
#392765: HMaster can not gracefully shutdown itself

Revert Plan:
OK

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1181398&r1=1181397&r2=1181398&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Tue Oct
11 02:05:12 2011
@@ -547,6 +547,11 @@ public class HMaster extends Thread impl
       this.closed.set(true);
     }
 
+    if (!this.shutdownRequested.get()) {  // shutdown not by request
+      shutdown();  // indicated that master is shutting down
+      startShutdown();  // get started with shutdown: stop scanners etc.
+    }
+
     // Wait for all the remaining region servers to report in.
     this.serverManager.letRegionServersShutdown();
 



Mime
View raw message