hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sameer Abhyankar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7298) HDFS may honor socket timeout configuration
Date Thu, 25 Feb 2016 02:13:18 GMT

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

Sameer Abhyankar commented on HDFS-7298:
----------------------------------------

[~bimaltandel] [~yzhangal] I have uploaded a patch for this.

> HDFS may honor socket timeout configuration
> -------------------------------------------
>
>                 Key: HDFS-7298
>                 URL: https://issues.apache.org/jira/browse/HDFS-7298
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Guo Ruijing
>            Assignee: Sameer Abhyankar
>         Attachments: HDFS-7298.patch
>
>
> DFS_CLIENT_SOCKET_TIMEOUT_KEY: HDFS socket read timeout
> DFS_DATANODE_SOCKET_WRITE_TIMEOUT_KEY: HDFS socket write timeout 
> HDFS may honor socket timeout configuration:
> 1. DataXceiver.java:
> 1) existing code(not expected)
>        int timeoutValue = dnConf.socketTimeout
>               + (HdfsServerConstants.READ_TIMEOUT_EXTENSION * targets.length);
>           int writeTimeout = dnConf.socketWriteTimeout +
>                       (HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * targets.length);
> 2) proposed code:
>        int timeoutValue = dnConf.socketTimeout ? (dnConf.socketTimeout
>               + (HdfsServerConstants.READ_TIMEOUT_EXTENSION * targets.length) : 0;
>           int writeTimeout = dnConf.socketWriteTimeout ? (dnConf.socketWriteTimeout +

>                       (HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * targets.length))
: 0;
> 2) DFSClient.java
> existing code is expected:
>   int getDatanodeWriteTimeout(int numNodes) {
>     return (dfsClientConf.confTime > 0) ?
>       (dfsClientConf.confTime + HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * numNodes)
: 0;
>   }
>   int getDatanodeReadTimeout(int numNodes) {
>     return dfsClientConf.socketTimeout > 0 ?
>         (HdfsServerConstants.READ_TIMEOUT_EXTENSION * numNodes +
>             dfsClientConf.socketTimeout) : 0;
>   }
> 3) DataNode.java:
> existing code is not expected: 
>         long writeTimeout = dnConf.socketWriteTimeout +
>                             HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * (targets.length-1);
> proposed code:
>         long writeTimeout = dnConf.socketWriteTimeout ? (dnConf.socketWriteTimeout  +
>                             HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * (targets.length-1))
: 0;



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

Mime
View raw message