Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-644

Set HDFS node affinity on created HFiles to improve locality

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      When creating HFiles via the HFileUtils.writeToHFilesForIncrementalLoad method, the underlying HDFS blocks of the created HFiles will end up on a selection of HDFS data nodes – the selection of which nodes is left up to the HDFS Namenode. This means that there is a relatively small chance (depending on cluster size and replication factor) that the created HFiles will end up on the same physical machine as the region server which will make use of these HFiles, which limits the ability to use short-circuit reads to the local file system. Typically, this lack of locality is only really completely resolved after a major compaction.

      It's possible to set a node affinity on HDFS files at creation time, to provide a suggestion to the namenode about a preferred data node for blocks to be located on. The intention of this ticket is to make use of this functionality to set the node affinity during HFile creation in HFileUtils.writeToHFilesForIncrementalLoad so that at least one (HDFS) block of each created HFile will be located on the same physical machine as the region server which will be using the file (assuming HDFS data nodes are running on the same machines as HBase region servers).

      Attachments

        1. CRUNCH-644.patch
          22 kB
          Gabriel Reid

        Activity

          People

            gabriel.reid Gabriel Reid
            gabriel.reid Gabriel Reid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: