Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-842

Remove newKey from StringHashTableDictionary

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • Java
    • None

    Description

      In StringHashTableDictionary, there is an internal buffer called newKey.

      See if this can be removed. When calling set on newKey, there is actually a buffer copy performed:

      https://github.com/apache/hadoop/blob/6ac5d8a1ed6ec3f6de7af3b8a79869830a4377ee/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java#L240-L260

      So, for the method StringHashTableDictionary#add(byte[],int,int) the byte array is copied into the newKey and then it is copied into itself again in StringHashTableDictionary#add(Text). See if it can be removed, but at least remove it from the StringHashTableDictionary#add(Text) method. The input can be acted on directly since the Text object will not be modified.

      Attachments

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: