[
https://issues.apache.org/jira/browse/HADOOP-14084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946462#comment-15946462
]
Tsz Wo Nicholas Sze commented on HADOOP-14084:
----------------------------------------------
We need to decide what is the expected behavior of joinThread(..) when it is
interrupted. The behavior probably depends on which thread it is joining. In
our case, it is joining the errThread. Then, I think re-throwing the
InterruptedException is fine, i.e. something similar to HADOOP-14084.000.patch.
BTW, please see if you could add a test.
> Shell.joinThread swallows InterruptedException
> ----------------------------------------------
>
> Key: HADOOP-14084
> URL: https://issues.apache.org/jira/browse/HADOOP-14084
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Shixiong Zhu
> Assignee: Xiaobing Zhou
> Priority: Minor
> Attachments: HADOOP-14084.000.patch, HADOOP-14084.001.patch
>
>
> In "Shell.joinThread", when the user tries to interrupt the thread that runs
> Shell.joinThread, it will catch InterruptedException and propagate it to
> thread t. However, it doesn't set the interrupt state of the current thread
> before returning, so the user codes won't know it's already interrupted.
> See
> https://github.com/apache/hadoop/blob/9e19f758c1950cbcfcd1969461a8a910efca0767/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java#L1035
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]