David Mollitor created ORC-842:
----------------------------------

             Summary: Remove newKey from StringHashTableDictionary
                 Key: ORC-842
                 URL: https://issues.apache.org/jira/browse/ORC-842
             Project: ORC
          Issue Type: Improvement
            Reporter: David Mollitor
            Assignee: David Mollitor


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to