[ https://issues.apache.org/jira/browse/HIVE-25345?focusedWorklogId=626139&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-626139 ]
ASF GitHub Bot logged work on HIVE-25345: ----------------------------------------- Author: ASF GitHub Bot Created on: 21/Jul/21 13:44 Start Date: 21/Jul/21 13:44 Worklog Time Spent: 10m Work Description: lcspinter commented on a change in pull request #2493: URL: https://github.com/apache/hive/pull/2493#discussion_r673985827 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java ########## @@ -212,11 +215,41 @@ public static void mergeDeltaFilesStats(AcidDirectory dir, long checkThresholdIn } } } + + logDeltaDirMetrics(dir, conf, numObsoleteDeltas, numDeltas, numSmallDeltas); + String path = getRelPath(dir); newDeltaFilesStats(numObsoleteDeltas, numDeltas, numSmallDeltas) .forEach((type, cnt) -> deltaFilesStats.computeIfAbsent(type, v -> new HashMap<>()).put(path, cnt)); } + private static void logDeltaDirMetrics(AcidDirectory dir, Configuration conf, int numObsoleteDeltas, int numDeltas, + int numSmallDeltas) { + long loggerFrequency = HiveConf + .getTimeVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_ACID_METRICS_LOGGER_FREQUENCY, TimeUnit.MILLISECONDS); + if (loggerFrequency <= 0) { + return; + } + long currentTime = System.currentTimeMillis(); + if (lastSuccessfulLoggingTime == 0 || currentTime >= lastSuccessfulLoggingTime + loggerFrequency) { Review comment: Could you please elaborate on this? If `loggerFrequence = 0` the method returns. `lastSuccessfullLoggingTime == 0` means that the `logDeltaDirMetrics` is called for the very first time. -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 626139) Time Spent: 1h 50m (was: 1h 40m) > Add logging based on new compaction metrics > ------------------------------------------- > > Key: HIVE-25345 > URL: https://issues.apache.org/jira/browse/HIVE-25345 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)