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

Erik Krogen commented on HDFS-13399:
------------------------------------

Hey [~zero45], I took a first look at the patch. I think the approach is clean. 
{{DFSClient}} is the sensible place to store the single {{AlignmentContext}}, 
then it can pass it down to its proxies / ProxyProviders. All of the method 
overrides are not exactly great, but in line with what's already happening in 
this area of the code.

A few comments:
* We currently don't have a version of 
{{NameNodeProxies#createProxy(Configuration, URI, Class<T>, AtomicBoolean)}} 
which accepts an alignment context, should we add one?
* Why is one {{getProxy()}} method removed from {{ProtobufRpcEngine}}?
* Why is {{IPFailoverProxyProvider}} passing null as its assignment context 
instead of {{getAlignmentContext()}} ?

Also a few notes that I had to wrap my head around in the hope that others 
won't get stuck on it:
* The alignment context is necessary even when we create a non-HA proxy because 
this is used internally by the HA proxies.
* The alignment context is necessary in both the ProxyProvider and the proxy 
itself, since the ProxyProvider will go on to create additional proxies.

> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to