hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1586006 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase: regionserver/handler/CloseRegionHandler.java regionserver/wal/FSHLog.java util/Merge.java
Date Wed, 09 Apr 2014 16:11:06 GMT
Author: nkeywal
Date: Wed Apr  9 16:11:06 2014
New Revision: 1586006

URL: http://svn.apache.org/r1586006
Log:
HBASE-10813 Possible over-catch of exceptions (Ding Yuan)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java?rev=1586006&r1=1586005&r2=1586006&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
Wed Apr  9 16:11:06 2014
@@ -152,13 +152,17 @@ public class CloseRegionHandler extends 
             regionInfo.getRegionNameAsString());
           return;
         }
-      } catch (Throwable t) {
-        // A throwable here indicates that we couldn't successfully flush the
+      } catch (KeeperException ke) {
+          server.abort("Unrecoverable exception while checking state with zk " +
+            regionInfo.getRegionNameAsString() + ", still finishing close", ke);
+        throw new RuntimeException(ke);
+      } catch (IOException ioe) {
+        // An IOException here indicates that we couldn't successfully flush the
         // memstore before closing. So, we need to abort the server and allow
         // the master to split our logs in order to recover the data.
         server.abort("Unrecoverable exception while closing region " +
-          regionInfo.getRegionNameAsString() + ", still finishing close", t);
-        throw new RuntimeException(t);
+          regionInfo.getRegionNameAsString() + ", still finishing close", ioe);
+        throw new RuntimeException(ioe);
       }
 
       this.rsServices.removeFromOnlineRegions(region, destination);

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java?rev=1586006&r1=1586005&r2=1586006&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
Wed Apr  9 16:11:06 2014
@@ -1979,7 +1979,7 @@ class FSHLog implements HLog, Syncable {
           Path logPath = new Path(args[i]);
           FSUtils.setFsDefault(conf, logPath);
           split(conf, logPath);
-        } catch (Throwable t) {
+        } catch (IOException t) {
           t.printStackTrace(System.err);
           System.exit(-1);
         }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java?rev=1586006&r1=1586005&r2=1586006&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java Wed Apr
 9 16:11:06 2014
@@ -111,7 +111,7 @@ public class Merge extends Configured im
     try {
       mergeTwoRegions();
       return 0;
-    } catch (Exception e) {
+    } catch (IOException e) {
       LOG.fatal("Merge failed", e);
       return -1;
 



Mime
View raw message