Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-16677

Recalculate the remaining timeout millis correctly while throwing an InterupptedException in SocketIOWithTimeout.

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      In SocketIOWithTimeout, when a thread was interrupted and exit from select(), it proceed to throw an InterruptedIOException, in exception message the remaining timeout mills should be calcuated correctly rather than simply give a total timeout millis ,  which could be very misleading.

       

      An example log before this jira:

      2019-10-31 16:20:39,496 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Exception for BP-1895911599-192.168.202.11-1572488735889:blk_1073741833_1016
      java.io.InterruptedIOException: Interrupted while waiting for IO on channel java.nio.channels.SocketChannel[connected local=/192.168.202.12:50010 remote=/192.168.202.11:57006]. 60000 millis timeout left.
      at org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:351)
      at org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:157))

       

      An example log after this jira:

      2019-10-31 16:20:39,496 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Exception for BP-1895911599-192.168.202.11-1572488735889:blk_1073741833_1016
      java.io.InterruptedIOException: Interrupted while waiting for IO on channel java.nio.channels.SocketChannel[connected local=/192.168.202.12:50010 remote=/192.168.202.11:57006]. Total timeout mills is 60000, 1000 millis timeout left.
      at org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:351)
      at org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:157))

      Attachments

        1. HADOOP-16677.001.patch
          4 kB
          Xudong Cao

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            xudongcao Xudong Cao
            xudongcao Xudong Cao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment