deniskuzZ commented on code in PR #5994:
URL: https://github.com/apache/hive/pull/5994#discussion_r2256339372


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -299,9 +301,28 @@ public void commitJobs(List<JobContext> 
originalContextList, Operation operation
           .run(output -> {
             final Collection<JobContext> jobContexts = outputs.get(output);
             final Table table = output.table;
-            jobContexts.forEach(jobContext -> jobLocations.add(
-                generateJobLocation(table.location(), jobConf, 
jobContext.getJobID()))
-            );
+            String commitTasksInfoFileLocation =
+                table.location() + "/temp/commitTasksInfo" + 
CommitTasksInfo.COMMIT_TASKS_INFO_FILE_EXTENSION;
+            CommitTasksInfo commitTasksInfo =
+                
getCommitTasksInfoFromFileIfExists(commitTasksInfoFileLocation, table.io());
+            jobContexts.forEach(jobContext -> {
+              String commitTaskDirectory = 
generateJobLocation(table.location(), jobConf, jobContext.getJobID());
+              if 
(commitTasksInfo.containsCommitTaskDirectory(commitTaskDirectory)) {
+                jobLocations.add(commitTaskDirectory);
+                commitTasksInfo.removeFilesWithDirectory(commitTaskDirectory);

Review Comment:
   do we need to remove temp dir explicitly? were we removing it before?



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to