HBASE-10400 [hbck] Continue if region dir missing on region merge attempt
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1560577 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1fb3e0bb93
commit
5cd2a757f3
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
package org.apache.hadoop.hbase.util;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
@ -2011,7 +2012,20 @@ public class HBaseFsck extends Configured {
|
|||
|
||||
// rename the contained into the container.
|
||||
FileSystem fs = targetRegionDir.getFileSystem(getConf());
|
||||
FileStatus[] dirs = fs.listStatus(contained.getHdfsRegionDir());
|
||||
FileStatus[] dirs = null;
|
||||
try {
|
||||
dirs = fs.listStatus(contained.getHdfsRegionDir());
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
// region we are attempting to merge in is not present! Since this is a merge, there is
|
||||
// no harm skipping this region if it does not exist.
|
||||
if (!fs.exists(contained.getHdfsRegionDir())) {
|
||||
LOG.warn("HDFS region dir " + contained.getHdfsRegionDir() + " is missing. " +
|
||||
"Assuming already sidelined or moved.");
|
||||
} else {
|
||||
sidelineRegionDir(fs, contained);
|
||||
}
|
||||
return fileMoves;
|
||||
}
|
||||
|
||||
if (dirs == null) {
|
||||
if (!fs.exists(contained.getHdfsRegionDir())) {
|
||||
|
|
Loading…
Reference in New Issue