[ https://issues.apache.org/jira/browse/HIVE-24806?focusedWorklogId=590163&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590163 ]
ASF GitHub Bot logged work on HIVE-24806: ----------------------------------------- Author: ASF GitHub Bot Created on: 28/Apr/21 06:16 Start Date: 28/Apr/21 06:16 Worklog Time Spent: 10m Work Description: rbalamohan opened a new pull request #2229: URL: https://github.com/apache/hive/pull/2229 https://issues.apache.org/jira/browse/HIVE-24806 ### What changes were proposed in this pull request? Compute findUserToRunAs on need basis to avoid FS lookup calls. https://issues.apache.org/jira/browse/HIVE-24806 has more details. ### Why are the changes needed? To reduce lookup calls in initiator. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Test on 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: 590163) Remaining Estimate: 0h Time Spent: 10m > Compactor: Initiator should lazy evaluate findUserToRunAs() > ----------------------------------------------------------- > > Key: HIVE-24806 > URL: https://issues.apache.org/jira/browse/HIVE-24806 > Project: Hive > Issue Type: Improvement > Reporter: Rajesh Balamohan > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > https://github.com/apache/hive/blob/64bb52316f19426ebea0087ee15e282cbde1d852/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java#L232 > {noformat} > cache.putIfAbsent(fullTableName, findUserToRunAs(sd.getLocation(), t)); > {noformat} > This ends up evaluating findUserToRunAs() everytime, and looks up from > FileSystem on every call (thousands of times in large database). > This can be lazy initialized instead (e.g computeIfAbsent); -- This message was sent by Atlassian Jira (v8.3.4#803005)