hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1203018 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Thu, 17 Nov 2011 02:17:12 GMT
Author: nspiegelberg
Date: Thu Nov 17 02:17:11 2011
New Revision: 1203018

URL: http://svn.apache.org/viewvc?rev=1203018&view=rev
Log:
Fix stuck thread during DLS.

Summary:
During DLS the splitLog thread would get stuck since a cluster
shutdown would be requested and all regionservers would shut down, but
the split log thread would still keep trying forever to split logs and
hence the master would never shut down.

Test Plan:
1) Ran it on dev cluster and verified master shuts down
cleanly.

Reviewers: pkhemani

Reviewed By: pkhemani

CC: hbase-eng@lists, pkhemani, kannan

Differential Revision: 362261

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

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1203018&r1=1203017&r2=1203018&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Thu Nov
17 02:17:11 2011
@@ -954,6 +954,10 @@ public class HMaster extends Thread impl
     List<String> serverNames = new ArrayList<String>();
     try {
       do {
+        if (this.clusterShutdownRequested.get()) {
+          LOG.warn("Cluster is shutting down, aborting log splitting");
+          return;
+        }
         try {
           Path logsDirPath =
               new Path(this.rootdir, HConstants.HREGION_LOGDIR_NAME);



Mime
View raw message