[
https://issues.apache.org/jira/browse/HIVE-26242?focusedWorklogId=785174&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-785174
]
ASF GitHub Bot logged work on HIVE-26242:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Jun/22 16:20
Start Date: 27/Jun/22 16:20
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on PR #3303:
URL: https://github.com/apache/hive/pull/3303#issuecomment-1167566882
I think we should do something like this:
````
ExecutorService executorService =
CompactorUtil.createExecutorWithThreadFactory(numberOfWorkers,
"CompactionHeartbeat-executor-thread-%d");
Ref<CompletableFuture<Void>> submittedTask = Ref.from(null);
Future<?> scheduledTask = heartbeatExecutor.scheduleAtFixedRate(() -> {
submittedTask.value = CompletableFuture.runAsync(heartbeater,
executorService);
}, initialDelay, period, TimeUnit.MILLISECONDS);
tasks.put(txnId, new TaskWrapper(scheduledTask, submittedTask.value));
}
void stopHeartbeat(long txnId) throws InterruptedException {
....
wrapper.scheduledTask.cancel(false);
try {
wrapper.submittedTask.get(initialDelay, 100);
} finally {
tasks.remove(txnId);
}
....
}
````
Issue Time Tracking
-------------------
Worklog Id: (was: 785174)
Time Spent: 7.5h (was: 7h 20m)
> Compaction heartbeater improvements
> -----------------------------------
>
> Key: HIVE-26242
> URL: https://issues.apache.org/jira/browse/HIVE-26242
> Project: Hive
> Issue Type: Improvement
> Reporter: László Végh
> Assignee: László Végh
> Priority: Major
> Labels: pull-request-available
> Time Spent: 7.5h
> Remaining Estimate: 0h
>
> The Compaction heartbeater should be improved the following ways:
> * The metastore clients should be reused between heartbeats and closed only
> at the end, when the transaction ends
> * Instead of having a dedicated heartbeater thread for each Compaction
> transaction, there should be shared a heartbeater executor where the
> heartbeat tasks can be scheduled/submitted.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)