HBASE-20583 SplitLogWorker should handle FileNotFoundException when split a wal

This commit is contained in:
Guanghao Zhang 2018-05-16 07:52:32 +08:00
parent f917f4e7c8
commit 0836b0719a
1 changed files with 6 additions and 0 deletions

View File

@ -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