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

Erik Krogen commented on HDFS-14162:
------------------------------------

Thanks for looking [~shv]. Unfortunately, not quite. Let's take 
{{BalancerProtocol extends NamenodeProtocol, ClientProtocol}} as an example. 
The underlying proxies are of type {{NamenodeProtocolPB}} and 
{{ClientProtocolPB}}, classes autogenerated by Protobuf. If we do like:
{code}newProxyInstance(..., new Class[] { NamenodeProtocolPB.class, 
ClientProtocolPB.class }, ... {code}
we get back a proxy which is both a {{NamenodeProtocolPB}} and a 
{{ClientProtocolPB}}. Now how do we translate this into a {{BalancerProtocol}}? 
We would need to write a {{BalancerProtocolTranslatorPB}} which takes in an 
object, verifies it is both a {{NamenodeProtocolPB}} and a 
{{ClientProtocolPB}}, and then delegates the translation to the relevant 
translator... So the same type of delegation I'm doing now, but it took a lot 
more work to achieve it.

Alternatively, we could define a new {{BalancerProtocol.proto}} and then 
instantiate a proxy of type {{BalancerProtocolPB}}. Unfortunately Protobuf 
services don't support inheritance, so we would have to copy-paste all of the 
{{rpc}} definitions from both of the other proto files, and we're still left 
with the problem of how to deal with the translator.


> Balancer should work with ObserverNode
> --------------------------------------
>
>                 Key: HDFS-14162
>                 URL: https://issues.apache.org/jira/browse/HDFS-14162
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Konstantin Shvachko
>            Assignee: Erik Krogen
>            Priority: Major
>         Attachments: HDFS-14162-HDFS-12943.wip0.patch, HDFS-14162.000.patch, 
> testBalancerWithObserver.patch
>
>
> Balancer provides a substantial RPC load on NameNode. It would be good to 
> divert Balancer RPCs {{getBlocks()}}, etc. to ObserverNode. The main problem 
> is that Balancer uses {{NamenodeProtocol}}, while ORPP currently supports 
> only {{ClientProtocol}}.



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