veghlaci05 commented on code in PR #4384:
URL: https://github.com/apache/hive/pull/4384#discussion_r1288398247
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -385,16 +384,14 @@ private boolean
foundCurrentOrFailedCompactions(ShowCompactResponse compactions,
LOG.warn("Will not initiate compaction for " + ci.getFullPartitionName()
+ " since last " +
MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD + "
attempts to compact it failed.");
- ci.errorMessage = "Compaction is not initiated since last " +
- MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD + "
consecutive compaction attempts failed)";
-
- txnHandler.markFailed(ci);
+ txnHandler.markFailed(ci.toFailedCompacion("Compaction is not initiated
since last " +
+ MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD + "
consecutive compaction attempts failed)"));
return true;
}
return false;
}
- private CompactionType checkForCompaction(final CompactionInfo ci,
+ private CompactionRequest checkForCompaction(final CompactionCandidate ci,
Review Comment:
Removed all CompactionInfo class structure related changes
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -445,17 +443,34 @@ private CompactionType checkForCompaction(final
CompactionInfo ci,
ci.getFullPartitionName(), exception);
}
}
- return compactionType;
+ }
+ if (compactionType != null) {
+ return createCompactionRequest(ci, compactionType);
+ } else {
+ return null;
}
}
+
+ private CompactionRequest createCompactionRequest(CompactionCandidate ci,
CompactionType type) {
Review Comment:
Removed all CompactionInfo class structure related changes
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]