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

Add a block counter to DatanodeDescriptor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.22.0
    • namenode
    • None
    • Reviewed

    Description

      Many of time, we need to count the total number of blocks in a datanode by calling DatanodeDescriptor#numBlocks(). It has to traverse the block list to get the counter, which may not be trivial if there are millions of blocks. Adding a counter for each datanode does not cost much space but help save CPU processing time.

      Attachments

        1. blockCounter.patch
          3 kB
          Hairong Kuang

        Activity

          People

            hairong Hairong Kuang
            hairong Hairong Kuang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: