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

Masatake Iwasaki commented on HDFS-10468:
-----------------------------------------

bq. But considering the current complexity of the DFSInputStream code, I do not 
plan to fix all of them in this jira.

I agree to fix this incrementally.

While testing the 002, same exception was logged multiple times because the 
exception thrown by {{DFSInputStream#checkInterrupted}} is passed to 
{{DFSInputStream#checkInterrupted}} again in outer scope. It might to be better 
to use debug level for logging in {{DFSInputStream#checkInterrupted}}.

{noformat}
2016-06-07 01:51:13,191 [Thread-84] WARN  impl.BlockReaderFactory 
(BlockReaderFactory.java:getRemoteBlockReaderFromTcp(758)) - I/O error 
constructing remote block reader.
java.io.InterruptedIOException: Interrupted while waiting for IO on channel 
java.nio.channels.SocketChannel[connected local=/127.0.0.1:37109 
remote=/127.0.0.1:34420]. 60000 millis timeout left.
        at 
org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:342)
        ...(snip)
2016-06-07 01:51:13,194 [Thread-84] WARN  hdfs.DFSClient 
(DFSInputStream.java:checkInterrupted(693)) - The reading thread has been 
interrupted.
java.io.InterruptedIOException: Interrupted while waiting for IO on channel 
java.nio.channels.SocketChannel[connected local=/127.0.0.1:37109 
remote=/127.0.0.1:34420]. 60000 millis timeout left.
        at 
org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:342)
        ...(snip)
2016-06-07 01:51:13,194 [Thread-84] WARN  hdfs.DFSClient 
(DFSInputStream.java:checkInterrupted(693)) - The reading thread has been 
interrupted.
java.io.InterruptedIOException: Interrupted while waiting for IO on channel 
java.nio.channels.SocketChannel[connected local=/127.0.0.1:37109 
remote=/127.0.0.1:34420]. 60000 millis timeout left.
        at 
org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:342)
        ...(snip)
{noformat}

I'm +1 if this is addressed.

> HDFS read ends up ignoring an interrupt
> ---------------------------------------
>
>                 Key: HDFS-10468
>                 URL: https://issues.apache.org/jira/browse/HDFS-10468
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Siddharth Seth
>            Assignee: Jing Zhao
>         Attachments: HDFS-10468.000.patch, HDFS-10468.001.patch, 
> HDFS-10468.002.patch, log
>
>
> If an interrupt comes in during an HDFS read - it looks like HDFS ends up 
> ignoring it (handling it), and retries the read after an interval.
> An interrupt should result in the read being cancelled, with an 
> InterruptedException being thrown.
> Similarly - if an HDFS op is started with the interrupt status on the thread 
> set, an InterruptedException should be thrown.
> cc [~jingzhao]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to