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

Bob Hansen updated HDFS-9228:
-----------------------------
    Attachment: HDFS-9228.HDFS-8707.004.patch

[~James Clampffer]: Thanks for the feedback.  

bq. It looks like RpcConnection::shared_from_this is called frequently but I 
wasn't able to find a make_shared<RpcConnection> though maybe I just missed it.

It wass passed into shared_ptr.reset each time, but I changed the interface to 
enforce that.  Good catch.

bq. In rpc_connection.h there are several instances of a lambda capturing 
'this' and a shared_ptr to 'this'. Is the shared_ptr there to keep things alive 
and this captured to call methods without using shared_this->method?

It's a good question.  I didn't have a good place to document it.

The shared_this is to maintain the lifecycle, and the independent this is to 
establish access.  That code was failing because we were trying to call 
protected/private members from an external lambda; pushing in this allows 
private access.

bq. Factoring Request out of RpcConnection looks good but I'd like to have a 
short comments for each class that says what their responsibilities are.

Added comments along with threading models and code to enforce the threading 
models.  The code is a safer place for it.

bq. Perhaps change Callback as typedefed in rpc_engine.h to "RpcCallback" or 
similar.

Good call.  Fixed.

[~wheat9]: I added an abstract base class and an implementation that 
encapsulates the policies (no retry and fixed dealy for now).  It's a clone of 
the Java interface, so I assume it will have the expressiveness that we need.  
Please let me know what you think.



> libhdfs++ should respect NN retry configuration settings
> --------------------------------------------------------
>
>                 Key: HDFS-9228
>                 URL: https://issues.apache.org/jira/browse/HDFS-9228
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>            Assignee: Bob Hansen
>         Attachments: HDFS-9228.HDFS-8707.001.patch, 
> HDFS-9228.HDFS-8707.002.patch, HDFS-9228.HDFS-8707.003.patch, 
> HDFS-9228.HDFS-8707.004.patch
>
>
> Handle the use case of temporary network or NN hiccups and have a 
> configurable number of retries for NN operations.



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

Reply via email to