HBASE-8577 TestZooKeeper#testLogSplittingAfterMasterRecoveryDueToZKExpiry failed intermittently
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1484352 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
998296008a
commit
94a3efe1e9
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.hbase.regionserver.wal;
|
package org.apache.hadoop.hbase.regionserver.wal;
|
||||||
|
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InterruptedIOException;
|
import java.io.InterruptedIOException;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
@ -836,6 +837,11 @@ public class HLogSplitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} 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("File " + path + " doesn't exist anymore.", e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!skipErrors || e instanceof InterruptedIOException) {
|
if (!skipErrors || e instanceof InterruptedIOException) {
|
||||||
throw e; // Don't mark the file corrupted if interrupted, or not skipErrors
|
throw e; // Don't mark the file corrupted if interrupted, or not skipErrors
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,8 @@ public class FSHDFSUtils extends FSUtils {
|
||||||
if (e instanceof LeaseExpiredException && e.getMessage().contains("File does not exist")) {
|
if (e instanceof LeaseExpiredException && e.getMessage().contains("File does not exist")) {
|
||||||
// This exception comes out instead of FNFE, fix it
|
// This exception comes out instead of FNFE, fix it
|
||||||
throw new FileNotFoundException("The given HLog wasn't found at " + p);
|
throw new FileNotFoundException("The given HLog wasn't found at " + p);
|
||||||
|
} else if (e instanceof FileNotFoundException) {
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
LOG.warn("Got IOException on attempt " + nbAttempt + " to recover lease for file " + p +
|
LOG.warn("Got IOException on attempt " + nbAttempt + " to recover lease for file " + p +
|
||||||
", retrying.", e);
|
", retrying.", e);
|
||||||
|
|
Loading…
Reference in New Issue