[ https://issues.apache.org/jira/browse/HIVE-23624?focusedWorklogId=441849&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441849 ]
ASF GitHub Bot logged work on HIVE-23624: ----------------------------------------- Author: ASF GitHub Bot Created on: 05/Jun/20 14:53 Start Date: 05/Jun/20 14:53 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #1064: URL: https://github.com/apache/hive/pull/1064#discussion_r435975229 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java ########## @@ -487,4 +492,31 @@ private boolean isEligibleForCompaction(CompactionInfo ci, ShowCompactResponse c } return true; } + + @VisibleForTesting + protected static void updateCompactionMetrics(ShowCompactResponse showCompactResponse) { + Map<String, ShowCompactResponseElement> lastElements = new HashMap<>(); + + // Get the last compaction for each db/table/partition + for(ShowCompactResponseElement element : showCompactResponse.getCompacts()) { + String key = element.getDbname() + "/" + element.getTablename() + "/" + element.getPartitionname(); Review comment: Added null check as suggested. Thanks! ---------------------------------------------------------------- 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: 441849) Time Spent: 0.5h (was: 20m) > Add metastore metrics to show the compaction status > --------------------------------------------------- > > Key: HIVE-23624 > URL: https://issues.apache.org/jira/browse/HIVE-23624 > Project: Hive > Issue Type: Improvement > Components: Transactions > Reporter: Peter Vary > Assignee: Peter Vary > Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > Add metrics for showing the number of compactions grouped by status: > * Successful > * Working > * Failed > * Attempted > * Initiated > * Ready for Clean -- This message was sent by Atlassian Jira (v8.3.4#803005)