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

Chris Douglas commented on HADOOP-6221:
---------------------------------------

* At RPC.java:415, won't the following call to {{Thread.sleep()}} check if the 
interrupt flag is set? Is the explicit check required?
* According to the 
[docs|http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#interrupt%28%29],
 a thread blocked a a {{Selector}} should set the interrupt flag and return, 
rather than throwing {{InterruptedIOException}}, but I'm not sure the rest of 
the RPC stack is consistent. HDFS seems to use it this way, so this is arguably 
correct.

AFAIK, the only way to forcibly interrupt some IO operations is to close the 
channel from outside the thread, but implementing that would be more invasive.

+1 overall

> RPC Client operations cannot be interrupted
> -------------------------------------------
>
>                 Key: HADOOP-6221
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6221
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 0.21.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-6221-007.patch, HADOOP-6221-008.patch, 
> HADOOP-6221.patch, HADOOP-6221.patch, HADOOP-6221.patch, HADOOP-6221.patch, 
> HADOOP-6221.patch, HADOOP-6221.patch
>
>
> RPC.waitForProxy swallows any attempts to interrupt it while waiting for a 
> proxy; this makes it hard to shutdown a service that you are starting; you 
> have to wait for the timeouts. 
> There are only 4-5 places in the code that use either of the two overloaded 
> methods, removing the catch and changing the signature should not be too 
> painful, unless anyone is using the method outside the hadoop codebase. 



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

Reply via email to