rbalamohan commented on a change in pull request #2134:
URL: https://github.com/apache/hive/pull/2134#discussion_r604717148
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
##########
@@ -444,29 +447,47 @@ private static boolean isDynPartIngest(Table t,
CompactionInfo ci){
return false;
}
- private boolean isEligibleForCompaction(CompactionInfo ci,
ShowCompactResponse currentCompactions) {
- LOG.info("Checking to see if we should compact " +
ci.getFullPartitionName());
-
- // Check if we already have initiated or are working on a compaction for
this partition
- // or table. If so, skip it. If we are just waiting on cleaning we can
still check,
- // as it may be time to compact again even though we haven't cleaned.
- // todo: this is not robust. You can easily run `alter table` to start a
compaction between
- // the time currentCompactions is generated and now
- if (lookForCurrentCompactions(currentCompactions, ci)) {
- LOG.info("Found currently initiated or working compaction for " +
- ci.getFullPartitionName() + " so we will not initiate another
compaction");
- return false;
- }
-
+ private boolean isEligibleForCompaction(CompactionInfo ci,
+ ShowCompactResponse currentCompactions, Set<String> skipDBs, Set<String>
skipTables) {
try {
+ if (skipDBs.contains(ci.dbname)) {
+ LOG.debug("Skipping {}::{}, skipDBs:{}", ci.dbname, ci.tableName,
skipDBs);
Review comment:
Taken care of in recent commit.
--
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]