[ 
https://issues.apache.org/jira/browse/HIVE-24932?focusedWorklogId=573523&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-573523
 ]

ASF GitHub Bot logged work on HIVE-24932:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Mar/21 14:29
            Start Date: 29/Mar/21 14:29
    Worklog Time Spent: 10m 
      Work Description: klcopp commented on a change in pull request #2115:
URL: https://github.com/apache/hive/pull/2115#discussion_r603338192



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/AcidMetricService.java
##########
@@ -125,6 +126,30 @@ public static void 
updateMetricsFromShowCompact(ShowCompactResponse showCompactR
       Metrics.getOrCreateGauge(MetricsConstants.COMPACTION_OLDEST_ENQUEUE_AGE)
           .set((int) ((System.currentTimeMillis() - oldestEnqueueTime) / 
1000L));
     }
+
+    long initiatorsCount = lastElements.values().stream()
+        .map(e -> getHostFromId(e.getInitiatorId())).distinct().filter(e -> 
!NO_VAL.equals(e)).count();
+    Metrics.getOrCreateGauge(MetricsConstants.COMPACTION_STATUS_PREFIX + 
"initiators").set((int) initiatorsCount);

Review comment:
       Would be best to make new MetricsConstants out of these metric names

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -390,6 +390,9 @@ protected Boolean findNextCompactionAndExecute(boolean 
computeStats) {
         }
       }
       ci = 
CompactionInfo.optionalCompactionInfoStructToInfo(msc.findNextCompact(workerName,
 runtimeVersion));
+      if ((runtimeVersion != null || ci.initiatorVersion != null) && 
!runtimeVersion.equals(ci.initiatorVersion)) {
+        LOG.warn("Worker and Initiator versions do not match");

Review comment:
       I would include the versions in the log message




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 573523)
    Time Spent: 20m  (was: 10m)

> Create new metric about Initiator / Worker hosts
> ------------------------------------------------
>
>                 Key: HIVE-24932
>                 URL: https://issues.apache.org/jira/browse/HIVE-24932
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Denys Kuzmenko
>            Assignee: Denys Kuzmenko
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Create 4 new metrics:
>  * Number of hosts running Initiator in the last 24 hours
>  * Number of hosts running Workers in the last 24 hours
>  * Number of versions running Initiator in the last 24 hours
>  * Number of versions running Workers



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to