[
https://issues.apache.org/jira/browse/HIVE-21841?focusedWorklogId=261182&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-261182
]
ASF GitHub Bot logged work on HIVE-21841:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jun/19 06:29
Start Date: 17/Jun/19 06:29
Worklog Time Spent: 10m
Work Description: ashutosh-bapat commented on 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 261182)
Time Spent: 2h (was: 1h 50m)
> Leader election in HMS to run housekeeping tasks.
> -------------------------------------------------
>
> Key: HIVE-21841
> URL: https://issues.apache.org/jira/browse/HIVE-21841
> Project: Hive
> Issue Type: New Feature
> Affects Versions: 4.0.0
> Reporter: Ashutosh Bapat
> Assignee: Ashutosh Bapat
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-21841.01.patch, HIVE-21841.02.patch
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> HMS performs housekeeping tasks. When there are multiple HMSes we need to
> have a leader HMS elected which will carry out those housekeeping tasks.
> These tasks include execution of compaction tasks, auto-discovering
> partitions for external tables, generation of compaction tasks, repl thread
> etc.
> Note that, though the code for compaction tasks, auto-discovery of partitions
> etc. is in Hive, the actual tasks are initiated by an HMS configured to do
> so. So, leader election is required only for HMS and not for HS2.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)