[ https://issues.apache.org/jira/browse/HIVE-22402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16961289#comment-16961289 ]
Hive QA commented on HIVE-22402: -------------------------------- | (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 45s{color} | {color:blue} Maven dependency ordering for branch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 8m 24s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 25s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 6s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 43s{color} | {color:blue} common in master has 65 extant Findbugs warnings. {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 4m 6s{color} | {color:blue} ql in master has 1545 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 16s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 26s{color} | {color:blue} Maven dependency ordering for patch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 44s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 23s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 23s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 17s{color} | {color:red} common: The patch generated 2 new + 372 unchanged - 2 fixed = 374 total (was 374) {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 47s{color} | {color:red} ql: The patch generated 15 new + 810 unchanged - 40 fixed = 825 total (was 850) {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} 4m 12s{color} | {color:red} ql generated 2 new + 1540 unchanged - 5 fixed = 1542 total (was 1545) {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 14s{color} | {color:green} the patch passed {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} 30m 38s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | FindBugs | module:ql | | | Exception is caught when Exception is not thrown in org.apache.hadoop.hive.ql.exec.spark.SparkReduceRecordHandler.doInit(JobConf, OutputCollector, Reporter) At SparkReduceRecordHandler.java:is not thrown in org.apache.hadoop.hive.ql.exec.spark.SparkReduceRecordHandler.doInit(JobConf, OutputCollector, Reporter) At SparkReduceRecordHandler.java:[line 230] | | | org.apache.hadoop.hive.ql.exec.tez.ReduceRecordProcessor.doInit(MRTaskReporter, Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator At ReduceRecordProcessor.java:use of keySet iterator instead of entrySet iterator At ReduceRecordProcessor.java:[line 189] | \\ \\ || 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-19177/dev-support/hive-personality.sh | | git revision | master / aceb8b6 | | Default Java | 1.8.0_111 | | findbugs | v3.0.1 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-19177/yetus/diff-checkstyle-common.txt | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-19177/yetus/diff-checkstyle-ql.txt | | findbugs | http://104.198.109.242/logs//PreCommit-HIVE-Build-19177/yetus/new-findbugs-ql.html | | modules | C: common ql U: . | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-19177/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > Deprecate and Replace Hive PerfLogger > ------------------------------------- > > Key: HIVE-22402 > URL: https://issues.apache.org/jira/browse/HIVE-22402 > Project: Hive > Issue Type: Improvement > Affects Versions: 4.0.0 > Reporter: David Mollitor > Assignee: David Mollitor > Priority: Major > Attachments: HIVE-22402.1.patch, HIVE-22402.2.patch, > HIVE-22402.3.patch > > > Recently I wanted to add some additional capability, and add more, > performance logging to support my troubleshooting efforts. I started looking > at PerfLogger and started to examine its usage. I discovered a few things: > # Since 'loggers' must be open and closed manually, I found a couple of > places where loggers were opened, but not closed, rendering them useless > # Since 'loggers' must be closed manually, I found a few places where an > early-return or Exception thrown would cause a logger to not be closed, > thereby rendering it useless > # Session information is not logged, so it can be difficult to precisely > pinpoint which session is taking lots of time > # PerfLogger overloaded. Most of the time, it's being used as a simple timer > mechanism with automatic logging in SLF4J debug. However, it is also a facade > over the Hive Metrics subsystem and timing results are automatically > published to Metrics and then there becomes this dependency on a 'logger' to > be able to access metric data as well. > The last bullet is the most challenging part and why I propose to deprecate > the Hive {{PerfLogger}} and not simply remove it. I am proposing a new > system... a {{PerfTimer}} that is allows for Java 8's try-with-resources > feature to protect against the developer having to care about manually close > measurements and not having to carefully consider all early-exits. The base > implementation logs to SLF4J. An extended version automatically publishes to > the Hive Metric subsystem as well. > The Hive {{PerfLogger}} has a bit of a clunky system for allowing plugable > implementations. However, there are sections of the code that rely on the > {{PerfLogger}}'s ability to publish to the Metrics subsystem. These code > section look up various timers in the Metrics Subsytem and publish the > results back to the client. Since, in theory, the implementation is plugable, > any other implementation that does not publish to the Metrics Subsystem will > break these code paths. Also, these code paths create and interact with > {{PerfLoggers in a static way, and then the publishing code pulls the data > from the {{PerfLogger}}}} (as a facade to the Metrics subsystem) in a static > way. Therefore, when I tried to replace the entire {{PerfLogger}} code, I > came across an issue because there is not (and should not) be a way to just > statically pull this information down from any point in the code. Information > that is required for publishing should be passed around within some sort of > context object, separate from the Metrics subsystem. There was no obvious way > to string a new {{PerfTimer}} to all the required locations. I propose > marking the {{PerfLogger}} as deprecated and leaving these complex section > alone. Instead, replace only the simple "I want a timer" use cases. -- This message was sent by Atlassian Jira (v8.3.4#803005)