[ https://issues.apache.org/jira/browse/HDFS-13399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16459341#comment-16459341 ]
Konstantin Shvachko edited comment on HDFS-13399 at 5/1/18 12:49 AM: --------------------------------------------------------------------- Spent a lot of time on this and finally realized what is the problem here. You are trying to convert {{ConfiguredFailoverProxyProvider}} into an observer proxy provider, which is not what we want. We want all existing proxy providers to work exactly as they are without {{AlignmentContext}}. And we want to create a new proxy provider, which has the {{AlignmentContext}}. Such provider will probably use a new factory, and will use new {{createProxy()}} methods, which will propagate {{AlignmentContext}} into {{RPCEngine}}(s) etc. This is targeted in HDFS-12976. Until then we cannot even build a test for that. Here are some more thoughts: # {{DFSClient}} should not be a holder of {{alignmentContext}} member. It should be a part of the {{StandbyReadProxyProvider}}. Proxy providers are in 1-1 mapping with clients, so it is the same thing. # {{alignmentContext}} in {{Invoker}} of RPC engine is probably unavoidable, mostly because we cannot change signature of {{invoke()}} call. # For {{ipc.Client}} it is better to move {{alignmentContext}} from {{Call}} into {{Connection}}, and set it in {{sendRpcRequest(Call, AlignmentContext)}} rather than in the constructor. I can send you a patch for that. I don't know if 2 and 3 belong to this jira or to HDFS-12976. In any case removing static {{AlignmentContext}} from {{Client}} still makes sense. Only your tests will not work until {{StandbyReadProxyProvider}} is introduced. Hold on to them until then. was (Author: shv): Spent a lot of time on this and finally realized what is the problem here. You are trying to convert {{ConfiguredFailoverProxyProvider}} into an observer proxy provider, which is not what we want. We want all existing proxy providers to work exactly as they are without {{AlignmentContext}}. And we want to create a new proxy provider, which has the {{AlignmentContext}}. Such provider will probably use a new factory, and will use new {{createProxy()}} methods, which will propagate {{AlignmentContext}} into {{RPCEngine}}(s) etc. This is targeted in HDFS-12976. Until then we cannot even build a test for that. Here are some more thoughts: # {{DFSClient}} should not be a holder of {{alignmentContext}} member. It should be a part of the {{StandbyReadProxyProvider}}. Proxy providers are in 1-1 mapping with clients, so it is the same thing. # {{alignmentContext}} in {{Invoker}} of RPC engine is probably unavoidable, mostly because we cannot change signature of {{invoke()}} call. # For {{ipc.Client}} it is better to move {{alignmentContext}} from {{Call}} into {{Connection}}, and set it in sendRpcRequest(Call, AlignmentContext)}} rather than in the constructor. I can send you a patch for that. I don't know if 2 and 3 belong to this jira or to HDFS-12976. In any case removing static {{AlignmentContext}} from {{Client}} still makes sense. Only your tests will not work until {{StandbyReadProxyProvider}} is introduced. Hold on to them until then. > 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 > > > 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