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

Konstantin Shvachko commented on HDFS-13687:
--------------------------------------------

Was looking at your patch, [~csun]. The problem looks straightforward, but the 
solution may be tricky here. Some thoughts.
# We cannot just call {{getServiceStatus()}} from 
{{ConfiguredFailoverProxyProvider<T>}}
#* Because it requires superuser privileges on NN, which the client doesn't 
generally have in case {{T = ClientProtocol}}
#* For some protocols like {{T = DatanodeProtocol}} we actually don't care if 
the proxy connects to Active, because in the end DNs should report to all NNs 
regardless of the state.
# If the proxy needs the HAState it should be doing something like 
{{FailoverController}}. Particularly go through a factory to create a proxy, 
rather than directly instantiating 
{{HAServiceProtocolClientSideTranslatorPB()}}.
# Current implementation of {{ConfiguredFailoverProxyProvider}} doesn't have a 
notion of dealing with NNs. It probably should, or the factory for it should. 
So that we were able to add NameNode specific logic.

Anyways, this will need some thinking, I don't see a solution yet. In the mean 
time, can we return back to HDFS-12976 and see what we can do there?

> ConfiguredFailoverProxyProvider could direct requests to SBN
> ------------------------------------------------------------
>
>                 Key: HDFS-13687
>                 URL: https://issues.apache.org/jira/browse/HDFS-13687
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Minor
>         Attachments: HDFS-13687.000.patch
>
>
> In case there are multiple SBNs, and {{dfs.ha.allow.stale.reads}} is set to 
> true, failover could go to a SBN which then may serve read requests from 
> client. This may not be the expected behavior. This issue arises when we are 
> working on HDFS-12943 and HDFS-12976.
> A better approach for this could be to check {{HAServiceState}} and find out 
> the active NN when performing failover. This also can reduce the # of 
> failovers the client has to do in case of multiple SBNs.



--
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