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

Andrew Purtell commented on HBASE-6279:
---------------------------------------

> It makes sense to extend the proto-generated code to reduce maintenance 
> burden.

Maybe not. From https://developers.google.com/protocol-buffers/docs/cpptutorial:
{quote}
If you want to add richer behaviour to a generated class, the best way to do 
this is to wrap the generated protocol buffer class in an application-specific 
class. ... You should never add behaviour to the generated classes by 
inheriting from them. This will break internal mechanisms and is not good 
object-oriented practice anyway.
{quote}

Of course this refers to the message classes, but regards protobuf's "RPC 
support" why not just use the message objects and leave out the RPC bits from 
proto files? There is no actual RPC implementation provided by the protobuf 
compiler or library, and there are classes such as RpcController that don't 
make sense and are polluting the interfaces.
                
> Remove the RpcController argument from the PB methods' signatures
> -----------------------------------------------------------------
>
>                 Key: HBASE-6279
>                 URL: https://issues.apache.org/jira/browse/HBASE-6279
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Devaraj Das
>
> I don't see a reason for having the RPC methods (like HMasterInterface) 
> define methods with the RpcController argument (which is always passed as 
> null during invocation). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to