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

Nicolas Liochon commented on HBASE-10525:
-----------------------------------------

bq. I dont follow the above exactly?
It's basically a Java issue. Interrupting a process that is doing some i/o is 
complex, and difficult to do in the same way on all platforms. So the JVM guys 
went for the solution that was implementable on all platforms: close the socket 
when there is an interrupt.

bq. What will 'name' be?
The same name as the reader, postfixed with 'writer').

bq. yet another thread in client seems crazy
Yeah. But I think that we're not far from being able to put a single pool for 
all the region servers, instead of 1 thread per region server as today (and 
with this new option on). There is this nasty rpcTimeout, and then we're clean 
enough to do the change I think. It's something I would like to do with a 
direct buffer write. Ir's more or less mandatory to scale on large sized 
cluster imho.

bq. ThreadCallSender should be CallRunner or Call Executor
I don't know. It does not execute much, it just writes on the socket.  It uses 
the output stream of the connection, so it has to be an instance if I want to 
limit the impact on the existing code.

bq. + callsToWrite.remove(cts); Do you have to cancel the future itself too?
setting call.done allows the reading thread to skip this part
removing it from the callsToWrite list allows us to not send the call to the 
remote server at all.
So we do both.
Now if the call was sent to the server, it's not stopped (at least with this 
patch :-), just that we will skip the answer. Canceling on the server is 
interesting, but on the other hand it's another rpc call.

bq. Imlement Closeable since it has a close? Not necessary at all but... 
agreed. Will do.

bq. Can you write up a big class comment on the mechanism you are instituting 
here so it is clear what is going on both for reviewers and for the folks who 
come along afterward trying to make sense of it all
Sure. I'm polishing a doc as well that I will put in this jira.


> Allow the client to use a different thread for writing to ease interrupt
> ------------------------------------------------------------------------
>
>                 Key: HBASE-10525
>                 URL: https://issues.apache.org/jira/browse/HBASE-10525
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.99.0
>            Reporter: Nicolas Liochon
>            Assignee: Nicolas Liochon
>             Fix For: 0.99.0
>
>         Attachments: 10525.v1.patch, 10525.v2.patch
>
>
> This is an issue in the HBASE-10070 context, but as well more generally if 
> you want to interrupt an operation with a limited cost. 
> I will attach a doc with a more detailed explanation.
> This adds a thread per region server; so it's otional. The first patch 
> activates it by default to see how it behaves on a full hadoop-qa run. The 
> target is to be unset by default.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to