[
https://issues.apache.org/jira/browse/HIVE-25926?focusedWorklogId=720715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-720715
]
ASF GitHub Bot logged work on HIVE-25926:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/22 08:37
Start Date: 04/Feb/22 08:37
Worklog Time Spent: 10m
Work Description: vcsomor commented on a change in pull request #2995:
URL: https://github.com/apache/hive/pull/2995#discussion_r799259349
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/AcidMetricLogger.java
##########
@@ -89,6 +102,42 @@ private void logDeltaMetrics() throws MetaException {
AcidMetricService.getDeltaCountKey(d.getDbName(), d.getTblName(),
d.getPartitionName()), d.getMetricValue())));
}
+ private void logOldestInitiatorAge(AcidMetricData acidMetricData) {
+ int oldestInitiatorAge = (int) ((System.currentTimeMillis() -
acidMetricData.getOldestEnqueueTime()) / 1000L);
+ String oldestInitiatorMessage = "Found compaction entry in compaction
queue with an age of {} seconds. " +
+ "Consider increasing the number of worker threads.";
+ long oldestInitiatedWarningThreshold = MetastoreConf.getTimeVar(conf,
+
MetastoreConf.ConfVars.COMPACTOR_OLDEST_INITIATED_COMPACTION_TIME_THRESHOLD_WARNING,
+ TimeUnit.SECONDS);
+ long oldestInitiatedErrorThreshold = MetastoreConf.getTimeVar(conf,
+
MetastoreConf.ConfVars.COMPACTOR_OLDEST_INITIATED_COMPACTION_TIME_THRESHOLD_ERROR,
+ TimeUnit.SECONDS);
+ if (oldestInitiatorAge >= oldestInitiatedErrorThreshold) {
+ LOG.error(oldestInitiatorMessage, oldestInitiatorAge);
+ } else if (oldestInitiatorAge >= oldestInitiatedWarningThreshold) {
+ LOG.warn(oldestInitiatorMessage, oldestInitiatorAge);
+ }
+ }
+
+ private void logMultipleWorkerVersions(AcidMetricData acidMetricData) {
+ long workerVersionThresholdInMillis = MetastoreConf.getTimeVar(conf,
+
MetastoreConf.ConfVars.COMPACTOR_WORKER_DETECT_MULTIPLE_VERSION_THRESHOLD,
TimeUnit.MILLISECONDS);
Review comment:
good catch
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 720715)
Time Spent: 0.5h (was: 20m)
> Move all logging from AcidMetricService to AcidMetricLogger
> -----------------------------------------------------------
>
> Key: HIVE-25926
> URL: https://issues.apache.org/jira/browse/HIVE-25926
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Affects Versions: 4.0.0
> Reporter: Viktor Csomor
> Assignee: Viktor Csomor
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Some logging is left over in AcidMetricService (which used to both log
> errors/warnings and emit metrics, and now just emits metrics). Logging should
> be in the AcidMetricLogger as much as possible. Stragglers left over in
> AcidMetricService:
> * compaction_oldest_enqueue_age_in_sec
> * COMPACTOR_FAILED_COMPACTION_RATIO_THRESHOLD logging
> * Multiple Compaction Worker versions (in method:
> detectMultipleWorkerVersions)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)