klcopp commented on a change in pull request #2493:
URL: https://github.com/apache/hive/pull/2493#discussion_r673999555
##########
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:
got it now:)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]