From 45ca24c1d8a508bfcd906fc055a9a74ec2a81e01 Mon Sep 17 00:00:00 2001 From: Daryn Sharp Date: Tue, 11 Jun 2013 19:30:44 +0000 Subject: [PATCH] svn merge -c 1491914 FIXES: MAPREDUCE-5315. DistCp reports success even on failure. (mithun and jlowe via daryn) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1491918 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 6 ++++++ .../src/main/java/org/apache/hadoop/tools/DistCp.java | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1ce689e3d7d..1de76c59ffe 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -392,6 +392,9 @@ Release 2.1.0-beta - 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) + BREAKDOWN OF HADOOP-8562 SUBTASKS MAPREDUCE-4739. Some MapReduce tests fail to find winutils. @@ -1010,6 +1013,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 diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java index e507c7a8c5b..bf7086a4d44 100644 --- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java +++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java @@ -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; }