Gopal V created HADOOP-9612:
-------------------------------
Summary: HADOOP client IPC layer should differentiate between
interrupted threads and interrupts occurring during operations
Key: HADOOP-9612
URL: https://issues.apache.org/jira/browse/HADOOP-9612
Project: Hadoop Common
Issue Type: Bug
Affects Versions: 2.0.5-beta
Environment: Ubuntu / x86_64
Reporter: Gopal V
Assignee: Gopal V
Priority: Trivial
Hadoop IPC throws misleading wrapped exceptions when operations are performed
on threads which have already been interrupted.
When a thread is already interrupted, the client IPC throws the following
exception
{code}
Exception in thread "main" java.io.IOException:
...
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:761)
at org.apache.hadoop.ipc.Client.call(Client.java:1270)
at org.apache.hadoop.ipc.Client.call(Client.java:1218)
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:202)
at $Proxy9.getBlockLocations(Unknown Source)
{code}
This is completely indistinguishable between a real interruption happening to
the thread during the client call and very misleading.
Before client calls, it would be prudent to check for the
currentThread().isInterrupted() flag and throw a different exception to
indicate the thread was already interrupted before the operation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira