[
https://issues.apache.org/jira/browse/HDFS-4013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470846#comment-13470846
]
Chao Shi commented on HDFS-4013:
--------------------------------
Yes, Suresh. I will change.
I also find testHftpSocketTimeout is flaky on my box. It sometimes times out
while connecting (rather than reading as expected). Maybe we should test it in
a similar way to checkConnectTimeout, i.e. loop a few times and check that read
timeout happens at least once. Any ideas?
Stacktrace of a connection timeout
{code}
testHftpSocketTimeout(org.apache.hadoop.hdfs.TestHftpURLTimeouts) Time
elapsed: 0.565 sec <<< ERROR!
java.net.SocketTimeoutException
at java.net.SocksSocketImpl.remainingMillis(SocksSocketImpl.java:111)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
at
org.apache.hadoop.hdfs.HftpFileSystem.openConnection(HftpFileSystem.java:323)
at
org.apache.hadoop.hdfs.TestHftpURLTimeouts.testHftpSocketTimeout(TestHftpURLTimeouts.java:58)
{code}
> TestHftpURLTimeouts#testHftpSocketTimeout throws NPE on OpenJDK 1.7.0_06
> ------------------------------------------------------------------------
>
> Key: HDFS-4013
> URL: https://issues.apache.org/jira/browse/HDFS-4013
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client
> Environment: java version "1.7.0_06-icedtea"
> OpenJDK Runtime Environment (fedora-2.3.1.fc17.2-i386)
> OpenJDK Client VM (build 23.2-b09, mixed mode)
> Reporter: Chao Shi
> Priority: Trivial
> Attachments: hdfs-4013.patch
>
>
> The case fails at line 116, where message is null. I guess this may be an
> openjdk-specific behavior, but it would be nice to have it fixed although
> openjdk is not officially supported.
> FYI: The exception is thrown with null message at java.net.SocksSocketImpl.
> {code}
> private static int remainingMillis(long deadlineMillis) throws
> IOException {
> if (deadlineMillis == 0L)
> return 0;
> final long remaining = deadlineMillis - System.currentTimeMillis();
> if (remaining > 0)
> return (int) remaining;
> throw new SocketTimeoutException();
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira