You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/06/05 14:45:45 UTC
[GitHub] [hive] laszlopinter86 commented on a change in pull request #1064: HIVE-23624: Add metastore metrics to show the compaction status
laszlopinter86 commented on a change in pull request #1064:
URL: https://github.com/apache/hive/pull/1064#discussion_r435967988
##########
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:
element.getPartitionname() can return null, resulting in a key="dbName/tableName/null"
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org