deniskuzZ commented on code in PR #3746:
URL: https://github.com/apache/hive/pull/3746#discussion_r1032434116


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -144,20 +153,22 @@ public void init(AtomicBoolean stop) throws Exception {
 
   /**
    * Determine if compaction can run in a specified directory.
-   * @param isMajorCompaction type of compaction.
+   * @param ci  {@link CompactionInfo}
    * @param dir the delta directory
    * @param sd resolved storage descriptor
    * @return true, if compaction can run.
    */
-  static boolean isEnoughToCompact(boolean isMajorCompaction, AcidDirectory 
dir,
-      StorageDescriptor sd) {
+  static boolean isEnoughToCompact(CompactionInfo ci, AcidDirectory dir, 
StorageDescriptor sd) {
     int deltaCount = dir.getCurrentDirectories().size();
     int origCount = dir.getOriginalFiles().size();
 
     StringBuilder deltaInfo = new StringBuilder().append(deltaCount);
     boolean isEnoughToCompact;
 
-    if (isMajorCompaction) {
+    if (ci.type.equals(CompactionType.REBALANCE)) {
+      //For now, we are allowing rebalance compaction regardless of the table 
state. Thresholds will be added later.

Review Comment:
   add TODO: ....



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