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

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

While I understand the shift there were some major problems with the 006 patch 
that I had to address. I now have a working patch that gets the main issue of 
moving the AlignmentContext into implementing ProxyProvider(s).

Changes from the .006 patch:
* Server.RpcCall.doResponse(Throwable t) -- This is where the RPC response 
header is rebuilt now. This seems to address the issue I was seeing with 
FsEditLogAsync from my testing. I had to store the built header and response 
bytes in the call. This bloats the call object but only temporarily and only if 
an AlignmentContext is present in the Client (minus the field references).
* Client.Call -- I had to move AlignmentContext from the Invokers back into the 
Client.Call object because connections can be shared across DFSClients and I 
was running into a major issue where a response was being sent back to the 
wrong AlignmentContext.
* NameNodeProxiesClient -- Because of the HAProxyFactory being used by 
FailoverProxyProviders, I had to re-add the overloaded 
createNonHAProxyWithClientProtocol as this is the only way to pass the 
AlignmentContext into the RpcEngine and finally into the Invoker(s) where it is 
needed to send request state via sendRpcRequest.
* HAProxyFactory -- I made a change here rather than overloading methods I 
added a default method {{setAlignmentContext}} that can optionally be 
overridden to actually make use of it. Otherwise it does nothing. Only 
ClientHAProxyProvider uses it. Calling that method is the trick to actually 
assigning an AlignmentContext. If this method is not called then no 
AlignmentContext is ever listening to requests and responses. Check how the 
test ProxyProviders work in TestStateAlignmentContextWithHA.
* TestStateAlignmentContext -- completely removed as now state contexts only 
exist in HA enabled. 
* TestStateAlignmentContextWithHA -- Added some example ProxyFailoverProviders 
and ways to listen to the state contexts.
* DFSClient -- all changes removed.

> 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, 
> HDFS-13399-HDFS-12943.003.patch, HDFS-13399-HDFS-12943.004.patch, 
> HDFS-13399-HDFS-12943.005.patch, HDFS-13399-HDFS-12943.006.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