kasakrisz commented on code in PR #3362:
URL: https://github.com/apache/hive/pull/3362#discussion_r899923444
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -325,7 +339,15 @@ private void commitTable(FileIO io, ExecutorService
executor, JobContext jobCont
LOG.info("Committing job has started for table: {}, using location: {}",
table, generateJobLocation(location, conf, jobContext.getJobID()));
- int numTasks = SessionStateUtil.getCommitInfo(conf, name).map(info ->
info.getTaskNum()).orElseGet(() -> {
+ Optional<SessionStateUtil.CommitInfo> commitInfo;
+ if (SessionStateUtil.getCommitInfo(conf, name).isPresent()) {
+ commitInfo = SessionStateUtil.getCommitInfo(conf, name).get()
+ .stream().filter(ci ->
ci.getJobIdStr().equals(jobContext.getJobID().toString())).findFirst();
Review Comment:
AFAIK only one `CommitInfo` object should be associated to a jobContext.
--
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]