deniskuzZ commented on a change in pull request #3126:
URL: https://github.com/apache/hive/pull/3126#discussion_r834223826



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -442,31 +439,24 @@ protected Boolean findNextCompactionAndExecute(boolean 
collectGenericStats, bool
 
       // Don't start compaction or cleaning if not necessary
       if (isDynPartAbort(t, ci)) {
-        msc.markCompacted(CompactionInfo.compactionInfoToStruct(ci));
+        markWithState(ci, null, CompactionState.Compacted);
         compactionTxn.wasSuccessful();
         return false;
       }
       AcidDirectory dir = getAcidStateForWorker(ci, sd, tblValidWriteIds);
       if (!isEnoughToCompact(ci.isMajorCompaction(), dir, sd)) {
         if (needsCleaning(dir, sd)) {
-          msc.markCompacted(CompactionInfo.compactionInfoToStruct(ci));
+          markWithState(ci, null, CompactionState.Compacted);
         } else {
-          // do nothing
-          msc.markCleaned(CompactionInfo.compactionInfoToStruct(ci));
+          markWithState(ci, "None of the compaction thresholds hit, compaction 
request is refused!", CompactionState.Refused);

Review comment:
       I would use some diff state here like` ATTEMPTED`, meaning that it might 
be retried when criteria match. 
   In the case of `REFUSED`, there is not much sense to retry as it identifies 
the case that is not supported.




-- 
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]

Reply via email to