[ https://issues.apache.org/jira/browse/HIVE-21718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839781#comment-16839781 ]
Hive QA commented on HIVE-21718: -------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 1m 48s{color} | {color:blue} Maven dependency ordering for branch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 7m 57s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 2m 42s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 48s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 2m 56s{color} | {color:blue} standalone-metastore/metastore-common in master has 29 extant Findbugs warnings. {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 1m 16s{color} | {color:blue} standalone-metastore/metastore-server in master has 181 extant Findbugs warnings. {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 4m 30s{color} | {color:blue} ql in master has 2258 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 2m 47s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 31s{color} | {color:blue} Maven dependency ordering for patch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 2m 46s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 2m 46s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 16s{color} | {color:red} standalone-metastore/metastore-common: The patch generated 1 new + 388 unchanged - 0 fixed = 389 total (was 388) {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 40s{color} | {color:red} standalone-metastore/metastore-server: The patch generated 5 new + 1638 unchanged - 0 fixed = 1643 total (was 1638) {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 49s{color} | {color:red} ql: The patch generated 1 new + 208 unchanged - 0 fixed = 209 total (was 208) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 1m 26s{color} | {color:red} standalone-metastore/metastore-server generated 3 new + 181 unchanged - 0 fixed = 184 total (was 181) {color} | | {color:red}-1{color} | {color:red} javadoc {color} | {color:red} 1m 5s{color} | {color:red} standalone-metastore_metastore-common generated 2 new + 45 unchanged - 0 fixed = 47 total (was 45) {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 15s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 47m 42s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | FindBugs | module:standalone-metastore/metastore-server | | | org.apache.hadoop.hive.metastore.MetaStoreDirectSql.updateLastAccessTime(Map, int) concatenates strings using + in a loop At MetaStoreDirectSql.java:+ in a loop At MetaStoreDirectSql.java:[line 545] | | | org.apache.hadoop.hive.metastore.MetaStoreDirectSql.updateLastAccessTime(Map, int) passes a nonconstant String to an execute or addBatch method on an SQL statement At MetaStoreDirectSql.java:String to an execute or addBatch method on an SQL statement At MetaStoreDirectSql.java:[line 558] | | | org.apache.hadoop.hive.metastore.MetaStoreDirectSql.updateLastAccessTime(Map, int) makes inefficient use of keySet iterator instead of entrySet iterator At MetaStoreDirectSql.java:of keySet iterator instead of entrySet iterator At MetaStoreDirectSql.java:[line 536] | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense javac javadoc findbugs checkstyle compile | | uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-17211/dev-support/hive-personality.sh | | git revision | master / de69a0f | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus/diff-checkstyle-standalone-metastore_metastore-common.txt | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus/diff-checkstyle-standalone-metastore_metastore-server.txt | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus/diff-checkstyle-ql.txt | | findbugs | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus/new-findbugs-standalone-metastore_metastore-server.html | | javadoc | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus/diff-javadoc-javadoc-standalone-metastore_metastore-common.txt | | modules | C: standalone-metastore/metastore-common standalone-metastore/metastore-server ql itests/hcatalog-unit U: . | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-17211/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > Improvement performance of UpdateInputAccessTimeHook > ---------------------------------------------------- > > Key: HIVE-21718 > URL: https://issues.apache.org/jira/browse/HIVE-21718 > Project: Hive > Issue Type: Improvement > Components: HiveServer2 > Affects Versions: 2.1.1 > Reporter: Naveen Gangam > Assignee: Naveen Gangam > Priority: Major > Attachments: HIVE-21718.2.patch, HIVE-21718.patch > > > Currently, Hive does not update the lastAccessTime property for any entities > when a query accesses them. Thus it has not possible to know when a table was > last accessed. > Hive does provide a configurable hook to HS2 that is execcuted as a pre-query > hook prior to the query being executed. However, this hook is inefficient > because for each table or partition it is attempting to update time for, it > executes an "alter table ... " command internally. This is bad > 1) For a query touching 1000's of partitions, this hook takes forever to > update them. > 2) Meanwhile, it is holding up the original query from executing. > So even though we do not recommend using the hook, because the reward is too > little (having lastAccessTime updated), we realize there is no other means to > achieve this. > Also, we can improve the performance of the hook significantly by adding a > new thrift API on HMS to update the lastAccessTime on the database rows > directly instead of going to HMS front end for 1 entity at time (leading to > 1000's of HMS calls that lead to multiple 1000's of calls to the database). -- This message was sent by Atlassian JIRA (v7.6.3#76005)