[
https://issues.apache.org/jira/browse/HBASE-16668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15510801#comment-15510801
]
Stephen Yuan Jiang edited comment on HBASE-16668 at 9/21/16 6:42 PM:
---------------------------------------------------------------------
My take is that we can live with async (already live with async in the past)
and I don't see much benefit to have a sync version (also the trend in client
moves towards async). Unless there is a demand (and it would be really easy to
add the sync method, figuring out the name everyone accepts probably would
take longer than coding :-)), there is no need to add sync version.
was (Author: syuanjiang):
My take is that we can live with async (already live with async in the past)
and I don't see much benefit to have a sync version (also the trend in client
moves towards async). Unless there is a demand (and it would be really easy to
add the sync method, figuring out the name everyone accepts probably would
take longer than coding :-)).
> Admin class should have a synchronous Admin#mergeRegions* method
> -----------------------------------------------------------------
>
> Key: HBASE-16668
> URL: https://issues.apache.org/jira/browse/HBASE-16668
> Project: HBase
> Issue Type: Bug
> Components: hbase
> Affects Versions: 2.0.0
> Reporter: Jonathan Hsieh
> Fix For: 2.0.0
>
>
> In trunk from HBASE-14552, we have deprecated {{void Admin#mergeRegions}} (in
> 1.x this was an asynchronous call) and replaced it with {{Future<Void>
> Admin#mergeRegionsAsync}} which is clearly async.
> This leaves us only with the async version.
> We should have an easy way to make {{mergeRegions}} or an equivalant behave
> synchronously.
> For normal java Futures, we could just call the future's {{get()}} method.
> Unforutnately, the future this method returns doesn't follow java Future
> convention and throws Unimplemented operation when a plain {{get()}} is
> called and makes the api harder to use and read. We could make this future
> act more normally, and have the timeout throw an InterruptedException.
> Alternately, we could expose a new method in {{Admin}} that behaves
> synchronously such as {{HBaseAdmin#mergeRegionsSync}}. The caveat here is
> that we shouldn't use the name {{#mergeRegions}} since it exists in 1.x with
> async semantics.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)