ashutosh-bapat commented on a change in pull request #668: HIVE-21841 : Add 
configuration to specify the hostname of HMS leader …to run housekeeping tasks 
in.
URL: https://github.com/apache/hive/pull/668#discussion_r294150033
 
 

 ##########
 File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
 ##########
 @@ -10050,21 +10080,31 @@ public void run() {
           while (!startedServing.get()) {
             startCondition.await();
           }
-          startCompactorInitiator(conf);
+
+          if (isLeader) {
+            startCompactorInitiator(conf);
+            startCompactorCleaner(conf);
+            startRemoteOnlyTasks(conf);
+            startStatsUpdater(conf);
+            HiveMetaStore.HMSHandler.startAlwaysTaskThreads(conf);
+          }
+
+          // The leader HMS may not necessarily have sufficient compute 
capacity required to run
+          // actual compaction work. So it can run on a non-leader HMS with 
sufficient capacity
+          // or a configured HS2 instance.
           if (MetastoreConf.getVar(conf, 
MetastoreConf.ConfVars.HIVE_METASTORE_RUNWORKER_IN).equals("metastore")) {
 
 Review comment:
   Yes. That's how it's configurable without this feature. The threads may run 
in metastores or in HS2 where this configuration is enabled.
   
   A leader HMS (esp. in cloud environment where this feature is intended to be 
used), will not have enough compute capacity. In that case, user may configure 
HS2 instance/s to run the compaction or it may configure an HMS/es to do so.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to