[
https://issues.apache.org/jira/browse/ORC-842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
William Hyun closed ORC-842.
----------------------------
> Remove newKey from StringHashTableDictionary
> --------------------------------------------
>
> Key: ORC-842
> URL: https://issues.apache.org/jira/browse/ORC-842
> Project: ORC
> Issue Type: Improvement
> Components: Java
> Affects Versions: 1.8.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Fix For: 1.8.0
>
>
> 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.20.10#820010)