SourabhBadhya commented on code in PR #5987: URL: https://github.com/apache/hive/pull/5987#discussion_r2217683539
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java: ########## @@ -786,14 +786,19 @@ private static FilesForCommit collectResults(int numTasks, ExecutorService execu .retry(3) .run(taskId -> { final String taskFileName = generateFileForCommitLocation(location, conf, jobContext.getJobID(), taskId); - final FilesForCommit files = readFileForCommit(taskFileName, io); - LOG.debug("Found Iceberg commitTask manifest file: {}\n{}", taskFileName, files); - - dataFiles.addAll(files.dataFiles()); - deleteFiles.addAll(files.deleteFiles()); - replacedDataFiles.addAll(files.replacedDataFiles()); - referencedDataFiles.addAll(files.referencedDataFiles()); - mergedAndDeletedFiles.addAll(files.mergedAndDeletedFiles()); + try { + final FilesForCommit files; + files = readFileForCommit(taskFileName, io); + LOG.debug("Found Iceberg commitTask manifest file: {}\n{}", taskFileName, files); + + dataFiles.addAll(files.dataFiles()); + deleteFiles.addAll(files.deleteFiles()); + replacedDataFiles.addAll(files.replacedDataFiles()); + referencedDataFiles.addAll(files.referencedDataFiles()); + mergedAndDeletedFiles.addAll(files.mergedAndDeletedFiles()); + } catch (NotFoundException e) { Review Comment: This seems to me like a quick fix but ideally we should rethink the strategy of how we are writing the FilesForCommit object into the outputFile in such scenarios / possibly preserve some state indicating that this file is not written and not just throw NotFoundException. -- 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