hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1491918 - /hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
Date Tue, 11 Jun 2013 19:30:44 GMT
Author: daryn
Date: Tue Jun 11 19:30:44 2013
New Revision: 1491918

URL: http://svn.apache.org/r1491918
Log:
svn merge -c 1491914 FIXES: MAPREDUCE-5315.  DistCp reports success even on failure. (mithun
and jlowe via daryn)

Modified:
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java

Modified: hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java?rev=1491918&r1=1491917&r2=1491918&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
Tue Jun 11 19:30:44 2013
@@ -162,8 +162,9 @@ public class DistCp extends Configured i
     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;
   }



Mime
View raw message