hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duo Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17346) Add coprocessor service support
Date Sat, 28 Jan 2017 06:47:24 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843937#comment-15843937

Duo Zhang commented on HBASE-17346:

Do s/done/callback/g I'd say. 'done' I don't get when I see it in your javadoc example. 'callback'
I can follow and 'callback' makes it look like a protobuf service invocation.
'done' is the name of the RpcCallback for a method in a protobuf service, see this:
      public abstract void getMax(
          com.google.protobuf.RpcController controller,
          org.apache.hadoop.hbase.protobuf.generated.AggregateProtos.AggregateRequest request,
That's why I always use '(stub, controller,  done) -> stub.xxx(controller, request, done)'
as the example. For me 'done' and 'callback' are both OK. I'm not sure which one is better.

Javadoc talks of whenComplete and onComplete?
'whenComplete' is 'CompletableFuture.whenComplete'. The pseudo code just wang to show you
how CoprocessorCallback will be called during a ranged coprocessor service call.

We have onRegionComplete and onComplete in the Interface but onRegionComplete is not called
any more? Or if onRegionComplete, then it happens when we are totally done with the region?
Oh sorry for my English, I mean 'no more onRegionComplete calls in the future'. You can see
the pseudo code. We will start locating from the startKey. When locating complete, if we have
not covered the whole range, then send another locating request. At the same time, we will
send the actual coprocessor call to the located region. When we get the response of the region,
we either call onRegionComplete or onRegionError. If we have already sent all the requests,
and there is no pending request, then we call onComplete.

> Add coprocessor service support
> -------------------------------
>                 Key: HBASE-17346
>                 URL: https://issues.apache.org/jira/browse/HBASE-17346
>             Project: HBase
>          Issue Type: Sub-task
>          Components: asyncclient, Client, Coprocessors
>    Affects Versions: 2.0.0
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>             Fix For: 2.0.0
>         Attachments: 17346.suggestion.txt, HBASE-17346.patch, HBASE-17346-v1.patch, HBASE-17346-v2.patch,
> I think we need to redesign the API.

This message was sent by Atlassian JIRA

View raw message