[ 
https://issues.apache.org/jira/browse/HDFS-8311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14535104#comment-14535104
 ] 

Yongjun Zhang commented on HDFS-8311:
-------------------------------------

Hi [~esteban],

Thanks for addressing my verbal comments. 

I found that there are other places that might need similar handling, like 
{{DataXceiver#replaceBlock}}
{code}
        OutputStream unbufProxyOut = NetUtils.getOutputStream(proxySock,
            dnConf.socketWriteTimeout);
        InputStream unbufProxyIn = NetUtils.getInputStream(proxySock);
{code}

{{DataXceiver#writeBlock}}
{code}
          OutputStream unbufMirrorOut = NetUtils.getOutputStream(mirrorSock,
              writeTimeout);
          InputStream unbufMirrorIn = NetUtils.getInputStream(mirrorSock);
{code}

{{DataNode#run}}
{code}
        OutputStream unbufOut = NetUtils.getOutputStream(sock, writeTimeout);
        InputStream unbufIn = NetUtils.getInputStream(sock);
{code}

And some other places.

I know that [~esteban] has verified the uploaded patch solve one real issue, so 
maybe it's ok for us to address the remaining places in separate jiras. 

What do you think [~cmccabe]?

Thanks.


> DataStreamer.transfer() should timeout the socket InputStream.
> --------------------------------------------------------------
>
>                 Key: HDFS-8311
>                 URL: https://issues.apache.org/jira/browse/HDFS-8311
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Esteban Gutierrez
>            Assignee: Esteban Gutierrez
>              Labels: BB2015-05-TBR
>         Attachments: 
> 0001-HDFS-8311-DataStreamer.transfer-should-timeout-the-s.patch, 
> HDFS-8311.001.patch
>
>
> While validating some HA failure modes we found that HDFS clients can take a 
> long time to recover or sometimes don't recover at all since we don't setup 
> the socket timeout in the InputStream:
> {code}
> private void transfer () { ...
> ...
>  OutputStream unbufOut = NetUtils.getOutputStream(sock, writeTimeout);
>  InputStream unbufIn = NetUtils.getInputStream(sock);
> ...
> }
> {code}
> The InputStream should have its own timeout in the same way as the 
> OutputStream.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to