HBASE-22291 Fix recovery of recovered.edits files under root dir

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Zach York 2019-04-22 16:41:08 -07:00 committed by Andrew Purtell
parent edc30fc950
commit 8563644f89
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD
1 changed files with 3 additions and 3 deletions

View File

@ -4358,11 +4358,11 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
} }
for (Path edits : files) { for (Path edits : files) {
if (edits == null || !walFS.exists(edits)) { if (edits == null || !fs.exists(edits)) {
LOG.warn("Null or non-existent edits file: " + edits); LOG.warn("Null or non-existent edits file: " + edits);
continue; continue;
} }
if (isZeroLengthThenDelete(walFS, edits)) { if (isZeroLengthThenDelete(fs, edits)) {
continue; continue;
} }
@ -4392,7 +4392,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + " instead."); HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + " instead.");
} }
if (skipErrors) { if (skipErrors) {
Path p = WALSplitter.moveAsideBadEditsFile(walFS, edits); Path p = WALSplitter.moveAsideBadEditsFile(fs, edits);
LOG.error(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + LOG.error(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS +
"=true so continuing. Renamed " + edits + " as " + p, e); "=true so continuing. Renamed " + edits + " as " + p, e);
} else { } else {