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

Chao Sun commented on HDFS-13749:
---------------------------------

Thanks [~xkrogen]. Yes agree that it's better to put the proxy creation logic 
in {{NameNodeProxiesClient}}. Will do that.
{quote}Does the proxy creation in {{NNProxyInfo}} actually set up the 
connection to be able to throw an {{IOException}}? If so, I think we should 
lazily instantiate later rather than in the constructor. As far as I could 
tell, it doesn't actually create the connection yet, in which case the current 
setup is fine. If you could help me confirm this that would be great.
{quote}
I think the connection is created only when {{Client.call}} is called (see 
{{Connection#setupConnection}} and its call sites}}), so you're right, it 
doesn't create connection upon creating the proxy. For now, I'll keep it in the 
constructor since like you said, I don't see a big advantage to lazily 
initialize it.
{quote}NNProxyInfo.serviceProto, I think this should be called serviceProxy ?
{quote}
Done.
{quote}In the previous patch, if we were unable to communicate with the NN, we 
marked it as STANDBY. I think we should maintain this behavior - your patch 
currently leaves the old cached state. I also think the message should be WARN, 
not ERROR.
{quote}
Good catch. Done.
{quote}Rather than using a hard-coded 30 second timeout, can we reuse something 
about the configured retry policy?
{quote}
In {{Connection#getConnectionId}}, if null {{RetryPolicy}} is provided, it will 
use a default retry policy which will retry a number of times on a fixed 
interval. For the purpose of checking service status, I'm not sure if we need 
anything fancier. Thought?
 I'm also not particularly happy with the hard-coded 30 sec timeout, As a 
improvement, we can re-use {{ipc.client.rpc-timeout.ms}}. The same is also done 
in {{NameNodeProxiesClient#createProxyWithAlignmentContext}}. What do you think?

> Use getServiceStatus to discover observer namenodes
> ---------------------------------------------------
>
>                 Key: HDFS-13749
>                 URL: https://issues.apache.org/jira/browse/HDFS-13749
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Major
>         Attachments: HDFS-13749-HDFS-12943.000.patch, 
> HDFS-13749-HDFS-12943.001.patch
>
>
> In HDFS-12976 currently we discover NameNode state by calling 
> {{reportBadBlocks}} as a temporary solution. Here, we'll properly implement 
> this by using {{HAServiceProtocol#getServiceStatus}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to