HBASE-6050 HLogSplitter renaming recovered.edits and CJ removing the parent directory races, making the HBCK to think cluster is inconsistent. (Ram)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1342937 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d5ef991ac4
commit
e17357d77a
|
@ -580,6 +580,13 @@ public class HLogSplitter {
|
||||||
if (fs.exists(dst)) {
|
if (fs.exists(dst)) {
|
||||||
fs.delete(dst, false);
|
fs.delete(dst, false);
|
||||||
} else {
|
} else {
|
||||||
|
Path regionDir = dst.getParent().getParent();
|
||||||
|
if (!fs.exists(regionDir)) {
|
||||||
|
// See HBASE-6050.
|
||||||
|
LOG.warn("Could not move recovered edits from " + src +
|
||||||
|
" to destination " + regionDir + " as it doesn't exist.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Path dstdir = dst.getParent();
|
Path dstdir = dst.getParent();
|
||||||
if (!fs.exists(dstdir)) {
|
if (!fs.exists(dstdir)) {
|
||||||
if (!fs.mkdirs(dstdir)) LOG.warn("mkdir failed on " + dstdir);
|
if (!fs.mkdirs(dstdir)) LOG.warn("mkdir failed on " + dstdir);
|
||||||
|
|
Loading…
Reference in New Issue