[ 
https://issues.apache.org/jira/browse/HDFS-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bc Wong updated HDFS-941:
-------------------------

    Attachment: HDFS-941-1.patch

Attaching a patch, which:
* In {{DFSInputStream}}, stores the last socket and the owner ({{BlockReader}}) 
of that socket.
* If the owner did read till EOS, then it'll consider reusing that socket.
* It's a cache of size 1, but easy to extend to _n_. However, size of 1 makes 
sense for now because:
* The DN ({{DataXceiver}}) no longer closes the client connection after every 
op. It optimistically expects the next op, with a very low timeout value. It 
closes the connection only on EOS or timeout.

Note that the HDFS-941-1.patch depends on the HDFS-1001 patch.

> Datanode xceiver protocol should allow reuse of a connection
> ------------------------------------------------------------
>
>                 Key: HDFS-941
>                 URL: https://issues.apache.org/jira/browse/HDFS-941
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node, hdfs client
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>         Attachments: HDFS-941-1.patch
>
>
> Right now each connection into the datanode xceiver only processes one 
> operation.
> In the case that an operation leaves the stream in a well-defined state (eg a 
> client reads to the end of a block successfully) the same connection could be 
> reused for a second operation. This should improve random read performance 
> significantly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to