diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/MetastoreHousekeepingLeaderTestBase.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/MetastoreHousekeepingLeaderTestBase.java index 7ba0d3ee2a..a39a9c8e04 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/MetastoreHousekeepingLeaderTestBase.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/MetastoreHousekeepingLeaderTestBase.java @@ -127,6 +127,7 @@ private long addRemoteOnlyTasksConfigs() { RemoteMetastoreTaskThreadTestImpl1.class.getCanonicalName() + "," + RemoteMetastoreTaskThreadTestImpl2.class.getCanonicalName(); + MetastoreConf.setBoolVar(conf, ConfVars.METASTORE_HOUSEKEEPING_THREADS_ON, true); MetastoreConf.setVar(conf, ConfVars.TASK_THREADS_REMOTE_ONLY, remoteTaskClassPaths); threadNames.put(RemoteMetastoreTaskThreadTestImpl1.TASK_NAME, false); diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java index d6a6c96a6a..411f9997c8 100644 --- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java +++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java @@ -406,6 +406,12 @@ public static ConfVars getMetaConf(String name) { "match that configuration. Otherwise it should be same as the hostname returned by " + "InetAddress#getLocalHost#getHostName(). Given the uncertainty in the later " + "it is desirable to configure metastore.thrift.bind.host on the intended leader HMS."), + METASTORE_HOUSEKEEPING_THREADS_ON("metastore.housekeeping.threads.on", + "hive.metastore.housekeeping.threads.on", false, + "Whether to run the tasks under metastore.task.threads.remote on this metastore instance or not.\n" + + "Set this to true on one instance of the Thrift metastore service as part of turning\n" + + "on Hive transactions. For a complete list of parameters required for turning on\n" + + "transactions, see hive.txn.manager."), COMPACTOR_INITIATOR_ON("metastore.compactor.initiator.on", "hive.compactor.initiator.on", false, "Whether to run the initiator and cleaner threads on this metastore instance or not.\n" + "Set this to true on one instance of the Thrift metastore service as part of turning\n" + diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index be4b3794de..c4577156cb 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -10460,7 +10460,7 @@ private static void initializeAndStartThread(MetaStoreThread thread, Configurati } private static void startRemoteOnlyTasks(Configuration conf) throws Exception { - if(!MetastoreConf.getBoolVar(conf, ConfVars.COMPACTOR_INITIATOR_ON)) { + if(!MetastoreConf.getBoolVar(conf, ConfVars.METASTORE_HOUSEKEEPING_THREADS_ON)) { return; }