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

Plamen Jeliazkov commented on HDFS-13399:
-----------------------------------------

Thanks for the review, [~shv].

Regarding (1), those changes are pretty easy and I generally agree. I think 
this was the sort of approach I was looking towards when I asked about 
configuration; minimizing change of behaviors to only when necessary.

Regarding (2), assuming we implement (1), then in the case of most 
instantiations of AbstractNNFailoverProxyProvider we will simply pass null for 
an {{AlignmentContext}}. Only if DFSClient's initialization will end up calling 
{{NameNodeProxiesClient.createHAProxy}} will we set the {{AlignmentContext}}. 
Is this acceptable? It will be difficult otherwise to pass an 
{{AlignmentContext}} into {{Client}} itself.

We can change NameNodeProxiesClient.createProxyWithClientProtocol like so:
{code:java}
if (failoverProxyProvider == null) {
  ...normal case...
} else {
  failoverProxyProvider.setAlignmentContext(alignmentContext);
  return createHAProxy(conf, nameNodeUri, ClientProtocol.class,
    failoverProxyProvider);
}{code}

> Make Client field AlignmentContext non-static.
> ----------------------------------------------
>
>                 Key: HDFS-13399
>                 URL: https://issues.apache.org/jira/browse/HDFS-13399
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: HDFS-12943
>            Reporter: Plamen Jeliazkov
>            Assignee: Plamen Jeliazkov
>            Priority: Major
>         Attachments: HDFS-13399-HDFS-12943.000.patch, 
> HDFS-13399-HDFS-12943.001.patch, HDFS-13399-HDFS-12943.002.patch
>
>
> In HDFS-12977, DFSClient's constructor was altered to make use of a new 
> static method in Client that allowed one to set an AlignmentContext. This 
> work is to remove that static field and make each DFSClient pass it's 
> AlignmentContext down to the proxy Call level.



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

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