HADOOP-11724. DistCp throws NPE when the target directory is root. (Lei Eddy Xu via Yongjun Zhang)
(cherry-picked from commit 65ee02d9ed50e026c2d37ec80babd4176075ff84)
This commit is contained in:
parent
be4eabdcd4
commit
be0d228ed1
|
@ -42,6 +42,9 @@ Release 2.8.0 - UNRELEASED
|
|||
HADOOP-10027. *Compressor_deflateBytesDirect passes instance instead of
|
||||
jclass to GetStaticObjectField. (Hui Zheng via cnauroth)
|
||||
|
||||
HADOOP-11724. DistCp throws NPE when the target directory is root.
|
||||
(Lei Eddy Xu via Yongjun Zhang)
|
||||
|
||||
Release 2.7.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -133,6 +133,9 @@ public class CopyCommitter extends FileOutputCommitter {
|
|||
private void deleteAttemptTempFiles(Path targetWorkPath,
|
||||
FileSystem targetFS,
|
||||
String jobId) throws IOException {
|
||||
if (targetWorkPath == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
FileStatus[] tempFiles = targetFS.globStatus(
|
||||
new Path(targetWorkPath, ".distcp.tmp." + jobId.replaceAll("job","attempt") + "*"));
|
||||
|
|
Loading…
Reference in New Issue