[
https://issues.apache.org/jira/browse/HDFS-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744157#action_12744157
]
Hairong Kuang commented on HDFS-547:
------------------------------------
It turns out that DFSOutputStream#flushInternal only waits for all acks are
back but does not wait for the end of block message gets sent out. So the close
may interrupt the sending of the end of block message and thus causes the error.
> TestHDFSFileSystemContract#testOutputStreamClosedTwice sometimes fails with
> ClosedByInterruptException
> ------------------------------------------------------------------------------------------------------
>
> Key: HDFS-547
> URL: https://issues.apache.org/jira/browse/HDFS-547
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client
> Affects Versions: Append Branch
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: Append Branch
>
>
> Here is the failed stack trace:
> {noformat}
> Testcase: testOutputStreamClosedTwice took 1.026 sec
> Caused an ERROR
> null
> java.nio.channels.ClosedByInterruptException
> at
> java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
> at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:341)
> at
> org.apache.hadoop.net.SocketOutputStream$Writer.performIO(SocketOutputStream.java:55)
> at
> org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:142)
> at
> org.apache.hadoop.net.SocketOutputStream.write(SocketOutputStream.java:146)
> at
> org.apache.hadoop.net.SocketOutputStream.write(SocketOutputStream.java:107)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at java.io.DataOutputStream.flush(DataOutputStream.java:106)
> at
> org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2438)
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.