MAPREDUCE-5315. DistCp reports success even on failure. (mithun and jlowe via daryn)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1491914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daryn Sharp 2013-06-11 19:22:53 +00:00
parent 59bd35daef
commit 723ef662a9
2 changed files with 6 additions and 2 deletions

View File

@ -1114,6 +1114,9 @@ Release 0.23.9 - UNRELEASED
MAPREDUCE-5308. Shuffling to memory can get out-of-sync when fetching
multiple compressed map outputs (Nathan Roberts via jlowe)
MAPREDUCE-5315. DistCp reports success even on failure. (mithun and jlowe
via daryn)
Release 0.23.8 - 2013-06-05
INCOMPATIBLE CHANGES

View File

@ -162,8 +162,9 @@ public class DistCp extends Configured implements Tool {
job.getConfiguration().set(DistCpConstants.CONF_LABEL_DISTCP_JOB_ID, jobID);
LOG.info("DistCp job-id: " + jobID);
if (inputOptions.shouldBlock()) {
job.waitForCompletion(true);
if (inputOptions.shouldBlock() && !job.waitForCompletion(true)) {
throw new IOException("DistCp failure: Job " + jobID + " has failed: "
+ job.getStatus().getFailureInfo());
}
return job;
}