marton-bod commented on code in PR #3131:
URL: https://github.com/apache/hive/pull/3131#discussion_r842882389


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -156,11 +163,19 @@ public void abortTask(TaskAttemptContext originalContext) 
throws IOException {
     TaskAttemptContext context = 
TezUtil.enrichContextWithAttemptWrapper(originalContext);
 
     // Clean up writer data from the local store
-    Map<String, HiveIcebergRecordWriter> writers = 
HiveIcebergRecordWriter.removeWriters(context.getTaskAttemptID());
+    Map<String, HiveIcebergWriter> writers = 
HiveIcebergWriter.getRecordWriters(context.getTaskAttemptID());

Review Comment:
   We could move the logic to a static method in the writer, e.g. 
`HiveIcebergWriter.closeAndRemoveWriters(attemptId)`. Is this what you had in 
mind? This way we could call this static method in both `commitTask` and 
`abortTask`.
   
   Actually I don't see the writer closing logic in the `commitTask` method 
currently (only in `abortTask`), so it's possible we're not even closing out 
our iceberg writers currently in the happy path?



-- 
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]

Reply via email to