hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dhruba borthakur (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3008) SocketIOWithTimeout does not handle thread interruption
Date Thu, 13 Mar 2008 17:56:24 GMT

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

dhruba borthakur commented on HADOOP-3008:

+1 The code in SocketIOWithTimeout.java looks good.

I am a little worried about the test case though. because of the fixed timeout values in the
test, it might fail on some platforms. Maybe we can make the read wait infinitely without
a timeout and then send an interrupt to it and then verify that it exited. This might eliminate
having fixed timeouts.

> SocketIOWithTimeout does not handle thread interruption
> -------------------------------------------------------
>                 Key: HADOOP-3008
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3008
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.17.0
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>             Fix For: 0.17.0
>         Attachments: HADOOP-3008.patch, HADOOP-3008.patch
> If a thread is waiting in {{SocketIOWithTimeout.select()}} for IO and is interrupted
by another thread, select() returns zero. But current implementation does not check if the
thread is interrupted and goes back to waiting. But it should check if the thread is interrupted.
> In this case, I am thinking of throwing {{InterruptedIOException}} http://java.sun.com/j2se/1.5.0/docs/api/java/io/InterruptedIOException.html.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message