hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12012) Improve cancellation for the scan RPCs
Date Fri, 19 Dec 2014 19:04:14 GMT

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

stack commented on HBASE-12012:
-------------------------------

bq. Updated patch trying to incorporate stack's last comment. stack, in my opinion, the CancellableCallable
is okay. In addition, this is a private interface and if needed can be changed in the future.

You say it is 'okay' in your opinion. Want to make an argument why?  If it was a Decoration,
this could be a little cleaner:

98	  class ReplicaRegionServerCallable extends RegionServerCallable<Result>
99	  implements CancellableCallable<Result> {


isCanceled should have two els in it: i.e. isCancelled. (Here too ---> 85	      canceled
= true; and here....

90	    public boolean isCancelled() {
91	      return canceled;
...
)

You are not implying that because the Interface is private, we can be lax about what is committed?

What is 'startCancel'?  Why not just 'cancel'?  In your patch, you actually have this:

83	      retryingCaller.cancel();
84	      future.startCancel();

You are cancelling the retryingcaller and then you are startCancel the future ... cancel it
too?

Here is example from old JDK of what I think of when I see an Interface with Cancellable in
it:

http://nick-lab.gs.washington.edu/java/jdk1.5b/api/java/util/concurrent/Cancellable.html

It is necessary undoing the private here?

73	  final RpcRetryingCallerFactory rpcRetryingCallerFactory;

Rest of the patch looks good.  Any chance of a test for new functionality?

(An argument you could make for your new Interface and its 'odd' method namings is that RpcController
has this so you were following a pattern...... ditto with your spelling of isCanceled... but
it unorthodox and makes your Interface a little odd to read (see above examples))

> Improve cancellation for the scan RPCs
> --------------------------------------
>
>                 Key: HBASE-12012
>                 URL: https://issues.apache.org/jira/browse/HBASE-12012
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Devaraj Das
>            Assignee: Devaraj Das
>             Fix For: 2.0.0, 1.1.0
>
>         Attachments: 12012-1.txt, 12012-2.txt, 12012-3.txt, 12012-4.txt
>
>
> Similar to HBASE-11564 but for scans.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message