Details

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

    Description

      Currently we use TreeMap for node2blocks, actually there are only two place may need sorted: dump, getDatanodes. But getDatanodes is called by computeInvalidateWork, and we do a shuffle there, so the sort is unnecssary. For dump, certainly we need to make few modification.
      So we can use HashMap.

      From memory and performance view, HashMap is better than TreeMap, a simliar optimization HDFS-7433.

      Attachments

        1. HDFS-8795.001.patch
          2 kB
          Yi Liu
        2. HDFS-8795.002.patch
          1 kB
          Yi Liu

        Activity

          People

            hitliuyi Yi Liu
            hitliuyi Yi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: