[
https://issues.apache.org/jira/browse/HIVE-23324?focusedWorklogId=461511&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-461511
]
ASF GitHub Bot logged work on HIVE-23324:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jul/20 10:37
Start Date: 21/Jul/20 10:37
Worklog Time Spent: 10m
Work Description: pvary commented on a change in pull request #1275:
URL: https://github.com/apache/hive/pull/1275#discussion_r458001001
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -89,9 +94,12 @@ public void run() {
handle =
txnHandler.getMutexAPI().acquireLock(TxnStore.MUTEX_KEY.Cleaner.name());
startedAt = System.currentTimeMillis();
long minOpenTxnId = txnHandler.findMinOpenTxnIdForCleaner();
+ List<CompletableFuture> cleanerList = new ArrayList<>();
for(CompactionInfo compactionInfo : txnHandler.findReadyToClean()) {
- clean(compactionInfo, minOpenTxnId);
+
cleanerList.add(CompletableFuture.runAsync(ThrowingRunnable.unchecked(() ->
+ clean(compactionInfo, minOpenTxnId)), cleanerExecutor));
}
+ CompletableFuture.allOf(cleanerList.toArray(new
CompletableFuture[0])).join();
Review comment:
Talked with @deniskuzZ and he convinced me that join() will wait for all
of the tasks to finish :)
----------------------------------------------------------------
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: 461511)
Time Spent: 50m (was: 40m)
> Parallelise compaction directory cleaning process
> -------------------------------------------------
>
> Key: HIVE-23324
> URL: https://issues.apache.org/jira/browse/HIVE-23324
> Project: Hive
> Issue Type: Improvement
> Reporter: Marton Bod
> Assignee: Adesh Kumar Rao
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Initiator processes the various compaction candidates in parallel, so we
> could follow a similar approach in Cleaner where we currently clean the
> directories sequentially.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)