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

Duo Zhang updated HBASE-21512:
------------------------------
    Release Note: 
Reimplement sync client based on async client, the old code for sync client 
have been purged.

Most public APIs are kept, except:

1. coprocessor related methods in sync client interface have been marked as 
deprecated. This is because that these methods may reference methods from the 
BlockingInterface of a protobuf stub, so we have to use a thread pool to 
execute these methods which are not good. Please use the coprocessor methods in 
async client interface instead.

2. BufferedMutatorParams.setWriteBufferPeriodicFlushTimerTickMs has been marked 
as deprecated. It has no effect now, just kept for compatibility. We use a 
global timer per connection so you can not customize the tick any more.

3. BufferedMutatorParams.implementationClassName has been marked as deprecated. 
It has no effect now, as we will pass several internal stuff to the constructor 
when creating the implementation instance, which is not good. We should find 
another way to do it.

4. The behavior for the two Admin.split methods is changed a bit. Now when the 
methods return, the split should have been done, while in the past it just 
means we have send the request out.

5. Now most(non-deprecated) methods in Admin and Table interface do not accept 
null values any more.

6. LoadIncrementalHFiles has been removed. It was marked as deprecated in 2.2.0 
so by default is should only be removed in 4.0.0. But it is an implementation 
class, neither an interface nor a data structure, it is not a good practice to 
make it public as it exposes several internal states, and is also easily to be 
misused in the future, so we just remove it in 3.0.0. Users can use 
BulkLoadHFiles in your code, and there is no difference when executing bulk 
load from command line.

And we also introduce a toAsyncConnection method in the Connection interface, 
and also a toConnection method in the AsyncConnection interface. They are both 
lightweighted operations, the returned instance will share the same connection 
to the hbase cluster, so you can easily convert Connection to AsyncConnection 
and vice visa.

For internal developers, the ClusterConnection has also been purged. Please use 
the new AsyncClusterConnection instead, and please also see the 
AsyncRegionServerAdmin, which wraps the call to a region server. There is no 
sync interface any more, please use FutureUtils.get on the returned Future if 
you want the sync behavior. And also the ShortCircultConnection has been 
removed, as now we will use async stub but our RpcServices only implement 
BlockingInterface.

  was:
Reimplement sync client based on async client, the old code for sync client 
have been purged.

Most public APIs are kept, except:

1. coprocessor related methods in sync client interface have been marked as 
deprecated. This is because that these methods may reference methods from the 
BlockingInterface of a protobuf stub, so we have to use a thread pool to 
execute these methods which are not good. Please use the coprocessor methods in 
async client interface instead.

2. BufferedMutatorParams.setWriteBufferPeriodicFlushTimerTickMs has been marked 
as deprecated. It has no effect now, just kept for compatibility. We use a 
global timer per connection so you can not customize the tick any more.

3. BufferedMutatorParams.implementationClassName has been marked as deprecated. 
It has no effect now, as we will pass several internal stuff to the constructor 
when creating the implementation instance, which is not good. We should find 
another way to do it.

4. The behavior for the two Admin.split methods is changed a bit. Now when the 
methods return, the split should have been done, while in the past it just 
means we have send the request out.

5. Now most(non-deprecated) methods in Admin and Table interface do not accept 
null values any more.

6. LoadIncrementalHFiles has been removed. It was marked as deprecated in 2.2.0 
so by default is should only be removed in 4.0.0. But it is an implementation 
class, neither an interface nor a data structure, it is not a good practice to 
make it public as it exposes several internal states, and is also easily to be 
misused in the future, so we just remove it in 3.0.0. Users can use 
BulkLoadHFiles in your code, and there is no difference when executing bulk 
load from command line.

And we also introduce a toAsyncConnection method in the Connection interface, 
and also a toConnection method in the AsyncConnection interface. They are both 
lightweighted operations, the returned instance will share the same connection 
to the hbase cluster, so you can easily convert Connection to AsyncConnection 
and vice visa.

For internal developers, the ClusterConnection has also been purged. Please use 
the new AsyncClusterConnection instead, and please also see the 
AsyncRegionServerAdmin, which wraps the call to a region server. There is no 
sync interface any more, please use FutureUtils.get on the returned Future if 
you want the sync behavior.


> Reimplement sync client based on async client
> ---------------------------------------------
>
>                 Key: HBASE-21512
>                 URL: https://issues.apache.org/jira/browse/HBASE-21512
>             Project: HBase
>          Issue Type: Umbrella
>          Components: asyncclient, Client
>            Reporter: Duo Zhang
>            Priority: Major
>             Fix For: 3.0.0
>
>
> At least for the RSProcedureDispatcher, with CompletableFuture we do not need 
> to set a delay and use a thread pool any more, which could reduce the 
> resource usage and also the latency.
> Once this is done, I think we can remove the ClusterConnection completely, 
> and start to rewrite the old sync client based on the async client, which 
> could reduce the code base a lot for our client.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to