[ 
https://issues.apache.org/jira/browse/HIVE-26719?focusedWorklogId=827076&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-827076
 ]

ASF GitHub Bot logged work on HIVE-26719:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Nov/22 08:29
            Start Date: 18/Nov/22 08:29
    Worklog Time Spent: 10m 
      Work Description: 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);
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 827076)
    Time Spent: 1h  (was: 50m)

> Ability to set number of buckets manually
> -----------------------------------------
>
>                 Key: HIVE-26719
>                 URL: https://issues.apache.org/jira/browse/HIVE-26719
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: László Végh
>            Assignee: László Végh
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Add the ability to set the number of implicit buckets manually through the 
> alter table compact command



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to