Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11323

WritableComparator#compare keeps reference to byte array

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.7.0
    • performance
    • None

    Description

      When the default compare is used on a WritableComparator a reference to the second passed in byte array is kept in the buffer. Since WritableComparator keeps a reference to the buffer the byte will never be garbage collected. This can lead to a higher heap use than needed.

      The buffer should drop the reference to the byte array passed in. We can null out the byte array reference since the buffer is a private variable for the class.

      Attachments

        1. HADOOP-11323.patch
          0.8 kB
          wilfreds#1

        Activity

          People

            wilfreds Wilfred Spiegelenburg
            wilfreds Wilfred Spiegelenburg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: