HADOOP-11724. DistCp throws NPE when the target directory is root. (Lei Eddy Xu via Yongjun Zhang)
This commit is contained in:
parent
fc1031af74
commit
44809b8081
@ -469,6 +469,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HADOOP-10027. *Compressor_deflateBytesDirect passes instance instead of
|
HADOOP-10027. *Compressor_deflateBytesDirect passes instance instead of
|
||||||
jclass to GetStaticObjectField. (Hui Zheng via cnauroth)
|
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
|
Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -133,6 +133,9 @@ private void cleanupTempFiles(JobContext context) {
|
|||||||
private void deleteAttemptTempFiles(Path targetWorkPath,
|
private void deleteAttemptTempFiles(Path targetWorkPath,
|
||||||
FileSystem targetFS,
|
FileSystem targetFS,
|
||||||
String jobId) throws IOException {
|
String jobId) throws IOException {
|
||||||
|
if (targetWorkPath == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
FileStatus[] tempFiles = targetFS.globStatus(
|
FileStatus[] tempFiles = targetFS.globStatus(
|
||||||
new Path(targetWorkPath, ".distcp.tmp." + jobId.replaceAll("job","attempt") + "*"));
|
new Path(targetWorkPath, ".distcp.tmp." + jobId.replaceAll("job","attempt") + "*"));
|
||||||
|
Loading…
Reference in New Issue
Block a user