nsivabalan commented on a change in pull request #3740:
URL: https://github.com/apache/hudi/pull/3740#discussion_r721856150



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieConcatHandle.java
##########
@@ -94,4 +104,22 @@ public void write(GenericRecord oldRecord) {
     }
     recordsWritten++;
   }
+
+  @Override
+  public List<WriteStatus> close() {
+    try {
+      while (recordItr.hasNext()) {
+        HoodieRecord<T> record = recordItr.next();
+        if (needsUpdateLocation()) {
+          record.unseal();
+          record.setNewLocation(new HoodieRecordLocation(instantTime, fileId));
+          record.seal();
+        }
+        writeInsertRecord(record);
+      }
+    } catch (IOException e) {
+      throw new HoodieUpsertException("Failed to close UpdateHandle", e);
+    }
+    return super.close();

Review comment:
       let's not call super.close(). lets add a protected method in MergeHandle 
just for processing records within close. and here awe can just over-ride that 
method alone. I am talking about lines 364 to 367 in MergeHandle. in other 
words, lets not override close() and then call super.close().




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


Reply via email to