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

On a busy cluster, it is possible for the client to believe it cannot fetch a block when the client or datanodes are running slowly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • None
    • 100 node cluster, fedora, 1TB disk per machine available for HDFS (two spindles) 16GB RAM, 8 cores
      running datanode, TaskTracker, HBaseRegionServer and the task being executed by the TaskTracker.

    Description

      On a heavily loaded node, the communication between a DFSClient can time out or fail leading DFSClient to believe the datanode is non-responsive even though the datanode is, in fact, healthy. It may run through all the retries for that datanode leading DFSClient to mark the datanode "dead".

      This can continue as DFSClient iterates through the other datanodes for the block it is looking for, and then DFSClient will declare that it can't find any servers for that block (even though all n (where n = replication factor) datanodes are healthy (but slow) and have valid copies of the block.

      It is also possible that the process running the DFSClient is too slow and misses (or times out) responses from the data node, resulting in the DFSClient believing that the datanode is dead.

      Another possibility is that the block has been moved from one or more datanodes since DFSClient$DFSInputStream.chooseDataNode() found the locations of the block.

      When the retries for each datanode and all datanodes are exhausted, DFSClient$DFSInputStream.chooseDataNode() issues the warning:

                if (nodes == null || nodes.length == 0) {
                  LOG.info("No node available for block: " + blockInfo);
                }
                LOG.info("Could not obtain block " + block.getBlock() + " from any node:  " + ie);
      

      It would be an improvement, and not impact performance under normal conditions if when DFSClient decides that it cannot find the block anywhere, for it to retry finding the block by calling

      private static LocatedBlocks callGetBlockLocations()
      

      once , to attempt to recover from machine(s) being too busy, or the block being relocated since the initial call to callGetBlockLocations(). If the second attempt to find the block based on what the namenode told DFSClient, then issue the messages and give up by throwing the exception it does today.

      Attachments

        Activity

          People

            tlipcon Todd Lipcon
            jimk Jim Kellerman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: