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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]