You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ac...@apache.org on 2014/11/12 19:01:56 UTC
[1/2] hadoop git commit: HADOOP-9576. Changed NetUtils#wrapException
to throw EOFException instead of wrapping it as IOException. Contributed by
Steve Loughran
Repository: hadoop
Updated Branches:
refs/heads/branch-2.6 9613a57e8 -> dc04b3376
HADOOP-9576. Changed NetUtils#wrapException to throw EOFException instead of wrapping it as IOException. Contributed by Steve Loughran
Conflicts:
hadoop-common-project/hadoop-common/CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/aa2f87ca
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/aa2f87ca
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/aa2f87ca
Branch: refs/heads/branch-2.6
Commit: aa2f87caaf1608081a2a875c7852b596307a1ccb
Parents: 9613a57
Author: Jian He <ji...@apache.org>
Authored: Mon Nov 10 17:17:01 2014 -0800
Committer: Arun C. Murthy <ac...@apache.org>
Committed: Wed Nov 12 10:00:17 2014 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/net/NetUtils.java | 8 ++++++++
.../test/java/org/apache/hadoop/net/TestNetUtils.java | 12 ++++++++++++
2 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/aa2f87ca/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
index 9ee0f3e..b535dda 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
@@ -17,6 +17,7 @@
*/
package org.apache.hadoop.net;
+import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -759,6 +760,13 @@ public class NetUtils {
+ " failed on socket timeout exception: " + exception
+ ";"
+ see("NoRouteToHost"));
+ } else if (exception instanceof EOFException) {
+ return wrapWithMessage(exception,
+ "End of File Exception between "
+ + getHostDetailsAsString(destHost, destPort, localHost)
+ + ": " + exception
+ + ";"
+ + see("EOFException"));
}
else {
return (IOException) new IOException("Failed on local exception: "
http://git-wip-us.apache.org/repos/asf/hadoop/blob/aa2f87ca/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
index b03afca..319e8a9 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.net;
import static org.junit.Assert.*;
+import java.io.EOFException;
import java.io.IOException;
import java.net.BindException;
import java.net.ConnectException;
@@ -257,6 +258,17 @@ public class TestNetUtils {
}
@Test
+ public void testWrapEOFException() throws Throwable {
+ IOException e = new EOFException("eof");
+ IOException wrapped = verifyExceptionClass(e, EOFException.class);
+ assertInException(wrapped, "eof");
+ assertWikified(wrapped);
+ assertInException(wrapped, "localhost");
+ assertRemoteDetailsIncluded(wrapped);
+ assertInException(wrapped, "/EOFException");
+ }
+
+ @Test
public void testGetConnectAddress() throws IOException {
NetUtils.addStaticResolution("host", "127.0.0.1");
InetSocketAddress addr = NetUtils.createSocketAddrForHost("host", 1);
[2/2] hadoop git commit: HADOOP-9576. Merging to branch-2.6 for
hadoop-2.6.0-rc1.
Posted by ac...@apache.org.
HADOOP-9576. Merging to branch-2.6 for hadoop-2.6.0-rc1.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dc04b337
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dc04b337
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dc04b337
Branch: refs/heads/branch-2.6
Commit: dc04b33768efcb1d8309f89c5621288cbc8e64b5
Parents: aa2f87c
Author: Arun C. Murthy <ac...@apache.org>
Authored: Wed Nov 12 09:55:28 2014 -0800
Committer: Arun C. Murthy <ac...@apache.org>
Committed: Wed Nov 12 10:01:09 2014 -0800
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc04b337/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 7de3a59..831206f 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -682,6 +682,9 @@ Release 2.6.0 - 2014-11-15
HADOOP-11282. Skip NFS TestShellBasedIdMapping tests that are irrelevant on
Windows. (cnauroth)
+ HADOOP-9576. Changed NetUtils#wrapException to throw EOFException instead
+ of wrapping it as IOException. (Steve Loughran via jianhe)
+
Release 2.5.2 - 2014-11-10
INCOMPATIBLE CHANGES