Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10677 Über-jira: Enhancements to NNThroughputBenchmark tool
  3. HDFS-9484

NNThroughputBenchmark$BlockReportStats should not send empty block reports

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • test
    • None
    • Reviewed

    Description

      There are two potential bugs that make the NNThroughputBenchmark$BlockReportStats send empty block reports.

      1. In NNThroughputBenchmark$BlockReportStats#formBlockReport(), the blockReportList is always BlockListAsLongs.EMPTY. We should construct the block report list by encoding generated blocks in test.
      2. TinyDatanode#blocks is an empty ArrayList with initial capacity. In TinyDatanode#addBlock() first statement, the if(nrBlocks == blocks.size()) { will always be true. We should either fill the blocks with dummy report in TinyDatanode() constructor, or use initial capacity instead of blocks.size() in the above if statement (we should replace ArrayList#set with ArrayList#add as well).

      Attachments

        1. HDFS-9484.001.patch
          2 kB
          Mingliang Liu
        2. HDFS-9484.000.patch
          2 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: