pvary commented on code in PR #3362:
URL: https://github.com/apache/hive/pull/3362#discussion_r907332483
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -162,53 +177,96 @@ public void abortTask(TaskAttemptContext originalContext)
throws IOException {
TaskAttemptContext context =
TezUtil.enrichContextWithAttemptWrapper(originalContext);
// Clean up writer data from the local store
- Map<String, HiveIcebergWriter> writers =
WriterRegistry.removeWriters(context.getTaskAttemptID());
+ Map<String, List<HiveIcebergWriter>> writerMap =
WriterRegistry.removeWriters(context.getTaskAttemptID());
// Remove files if it was not done already
- if (writers != null) {
- for (HiveIcebergWriter writer : writers.values()) {
- writer.close(true);
+ if (writerMap != null) {
+ for (List<HiveIcebergWriter> writerList : writerMap.values()) {
+ for (HiveIcebergWriter writer : writerList) {
+ writer.close(true);
+ }
}
}
}
+ @Override
+ public void commitJob(JobContext originalContext) throws IOException {
+ commitJobs(Collections.singletonList(originalContext));
+ }
+
+ private static class OutputTable {
Review Comment:
Some javadoc would be nice
--
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]