You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Devaraj Das (JIRA)" <ji...@apache.org> on 2012/06/27 00:57:44 UTC

[jira] [Created] (HBASE-6279) Remove the RpcController argument from the PB methods' signatures

Devaraj Das created HBASE-6279:
----------------------------------

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

        

[jira] [Commented] (HBASE-6279) Remove the RpcController argument from the PB methods' signatures

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402421#comment-13402421 ] 

Devaraj Das commented on HBASE-6279:
------------------------------------

So in those cases where the interface extends proto-generated code, it seems like the RpcController cannot be avoided (at least I don't know if there is a way). For example, see AdminProtocol (in trunk) - it extends AdminService.BlockingInterface... 
But in the cases where the interface is written by hand (for example, HMasterInterface) the RpcController argument can be avoided. 
It makes sense to extend the proto-generated code to reduce maintenance burden. But yeah, then the RpcController will stick around.. 

[Meant to reply back yesterday, but forgot. Sorry]
                
> 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

        

[jira] [Commented] (HBASE-6279) Remove the RpcController argument from the PB methods' signatures

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401795#comment-13401795 ] 

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

Gary Helmling also talked about this issue in the context of how users might implement protocols for custom Endpoints. Any thoughts on how to hide RpcController there?
                
> 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

        

[jira] [Commented] (HBASE-6279) Remove the RpcController argument from the PB methods' signatures

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (HBASE-6279) Remove the RpcController argument from the PB methods' signatures

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402535#comment-13402535 ] 

Devaraj Das commented on HBASE-6279:
------------------------------------

Yeah, I agree that we don't need the RPC bits in the proto files. We could remove them, and instead define the RPCs with appropriate PB messages in the Java files...
                
> 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