hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject hadoop git commit: Revert "HADOOP-12469. distcp shout not ignore the ignoreFailures option. Contributed by Mingliang Liu."
Date Sat, 10 Oct 2015 10:25:23 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 a412edf5c -> f6b0fcdc7


Revert "HADOOP-12469. distcp shout not ignore the ignoreFailures option. Contributed by Mingliang
Liu."

This reverts commit a412edf5c4838e007217652e1cb6a24e73b7e735.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f6b0fcdc
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f6b0fcdc
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f6b0fcdc

Branch: refs/heads/branch-2
Commit: f6b0fcdc754af8f23ee78ff033df622c06bb17e5
Parents: a412edf
Author: Haohui Mai <wheat9@apache.org>
Authored: Sat Oct 10 03:25:16 2015 -0700
Committer: Haohui Mai <wheat9@apache.org>
Committed: Sat Oct 10 03:25:16 2015 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt              | 3 ---
 .../main/java/org/apache/hadoop/tools/mapred/CopyMapper.java | 2 +-
 .../java/org/apache/hadoop/tools/mapred/TestCopyMapper.java  | 8 +++-----
 3 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f6b0fcdc/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 7c1efcd..1dc42e9 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -695,9 +695,6 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12441. Fixed shell-kill command behaviour to work correctly on some
     Linux distributions after HADOOP-12317. (Wangda Tan via vinodkv)
 
-    HADOOP-12469. distcp shout not ignore the ignoreFailures option.
-    (Mingliang Liu via wheat9)
-
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f6b0fcdc/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyMapper.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyMapper.java
b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyMapper.java
index dca77c7..cca36df 100644
--- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyMapper.java
+++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/CopyMapper.java
@@ -283,7 +283,7 @@ public class CopyMapper extends Mapper<Text, CopyListingFileStatus,
Text, Text>
     } catch (Exception e) {
       context.setStatus("Copy Failure: " + sourceFileStatus.getPath());
       throw new IOException("File copy failed: " + sourceFileStatus.getPath() +
-          " --> " + target, e.getCause());
+          " --> " + target, e);
     }
     incrementCounter(context, Counter.BYTESEXPECTED, sourceFileStatus.getLen());
     incrementCounter(context, Counter.BYTESCOPIED, bytesCopied);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f6b0fcdc/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java
b/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java
index 07400f8..7639d23 100644
--- a/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java
+++ b/hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java
@@ -713,7 +713,7 @@ public class TestCopyMapper {
             // wrapped twice - once in RetriableCommand and again in CopyMapper
             // itself.
             if (e.getCause() == null || e.getCause().getCause() == null ||
-                !(e.getCause() instanceof AccessControlException)) {
+                !(e.getCause().getCause() instanceof AccessControlException)) {
               throw new RuntimeException(e);
             }
           }
@@ -841,10 +841,8 @@ public class TestCopyMapper {
     }
     catch (Exception exception) {
       // Check that the exception suggests the use of -pb/-skipCrc.
-      Assert.assertTrue("Exception should have suggested the use of -pb.",
-          exception.getCause().getMessage().contains("pb"));
-      Assert.assertTrue("Exception should have suggested the use of -skipCrc.",
-          exception.getCause().getMessage().contains("skipCrc"));
+      Assert.assertTrue("Failure exception should have suggested the use of -pb.", exception.getCause().getCause().getMessage().contains("pb"));
+      Assert.assertTrue("Failure exception should have suggested the use of -skipCrc.", exception.getCause().getCause().getMessage().contains("skipCrc"));
     }
   }
 


Mime
View raw message