difin commented on code in PR #6292:
URL: https://github.com/apache/hive/pull/6292#discussion_r2784234504


##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/test/utils/HiveIcebergStorageHandlerTestUtils.java:
##########
@@ -110,11 +112,35 @@ public static TestHiveShell shell(Map<String, String> 
configs) {
     shell.setHiveConfValue("hive.notification.event.poll.interval", "-1");
     shell.setHiveConfValue("hive.tez.exec.print.summary", "true");
     shell.setHiveConfValue("tez.counters.max", "1024");
+
+    // Settings for Hive Iceberg Compaction
+    shell.setHiveConfValue(HiveConf.ConfVars.HIVE_LOCK_MANAGER.varname,
+        "org.apache.hadoop.hive.ql.lockmgr.DbLockManager");
+    
shell.setHiveConfValue(HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_THREADS.varname, 
"2");
+    shell.setHiveConfValue(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, 
"true");
+    
shell.setHiveConfValue(HiveConf.ConfVars.DYNAMIC_PARTITIONING_MODE.varname, 
"nonstrict");
+    
shell.setHiveConfValue(HiveConf.ConfVars.COMPACTOR_CRUD_QUERY_BASED.varname,
+        "true");
+    
shell.setHiveConfValue(MetastoreConf.ConfVars.COMPACTOR_WORKER_THREADS.getVarname(),
 "2");
+    
shell.setHiveConfValue(MetastoreConf.ConfVars.HIVE_TXN_MANAGER.getVarname(),
+        "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager");
+    
shell.setHiveConfValue(MetastoreConf.ConfVars.COMPACTOR_INITIATOR_ON.getVarname(),
 "false");
+    
shell.setHiveConfValue(MetastoreConf.ConfVars.COMPACTOR_CLEANER_ON.getVarname(),
 "false");
+
+    // Set jar directory and user install directory for Tez execution 
(required for compaction)
+    String defaultTempDir = System.getProperty("java.io.tmpdir");
+    shell.setHiveConfValue(HiveConf.ConfVars.HIVE_JAR_DIRECTORY.varname, 
defaultTempDir);
+    shell.setHiveConfValue(HiveConf.ConfVars.HIVE_USER_INSTALL_DIR.varname, 
defaultTempDir);
+
     configs.forEach((k, v) -> shell.setHiveConfValue(k, v));
     // We would like to make sure that ORC reading overrides this config, so 
reading Iceberg tables could work in
     // systems (like Hive 3.2 and higher) where this value is set to true 
explicitly.
     
shell.setHiveConfValue(OrcConf.FORCE_POSITIONAL_EVOLUTION.getHiveConfName(), 
"true");
     shell.start();
+
+    
shell.setHiveSessionValue(HiveConf.ConfVars.METASTORE_CONNECT_URL_KEY.varname,

Review Comment:
   removed, works without it.



##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandlerWithEngineBase.java:
##########
@@ -327,6 +329,15 @@ protected void executeConcurrently(
             HiveConf.setVar(shell.getHiveConf(), 
HiveConf.ConfVars.HIVE_QUERY_REEXECUTION_STRATEGIES,
                 retryStrategies);
 
+            HMSHandlerContext.clear();

Review Comment:
   removed



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