This is an automated email from the ASF dual-hosted git repository.

abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 94c88816793  HIVE-29768: Fix 
ClassNotFoundException(SQLStdHiveAuthorizerFactoryForTest) in compactor tests 
(#6643)
94c88816793 is described below

commit 94c88816793fd0d29818e6f51767b0f55f9d61a2
Author: Mahesh Raju Somalaraju <[email protected]>
AuthorDate: Fri Aug 14 17:24:37 2026 +0530

     HIVE-29768: Fix ClassNotFoundException(SQLStdHiveAuthorizerFactoryForTest) 
in compactor tests (#6643)
---
 .../test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java | 6 ++++++
 .../apache/hadoop/hive/ql/txn/compactor/TestDeltaFilesMetrics.java  | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java 
b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
index d98c81b4626..f30f1ee21d8 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
@@ -156,6 +156,12 @@ protected final void setup(HiveConf conf) throws Exception 
{
     }
     // Set this config to true in the base class, there are extended test 
classes which set this config to false.
     MetastoreConf.setBoolVar(conf, 
ConfVars.COMPACTOR_CLEAN_ABORTS_USING_CLEANER, true);
+    // Disable stats by default as these tests do not assert on the stats that
+    // StatsUpdater.gatherStats produces.
+    // Note: Enabling it requires a properly configured authorizer,
+    // since post-compaction stats gathering runs ANALYZE TABLE through
+    // the Driver and triggers SessionState.setupAuth().
+    HiveConf.setBoolVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_GATHER_STATS, 
false);
     TestTxnDbUtil.setConfValues(conf);
     TestTxnDbUtil.cleanDb(conf);
     TestTxnDbUtil.prepDb(conf);
diff --git 
a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestDeltaFilesMetrics.java
 
b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestDeltaFilesMetrics.java
index 65e361db92e..485f4898048 100644
--- 
a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestDeltaFilesMetrics.java
+++ 
b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestDeltaFilesMetrics.java
@@ -64,7 +64,6 @@ private void setUpHiveConf() {
         TimeUnit.SECONDS);
     MetastoreConf.setDoubleVar(conf, 
MetastoreConf.ConfVars.METASTORE_DELTAMETRICS_DELTA_PCT_THRESHOLD, 0.15f);
     MetastoreConf.setBoolVar(conf, MetastoreConf.ConfVars.METRICS_ENABLED, 
true);
-    HiveConf.setBoolVar(conf, HiveConf.ConfVars.HIVE_COMPACTOR_GATHER_STATS, 
false);
   }
 
   @Override

Reply via email to