deniskuzZ commented on a change in pull request #2974:
URL: https://github.com/apache/hive/pull/2974#discussion_r795813342
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java
##########
@@ -183,29 +183,34 @@ public void run() {
String runAs = resolveUserToRunAs(tblNameOwners, t, p);
/* checkForCompaction includes many file metadata checks and may
be expensive.
* Therefore, using a thread pool here and running
checkForCompactions in parallel */
-
compactionList.add(CompletableFuture.runAsync(CompactorUtil.ThrowingRunnable.unchecked(()
->
- scheduleCompactionIfRequired(ci, t, p, runAs)),
compactionExecutor));
+ String tableName = ci.getFullTableName();
+ String partition = ci.getFullPartitionName();
+
+ CompletableFuture<Void> asyncJob =
+ CompletableFuture.runAsync(
+ CompactorUtil.ThrowingRunnable.unchecked(() ->
+ scheduleCompactionIfRequired(ci, t, p, runAs,
metricsEnabled)), compactionExecutor)
+ .exceptionally(exc -> {
+ LOG.error("Error while running scheduling the
compaction on the table {} / partition {}.", tableName, partition, exc);
Review comment:
Will we log the same stuff twice?
````
LOG.error(errorMessage);
ci.errorMessage = errorMessage;
````
--
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]