Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1368

Add a block counter to DatanodeDescriptor

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.22.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      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.

        Activity

        Hairong Kuang created issue -
        Hairong Kuang made changes -
        Field Original Value New Value
        Attachment blockCounter.patch [ 12453836 ]
        Hairong Kuang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags [Reviewed]
        Hairong Kuang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Konstantin Shvachko made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Hairong Kuang
            Reporter:
            Hairong Kuang
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development