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

lpinter 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 709235c  HIVE-23046: Separate housekeeping thread from initiator flag 
(Laszlo Pinter, reviewed by Peter Vary)
709235c is described below

commit 709235c559dc60b20e4e5aa20ca1ac290de769ea
Author: Laszlo Pinter <lpin...@cloudera.com>
AuthorDate: Wed Apr 1 16:16:17 2020 +0200

    HIVE-23046: Separate housekeeping thread from initiator flag (Laszlo 
Pinter, reviewed by Peter Vary)
---
 .../hadoop/hive/metastore/MetastoreHousekeepingLeaderTestBase.java  | 1 +
 .../java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java   | 6 ++++++
 .../main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java   | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

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 7ba0d3e..a39a9c8 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 @@ class MetastoreHousekeepingLeaderTestBase {
             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 d6a6c96..411f999 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 class MetastoreConf {
         "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 b446ed9..b5f458d 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
@@ -10493,7 +10493,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
   }
 
   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;
     }
 

Reply via email to