Repository: hadoop
Updated Branches:
  refs/heads/branch-2 8a6c7d997 -> 7454ed2b5


HADOOP-12074. in Shell.java#runCommand() rethrow InterruptedException as 
InterruptedIOException (Contributed by Lavkesh Lahngir)

(cherry picked from commit 95c73d49b1bb459b626a9ac52acadb8f5fa724de)


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

Branch: refs/heads/branch-2
Commit: 7454ed2b595784627ebef078d246b3ae6378cc39
Parents: 8a6c7d9
Author: Vinayakumar B <[email protected]>
Authored: Thu Jun 11 11:51:14 2015 +0530
Committer: Vinayakumar B <[email protected]>
Committed: Thu Jun 11 12:00:17 2015 +0530

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                 | 3 +++
 .../src/main/java/org/apache/hadoop/util/Shell.java             | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7454ed2b/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 d67f7b7..8b5f218 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -362,6 +362,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-7817. RawLocalFileSystem.append() should give FSDataOutputStream
     with accurate .getPos() (kanaka kumar avvaru via vinayakumarb)
 
+    HADOOP-12074. in Shell.java#runCommand() rethrow InterruptedException as
+    InterruptedIOException (Lavkesh Lahngir via vinayakumarb)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7454ed2b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
index c76c921..45c1588 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.InputStream;
+import java.io.InterruptedIOException;
 import java.nio.charset.Charset;
 import java.util.Arrays;
 import java.util.Map;
@@ -554,7 +555,9 @@ abstract public class Shell {
         throw new ExitCodeException(exitCode, errMsg.toString());
       }
     } catch (InterruptedException ie) {
-      throw new IOException(ie.toString());
+      InterruptedIOException iie = new InterruptedIOException(ie.toString());
+      iie.initCause(ie);
+      throw iie;
     } finally {
       if (timeOutTimer != null) {
         timeOutTimer.cancel();

Reply via email to