HADOOP-14942. DistCp#cleanup() should check whether jobFS is null.
Contributed by Andras Bokor.
(cherry picked from commit f36cbc8475
)
This commit is contained in:
parent
ea149c10cf
commit
2bacb429a1
|
@ -453,10 +453,12 @@ public class DistCp extends Configured implements Tool {
|
|||
|
||||
private synchronized void cleanup() {
|
||||
try {
|
||||
if (metaFolder == null) return;
|
||||
|
||||
jobFS.delete(metaFolder, true);
|
||||
metaFolder = null;
|
||||
if (metaFolder != null) {
|
||||
if (jobFS != null) {
|
||||
jobFS.delete(metaFolder, true);
|
||||
}
|
||||
metaFolder = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.error("Unable to cleanup meta folder: " + metaFolder, e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue