hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zg...@apache.org
Subject hbase git commit: HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal
Date Fri, 18 May 2018 06:32:14 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 36db2cb28 -> a342d0278


HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a342d027
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a342d027
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a342d027

Branch: refs/heads/branch-2.0
Commit: a342d0278b0009d543b924f0e38e55c5899628bd
Parents: 36db2cb
Author: Guanghao Zhang <zghao@apache.org>
Authored: Wed May 16 07:52:32 2018 +0800
Committer: Guanghao Zhang <zghao@apache.org>
Committed: Fri May 18 14:31:31 2018 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/SplitLogWorker.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a342d027/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
index 0046b67..a1c2030 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hadoop.hbase.regionserver;
 
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.net.ConnectException;
@@ -105,6 +106,11 @@ public class SplitLogWorker implements Runnable {
           LOG.warn("log splitting of " + filename + " interrupted, resigning", iioe);
           return Status.RESIGNED;
         } catch (IOException e) {
+          if (e instanceof FileNotFoundException) {
+            // A wal file may not exist anymore. Nothing can be recovered so move on
+            LOG.warn("WAL {} does not exist anymore", filename, e);
+            return Status.DONE;
+          }
           Throwable cause = e.getCause();
           if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException
                   || cause instanceof ConnectException


Mime
View raw message