[ https://issues.apache.org/jira/browse/HBASE-12597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14230255#comment-14230255 ]
stack commented on HBASE-12597: ------------------------------- On your patch, what if RpcClient was the interface and the current RpcClient was moved to be a RpcClientImpl? RpcClient is marked @InterfaceAudience.Private so you are free to change it (no one should be referencing other than hbase internals) Add a license to head of the file RpcClientInterface Do we need a start in the Interface? Or does calling createBlockingRpcChannel serve this purpose? In below, it takes a hostname and a port where createBlockingRpcChannel takes a ServerName. They should be the same? public void cancelConnections(String hostname, int port); Otherwise, looks good. > Add RpcClient interface and enable changing of RpcClient implementation > ----------------------------------------------------------------------- > > Key: HBASE-12597 > URL: https://issues.apache.org/jira/browse/HBASE-12597 > Project: HBase > Issue Type: Improvement > Components: Client > Reporter: Jurriaan Mous > Attachments: HBASE-12597.patch > > > Currently HConnectionImplementation works with the included RpcClient which > is a direct implementation and not defined by an interface. > It would be great to be able to swap out the default RpcClient with another > implementation which can also be controlled by the default > HConnectionImplementation. > Suggested changes: > - Create a RpcClient interface which defines all the ways > HConnectionImplementation interacts with an RPC client. Like getting a > blocking protobuf service interface or closing the client. > - Define which RpcClient implementation to construct by setting a > configuration variable which defaults to the current RpcClient. > - Possibly create an abstract RpcClient class to only load all the basic Rpc > layer configurations to be used in an implementation. > Why? It enables experimentation with RpcClients which could enable new > features or could be more performant than the included client. > I created a new RpcClient implementation based on Netty which can also be > called asynchronously. It would be great to also be able to use this > RpcClient in all the default ways and tests to see if there are any issues > with it. > https://github.com/jurmous/async-hbase-client/ > https://github.com/jurmous/async-hbase-client/blob/master/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java -- This message was sent by Atlassian JIRA (v6.3.4#6332)