HBASE-20974 Backport HBASE-20583 (SplitLogWorker should handle FileNotFoundException when split a wal) to branch-1 (Pankaj Kumar)

This commit is contained in:
Andrew Purtell 2018-07-30 12:34:45 -07:00
parent 2d70120eb3
commit 9b5a839b99
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@
*/ */
package org.apache.hadoop.hbase.regionserver; package org.apache.hadoop.hbase.regionserver;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException; import java.io.InterruptedIOException;
import java.net.ConnectException; import java.net.ConnectException;
@ -109,6 +110,11 @@ public class SplitLogWorker implements Runnable {
LOG.warn("log splitting of " + filename + " interrupted, resigning", iioe); LOG.warn("log splitting of " + filename + " interrupted, resigning", iioe);
return Status.RESIGNED; return Status.RESIGNED;
} catch (IOException e) { } 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(); Throwable cause = e.getCause();
if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException if (e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException
|| cause instanceof ConnectException || cause instanceof ConnectException