[ https://issues.apache.org/jira/browse/HIVE-25075?focusedWorklogId=590973&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590973 ]
ASF GitHub Bot logged work on HIVE-25075: ----------------------------------------- Author: ASF GitHub Bot Created on: 29/Apr/21 13:13 Start Date: 29/Apr/21 13:13 Worklog Time Spent: 10m Work Description: rbalamohan opened a new pull request #2234: URL: https://github.com/apache/hive/pull/2234 Details are mentioned in https://issues.apache.org/jira/browse/HIVE-25075 ### What changes were proposed in this pull request? Because of Hive.get(), it ends up closing the current connection for every partition. So during external table load with large number of partitions, it re-establishes the connection to HMS for every partition which slows down processing. Patch fixes this issue by invoking getMSC() instead of Hive.get() Ref: https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L401 https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L390 https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L374 https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L477 ### Why are the changes needed? performance ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Small internal cluster. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 590973) Remaining Estimate: 0h Time Spent: 10m > Hive::loadPartitionInternal establishes HMS connection for every partition > for external tables > ---------------------------------------------------------------------------------------------- > > Key: HIVE-25075 > URL: https://issues.apache.org/jira/browse/HIVE-25075 > Project: Hive > Issue Type: Improvement > Reporter: Rajesh Balamohan > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L2522 > {code} > boolean needRecycle = !tbl.isTemporary() > && > ReplChangeManager.shouldEnableCm(Hive.get().getDatabase(tbl.getDbName()), > tbl.getTTable()); > {code} > Hive.get() breaks the current connection with HMS. Due to this, for external > table partition loads, it establishes HMS connection for partition. -- This message was sent by Atlassian Jira (v8.3.4#803005)