[
https://issues.apache.org/jira/browse/HIVE-19041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470954#comment-16470954
]
Misha Dmitriev commented on HIVE-19041:
---------------------------------------
Thank you for looking into the details, [~vihangk1] I've checked the code and I
agree with you - these strings are really short-lived. Furthemore, the worst
offenders,
{{{{org.apache.hadoop.hive.metastore.model.MStorageDescriptor.inputFormat,outputFormat}}}},
are actually copies of the corresponding fields of {{StorageDescriptor}}. That
is, they reference the same string instances. So as soon as you intern the
strings in {{StorageDescriptor}}, {{MStorageDescriptor}} will stop referencing
duplicate strings as well.
Thus, this patch is good to go from my prospective.
> Thrift deserialization of Partition objects should intern fields
> ----------------------------------------------------------------
>
> Key: HIVE-19041
> URL: https://issues.apache.org/jira/browse/HIVE-19041
> Project: Hive
> Issue Type: Improvement
> Components: Metastore
> Affects Versions: 3.0.0, 2.3.2
> Reporter: Vihang Karajgaonkar
> Assignee: Vihang Karajgaonkar
> Priority: Major
> Attachments: HIVE-19041.01.patch, HIVE-19041.02.patch,
> HIVE-19041.03.patch, HIVE-19041.04.patch
>
>
> When a client is creating large number of partitions, the thrift objects are
> deserialized into Partition objects. The read method of these objects does
> not intern the inputformat, location, outputformat which cause large number
> of duplicate Strings in the HMS memory. We should intern these objects while
> deserialization to reduce memory pressure.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)