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

James Clampffer commented on HDFS-10441:
----------------------------------------

Thanks for looking at this more Bob.

bq. Should HandleRpcResponse return a value or just forward-propagate to 
CommsError? In the implementation, we alternately do one, the other, or both.
Probably best write functions as plain procedural code that return values 
wherever possible IMO.  That way the async work and associated complexity are 
clustered in the same areas rather than distributed across the code.  It might 
be worth splitting off a seperate jira to refactor and document the RPC stuff; 
the current mix of state machine(s) and continuations was a little tricky to 
reverse engineer for adding this feature.  As you pointed out I'm doing both 
returns and forwarding here.  The current code is fairly well tested/used and 
I'd really like to get a CI test around this before changing it too much more.  
Think that's worth a seperate jira?

bq. RpcConnectionImpl::ConnectAndFlush logs entry at the INFO level. I think we 
already log once when we're attempting to connect, do we not? If this is the 
only place we keep it, we should include the endpoint we're connecting to in 
the log message.
Yea, RpcConnectionImpl::ConnectAndFlush and RpcConnectionImpl::Connect are both 
logging effectively the same thing at the moment.  Logging both helps a little 
bit to reason about the indirect recursion via async callbacks going on in that 
code.  I think it'd be best to wait until the connection callback to log the 
endpoint in case there are multiple endpoints, but that starts getting a bit 
out of scope for this.  My general strategy is to follow "perfect is the enemy 
of good" when it comes to this sort of stuff, particularly early in the 
lifetime of a feature.

> libhdfs++: HA namenode support
> ------------------------------
>
>                 Key: HDFS-10441
>                 URL: https://issues.apache.org/jira/browse/HDFS-10441
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>         Attachments: HDFS-10441.HDFS-8707.000.patch, 
> HDFS-10441.HDFS-8707.002.patch, HDFS-10441.HDFS-8707.003.patch, 
> HDFS-10441.HDFS-8707.004.patch, HDFS-10441.HDFS-8707.005.patch, 
> HDFS-10441.HDFS-8707.006.patch, HDFS-10441.HDFS-8707.007.patch, 
> HDFS-10441.HDFS-8707.008.patch, HDFS-10441.HDFS-8707.009.patch, 
> HDFS-10441.HDFS-8707.010.patch, HDFS-10441.HDFS-8707.011.patch, 
> HDFS-10441.HDFS-8707.012.patch, HDFS-10441.HDFS-8707.013.patch, 
> HDFS-10441.HDFS-8707.014.patch, HDFS-8707.HDFS-10441.001.patch
>
>
> If a cluster is HA enabled then do proper failover.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to