You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by md...@apache.org on 2018/05/23 18:26:10 UTC
[10/14] hbase git commit: HBASE-20583 SplitLogWorker should handle
FileNotFoundException when split a wal
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/0836b071
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0836b071
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0836b071
Branch: refs/heads/HBASE-20478
Commit: 0836b0719a77a5a4c705d8ecfb135ae49ed1b934
Parents: f917f4e
Author: Guanghao Zhang <zg...@apache.org>
Authored: Wed May 16 07:52:32 2018 +0800
Committer: Guanghao Zhang <zg...@apache.org>
Committed: Fri May 18 14:29:41 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/0836b071/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