Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-554

BlockInfo.ensureCapacity may get a speedup from System.arraycopy()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.23.1
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      BlockInfo.ensureCapacity() uses a for() loop to copy the old array data into the expanded array. System.arraycopy() is generally much faster for this, as it can do a bulk memory copy. There is also the typesafe Java6 Arrays.copyOf() to consider, though here it offers no tangible benefit.

      1. HDFS-554.patch
        0.9 kB
        Harsh J
      2. HDFS-554.txt
        0.9 kB
        Harsh J
      3. HDFS-554.txt
        0.9 kB
        Harsh J

        Activity

        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Harsh J made changes -
        Fix Version/s 0.23.1 [ 12318885 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Target Version/s 0.23.1 [ 12318885 ]
        Eli Collins made changes -
        Target Version/s 0.23.1 [ 12318885 ]
        Harsh J made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Resolution Fixed [ 1 ]
        Harsh J made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Harsh J made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Harsh J made changes -
        Attachment HDFS-554.txt [ 12508666 ]
        Harsh J made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Harsh J made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Harsh J made changes -
        Attachment HDFS-554.txt [ 12507784 ]
        Harsh J made changes -
        Assignee Harsh J [ qwertymaniac ]
        Harsh J made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Harsh J made changes -
        Attachment HDFS-554.patch [ 12504505 ]
        Gavin made changes -
        Field Original Value New Value
        Reporter Steve Loughran [ steve_l ] Steve Loughran [ stevel@apache.org ]
        Steve Loughran created issue -

          People

          • Assignee:
            Harsh J
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development