HADOOP-14942. DistCp#cleanup() should check whether jobFS is null.
Contributed by Andras Bokor.
This commit is contained in:
parent
480187aebb
commit
f36cbc8475
@ -453,10 +453,12 @@ private static Configuration getDefaultConf() {
|
|||||||
|
|
||||||
private synchronized void cleanup() {
|
private synchronized void cleanup() {
|
||||||
try {
|
try {
|
||||||
if (metaFolder == null) return;
|
if (metaFolder != null) {
|
||||||
|
if (jobFS != null) {
|
||||||
jobFS.delete(metaFolder, true);
|
jobFS.delete(metaFolder, true);
|
||||||
metaFolder = null;
|
}
|
||||||
|
metaFolder = null;
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Unable to cleanup meta folder: " + metaFolder, e);
|
LOG.error("Unable to cleanup meta folder: " + metaFolder, e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user