[ https://issues.apache.org/jira/browse/HIVE-21071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16735228#comment-16735228 ]
Hive QA commented on HIVE-21071: -------------------------------- | (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 1s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 7m 14s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 0s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 37s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 3m 36s{color} | {color:blue} ql in master has 2311 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 55s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 17s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 55s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 55s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 37s{color} | {color:red} ql: The patch generated 1 new + 110 unchanged - 3 fixed = 111 total (was 113) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 53s{color} | {color:green} ql generated 0 new + 2309 unchanged - 2 fixed = 2309 total (was 2311) {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 52s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 13s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 21m 37s{color} | {color:black} {color} | \\ \\ || 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.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-15516/dev-support/hive-personality.sh | | git revision | master / 16d39c6 | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-15516/yetus/diff-checkstyle-ql.txt | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-15516/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > Improve getInputSummary > ----------------------- > > Key: HIVE-21071 > URL: https://issues.apache.org/jira/browse/HIVE-21071 > Project: Hive > Issue Type: Improvement > Components: HiveServer2 > Affects Versions: 3.0.0, 4.0.0, 3.1.1 > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Major > Attachments: HIVE-21071.1.patch, HIVE-21071.2.patch, > HIVE-21071.3.patch > > > There is a global lock in the {{getInptSummary}} code, so it is important > that it be fast. The current implementation has quite a bit of overhead that > can be re-engineered. > For example, the current implementation keeps a map of File Path to > ContentSummary object. This map is populated by several threads > concurrently. The method then loops through the map, in a single thread, at > the end to add up all of the ContentSummary objects and ignores the paths. > The code can be be re-engineered to not use a map, or a collection at all, to > store the results and instead just keep a running tally. By keeping a tally, > there is no {{O\(n)}} operation at the end to perform the addition. > There are other things can be improved. The method returns an object which > is never used anywhere, so change method to void return type. -- This message was sent by Atlassian JIRA (v7.6.3#76005)