dengzhhu653 commented on code in PR #3567:
URL: https://github.com/apache/hive/pull/3567#discussion_r980677838


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:
##########
@@ -891,33 +855,34 @@ public void run() {
             startCondition.await();
           }
 
-          if (isLeader) {
-            startCompactorInitiator(conf);
-            startCompactorCleaner(conf);
-            startRemoteOnlyTasks(conf);
-            startStatsUpdater(conf);
-            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")) {
-            LOG.warn("Running compaction workers on HMS side is not suggested 
because compaction pools are not supported in HMS " +
-                "(HIVE-26443). Consider removing the 
hive.metastore.runworker.in configuration setting, as it will be " +
-                "comletely removed in future releases.");
-            startCompactorWorkers(conf);
+         LeaderElectionContext context = new 
LeaderElectionContext.ContextBuilder(conf)
+             
.setHMSHandler(thriftServer.getHandler()).servHost(getServerHostName())
+             // always tasks
+             .setTType(LeaderElectionContext.TTYPE.ALWAYS_TASKS)
+             .addListener(new HouseKeepingTasks(conf, false))
+             // housekeeping tasks
+             .setTType(LeaderElectionContext.TTYPE.HOUSEKEEPING)
+             .addListener(new CMClearer(conf))
+             .addListener(new StatsUpdaterTask(conf))
+             .addListener(new CompactorTasks(conf, false))
+             .addListener(new CompactorPMF())
+             .addListener(new HouseKeepingTasks(conf, true))

Review Comment:
   the partition discovery task is configured in 
`metastore.task.threads.remote`,  the `new HouseKeepingTasks(conf, true)` will 
take care of the task.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to