From d06673cf3e7c05d5a49929cb0ec4f10185563345 Mon Sep 17 00:00:00 2001 From: Guanghao Zhang Date: Wed, 16 May 2018 07:52:32 +0800 Subject: [PATCH] HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal --- .../apache/hadoop/hbase/regionserver/SplitLogWorker.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 0046b67350a..a1c20306b38 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