You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/02/16 08:41:37 UTC

[GitHub] [hive] klcopp commented on a change in pull request #1979: HIVE-24785: Fix HIVE_COMPACTOR_COMPACT_MM property

klcopp commented on a change in pull request #1979:
URL: https://github.com/apache/hive/pull/1979#discussion_r576638280



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -533,6 +533,10 @@ protected Boolean findNextCompactionAndExecute(boolean computeStats) throws Inte
         todo Find a more generic approach to collecting files in the same logical bucket to compact within the same
         task (currently we're using Tez split grouping).
         */
+        if (AcidUtils.isInsertOnlyTable(t.getParameters()) && !HiveConf
+            .getBoolVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_COMPACT_MM)) {
+          throw new HiveException("Insert only compaction is disabled. Set hive.compactor.compact.insert.only to true to enable it.");
+        }

Review comment:
       Could we put this logic in the QueryCompactorFactory for better readability?

##########
File path: ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
##########
@@ -1200,6 +1202,36 @@ public void resolveUserToRunAs() throws Exception {
     Assert.assertEquals(tableName, compacts.get(0).getTablename());
   }
 
+  @Test

Review comment:
       Could you add a test for the check in Worker as well?




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

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



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