kasakrisz commented on code in PR #3759:
URL: https://github.com/apache/hive/pull/3759#discussion_r1026139553


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -291,6 +299,18 @@ protected Boolean findNextCompactionAndExecute(boolean 
collectGenericStats, bool
         return false;
       }
 
+      if (ci.type.equals(CompactionType.REBALANCE) && 
t1.getSd().isSetNumBuckets() && t1.getSd().getNumBuckets() > 0) {
+        LOG.error("Cannot execute rebalancing compaction on bucketed tables.");
+        ci.errorMessage = "Cannot execute rebalancing compaction on bucketed 
tables.";
+        msc.markRefused(CompactionInfo.compactionInfoToStruct(ci));
+        return false;
+      }
+
+      if (!ci.type.equals(CompactionType.REBALANCE) && ci.numberOfBuckets > 0) 
{
+        LOG.warn("Only the REBALANCE compaction accepts the number of buckets 
clause (CLUSTERED INTO {N} BUCKETS). " +
+            "Since the compaction request is " + ci.type + ", it will be 
ignored.");

Review Comment:
   Please use placeholders in log messages instead of string concatenation like
   ```
   LOG.warn("Only the REBALANCE compaction accepts the number of buckets clause 
(CLUSTERED INTO {N} BUCKETS). " +
               "Since the compaction request is {}, it will be ignored.", 
ci.type);
   ```



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to