[ https://issues.apache.org/jira/browse/HIVE-6579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13930012#comment-13930012 ]
xieyuchen commented on HIVE-6579: --------------------------------- [~xuefuz] thanks for your reply. Except the testing code, there are actually 2 callers of this constructor: o.a.h.h.ql.Driver.acquireReadWriteLocks and o.a.h.h.ql.exec.DDLTask.lockTable The first situation will be fix in this patch. I think the second one will not cause oom. But if we have to keep HiveLockObjectData.queryStr trimmed, we can keep the trimming call in the constructor. > HiveLockObjectData constructor makes too many queryStr instance causing oom > --------------------------------------------------------------------------- > > Key: HIVE-6579 > URL: https://issues.apache.org/jira/browse/HIVE-6579 > Project: Hive > Issue Type: Improvement > Reporter: xieyuchen > Attachments: HIVE-6579.1.patch.txt > > > We have a huge sql which full outer joins 10+ partitoned tables, each table > has at least 1k partitions. The sql has 300kb in length(it constructed > automatically of cause). > So when we running this sql, there are over 10k HiveLockObjectData instances. > Because of the constructor of HiveLockObjectData trim the queryStr, there > will be 10k individual String instances, each has 300kb in length! Then the > Hive client will get an oom exception. > Trying to trim the queryStr in Driver.compile function instead of doing it in > HiveLockObjectData constructor to reduce memory wasting. -- This message was sent by Atlassian JIRA (v6.2#6252)