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 d97f457c11c9..afb3e878ac68 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 @@ -155,6 +155,13 @@ 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); + // Post-compaction stats gathering runs an ANALYZE TABLE query through the Driver, + // which triggers SessionState.setupAuth() and fails here with a ClassNotFoundException: + // data/conf/hive-site.xml points hive.security.authorization.manager at + // SQLStdHiveAuthorizerFactoryForTest, but that class lives in itests/util which + // isn't on the ql test classpath. StatsUpdater swallows the failure so tests still pass. + // Disable stats by default as these tests do not assert on the stats that StatsUpdater.gatherStats produces. + 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 28ec7750e9cd..5f6188192a0c 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 @@ -63,7 +63,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