You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2018/07/30 21:04:01 UTC
[2/4] hbase git commit: HBASE-20974 Backport HBASE-20583
(SplitLogWorker should handle FileNotFoundException when split a wal) to
branch-1 (Pankaj Kumar)
HBASE-20974 Backport HBASE-20583 (SplitLogWorker should handle FileNotFoundException when split a wal) to branch-1 (Pankaj Kumar)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0f1f12f4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0f1f12f4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0f1f12f4
Branch: refs/heads/branch-1.4
Commit: 0f1f12f44eb29a5a9339d64e7189b0bb14d78778
Parents: 3d4c771
Author: Andrew Purtell <ap...@apache.org>
Authored: Mon Jul 30 12:34:45 2018 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Mon Jul 30 13:36:36 2018 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/regionserver/SplitLogWorker.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/0f1f12f4/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 1115528..b86f254 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;
@@ -109,6 +110,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 " + filename + " does not exist anymore", e);
+ return Status.DONE;
+ }
Throwable cause = e.getCause();
if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException
|| cause instanceof ConnectException