You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/14 21:27:00 UTC

[jira] [Resolved] (HBASE-6995) Expose PB BlockingInterface implementations for coprocessor endpoints

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

Andrew Kyle Purtell resolved HBASE-6995.
----------------------------------------
    Resolution: Won't Fix

> Expose PB BlockingInterface implementations for coprocessor endpoints
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6995
>                 URL: https://issues.apache.org/jira/browse/HBASE-6995
>             Project: HBase
>          Issue Type: Improvement
>          Components: Coprocessors
>    Affects Versions: 0.95.2
>            Reporter: Gary Helmling
>            Priority: Major
>
> This is a follow on to HBASE-5448 to improve the semantics exposed to clients for multi-region coprocessor endpoint RPCs.
> As discussed over in HBASE-6785 (the conversion of AggregateProtocol to PB service), the currently exposed PB services result in a lot of boilerplate code on the client side.  For example, duplication of code like:
> {code:java}
> AggregateResponse response = rpcCallback.get();
> if (controller.failedOnException()) {
>   throw controller.getFailedOn();
> }
> {code}
> This also forces clients to do explicit handling to propagate exceptions.  It seems like we could completely avoid the duplication and exception throwing if we provided a way for clients to use BlockingService instances.  In that case, sections like:
> {code:java}
> ServerRpcController controller = new ServerRpcController();
> BlockingRpcCallback<AggregateResponse> rpcCallback =
>     new BlockingRpcCallback<AggregateResponse>();
> instance.getMedian(controller, requestArg, rpcCallback);
> AggregateResponse response = rpcCallback.get();
> if (controller.failedOnException()) {
>   throw controller.getFailedOn();
> }
> {code}
> could become something like:
> {code:java}
> ServerRpcController controller = new ServerRpcController();
> AggregateResponse response = instance.getMedian(controller, requestArg);
> {code}
> where the call to {{instance.getMedian()}} through the blocking interface would wrap any encountered {{IOException}} in a {{ServiceException}}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)