Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8160

Long delays when calling hdfsOpenFile()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.2
    • None
    • libhdfs
    • None

    Description

      Calling hdfsOpenFile on a file residing on target 3-node Hadoop cluster (described in detail in Environment section) blocks for a long time (several minutes). I've noticed that the delay is related to the size of the target file.
      For example, attempting to hdfsOpenFile() on a file of filesize 852483361 took 121 seconds, but a file of 15458 took less than a second.

      Also, during the long delay, the following stacktrace is routed to standard out:

      2015-04-16 10:32:13,943 WARN [main] hdfs.BlockReaderFactory (BlockReaderFactory.java:getRemoteBlockReaderFromTcp(693)) - I/O error constructing remote block reader.
      org.apache.hadoop.net.ConnectTimeoutException: 60000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/10.40.8.10:50010]
      at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:533)
      at org.apache.hadoop.hdfs.DFSClient.newConnectedPeer(DFSClient.java:3101)
      at org.apache.hadoop.hdfs.BlockReaderFactory.nextTcpPeer(BlockReaderFactory.java:755)
      at org.apache.hadoop.hdfs.BlockReaderFactory.getRemoteBlockReaderFromTcp(BlockReaderFactory.java:670)
      at org.apache.hadoop.hdfs.BlockReaderFactory.build(BlockReaderFactory.java:337)
      at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:576)
      at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:800)
      at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:854)
      at org.apache.hadoop.fs.FSDataInputStream.read(FSDataInputStream.java:143)
      2015-04-16 10:32:13,946 WARN [main] hdfs.DFSClient (DFSInputStream.java:blockSeekTo(612)) - Failed to connect to /10.40.8.10:50010 for block, add to deadNodes and continue. org.apache.hadoop.net.ConnectTimeoutException: 60000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/10.40.8.10:50010]
      org.apache.hadoop.net.ConnectTimeoutException: 60000 millis timeout while waiting for channel to be ready for connect. ch : java.nio.channels.SocketChannel[connection-pending remote=/10.40.8.10:50010]
      at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:533)
      at org.apache.hadoop.hdfs.DFSClient.newConnectedPeer(DFSClient.java:3101)
      at org.apache.hadoop.hdfs.BlockReaderFactory.nextTcpPeer(BlockReaderFactory.java:755)
      at org.apache.hadoop.hdfs.BlockReaderFactory.getRemoteBlockReaderFromTcp(BlockReaderFactory.java:670)
      at org.apache.hadoop.hdfs.BlockReaderFactory.build(BlockReaderFactory.java:337)
      at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:576)
      at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:800)
      at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:854)
      at org.apache.hadoop.fs.FSDataInputStream.read(FSDataInputStream.java:143)

      I have also seen similar delays and stacktrace printout when executing dfs CL commands on those same files (df -cat, df -tail, etc.).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rpastrana Rod
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: