maheshk114 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_r294129954
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
##########
@@ -609,22 +609,10 @@ public void init() throws MetaException {
partitionValidationPattern = null;
}
- // We only initialize once the tasks that need to be run periodically
- if (alwaysThreadsInitialized.compareAndSet(false, true)) {
- ThreadPool.initialize(conf);
- Collection<String> taskNames =
- MetastoreConf.getStringCollection(conf,
ConfVars.TASK_THREADS_ALWAYS);
- for (String taskName : taskNames) {
- MetastoreTaskThread task =
- JavaUtils.newInstance(JavaUtils.getClass(taskName,
MetastoreTaskThread.class));
- task.setConf(conf);
- long freq = task.runFrequency(TimeUnit.MILLISECONDS);
- // For backwards compatibility, since some threads used to be hard
coded but only run if
- // frequency was > 0
- if (freq > 0) {
- ThreadPool.getPool().scheduleAtFixedRate(task, freq, freq,
TimeUnit.MILLISECONDS);
- }
- }
+ // We only initialize once the tasks that need to be run periodically.
For remote metastore
+ // these threads are started along with the other housekeeping threads
only in the leader HMS.
+ if (!isMetaStoreRemote()) {
Review comment:
in the older version, these tasks were created in embedded mode also. Will
it not create backward compatibility issue ? may be another config needs to be
added to control this ?
----------------------------------------------------------------
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]