hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1051379 - in /hbase/branches/0.90: ./ src/main/java/org/apache/hadoop/hbase/catalog/ src/main/java/org/apache/hadoop/hbase/regionserver/ src/main/java/org/apache/hadoop/hbase/regionserver/handler/
Date Tue, 21 Dec 2010 05:28:33 GMT
Author: stack
Date: Tue Dec 21 05:28:32 2010
New Revision: 1051379

URL: http://svn.apache.org/viewvc?rev=1051379&view=rev
Log:
HBASE-3343 Server not shutting down after losing log lease

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1051379&r1=1051378&r2=1051379&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Tue Dec 21 05:28:32 2010
@@ -763,6 +763,7 @@ Release 0.90.0 - Unreleased
    HBASE-3371  Race in TestReplication can make it fail
    HBASE-3323  OOME in master splitting logs
    HBASE-3374  Our jruby jar has *GPL jars in it; fix
+   HBASE-3343  Server not shutting down after losing log lease
 
 
   IMPROVEMENTS

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java?rev=1051379&r1=1051378&r2=1051379&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java
Tue Dec 21 05:28:32 2010
@@ -427,7 +427,8 @@ public class CatalogTracker {
       Throwable cause = e.getCause();
       if (cause != null && cause instanceof EOFException) {
         t = cause;
-      } else if (cause.getMessage().contains("Connection reset")) {
+      } else if (cause != null && cause.getMessage() != null
+          && cause.getMessage().contains("Connection reset")) {
         t = cause;
       } else {
         throw e;

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1051379&r1=1051378&r2=1051379&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Tue Dec 21 05:28:32 2010
@@ -640,7 +640,7 @@ public class HRegionServer implements HR
     // Interrupt catalog tracker here in case any regions being opened out in
     // handlers are stuck waiting on meta or root.
     if (this.catalogTracker != null) this.catalogTracker.stop();
-    waitOnAllRegionsToClose();
+    if (this.fsOk) waitOnAllRegionsToClose();
 
     // Make sure the proxy is down.
     if (this.hbaseMaster != null) {

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java?rev=1051379&r1=1051378&r2=1051379&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
Tue Dec 21 05:28:32 2010
@@ -98,7 +98,7 @@ public class OpenRegionHandler extends E
       if (updateMeta(region)) failed = false;
     }
 
-    if (failed) {
+    if (failed || this.server.isStopped() || this.rsServices.isStopping()) {
       cleanupFailedOpen(region);
       return;
     }
@@ -120,6 +120,9 @@ public class OpenRegionHandler extends E
    * Caller must cleanup region if this fails.
    */
   private boolean updateMeta(final HRegion r) {
+    if (this.server.isStopped() || this.rsServices.isStopping()) {
+      return false;
+    }
     // Object we do wait/notify on.  Make it boolean.  If set, we're done.
     // Else, wait.
     final AtomicBoolean signaller = new AtomicBoolean(false);



Mime
View raw message