[ 
https://issues.apache.org/jira/browse/HBASE-12597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jurriaan Mous updated HBASE-12597:
----------------------------------
    Attachment: HBASE-12597-v4.patch

New patch

- Moved the static constants to RpcClient interface. They are indeed pretty 
generic and I use them too in my implementation.
- RpcClient extends Closeable now and stop method is now called close()
- Moved out Call class from RpcClientImpl. I didn't use it in my async 
implementation, but maybe others can use it in another sync implementation.

bq.  Ditto Connection. If so, np. I suppose an RpcClient has a Connection? A 
single Connection? Or this is implementation detail? Or I supopse it is not... 
protocol is all around Connections. If so, how you doing this over in your 
client?

Connection is not a static class and is tightly linked into RpcClientImpl. It 
uses the socket factory and creates sockets which are pretty much tied into 
RpcClientImpl its implementation. In many ways it is the implementation of 
RpcClient. I had to create something new in my implementation based on Netty 
Channels. Maybe something reusable can be abstracted out of it to also simplify 
how I implemented it but I think that falls outside the scope of this issue. 
CallFuture is pretty small and a private static class. It is used in the 
internal queue. I couldn't use it for my implementation.
BlockingRpcChannelImplementation links to the call method in RpcClientImpl 
which is currently not in the RpcClient interface. And I would not like it to 
be in there since PayloadCarryingRpcController is currently not reusable in 
async context. Could be with some changes but I think they need some 
discussion, but somehow I think it is better to leave RpcClient as clean as 
possible so RpcClients can try out new things like doing without an 
PayloadCarryingRpcController.

bq. I beileve Anoop Sam John is refering to the 'release note' attribute of 
this here JIRA.

Ah I see. 

> 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-v1.patch, HBASE-12597-v2.patch, 
> HBASE-12597-v3.patch, HBASE-12597-v4.patch, 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)

Reply via email to