chamikaramj commented on code in PR #32666:
URL: https://github.com/apache/beam/pull/32666#discussion_r1792220987


##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/WriteUngroupedRowsToFiles.java:
##########
@@ -265,14 +265,18 @@ public void finishBundle(FinishBundleContext c) throws 
Exception {
         return;
       }
       recordWriterManager.close();
-      for (Map.Entry<WindowedValue<IcebergDestination>, List<ManifestFile>> 
destinationAndFiles :
-          
Preconditions.checkNotNull(recordWriterManager).getManifestFiles().entrySet()) {
+
+      for (Map.Entry<WindowedValue<IcebergDestination>, 
List<SerializableDataFile>>
+          destinationAndFiles :
+              Preconditions.checkNotNull(recordWriterManager)
+                  .getSerializableDataFiles()
+                  .entrySet()) {
         WindowedValue<IcebergDestination> windowedDestination = 
destinationAndFiles.getKey();
 
-        for (ManifestFile manifestFile : destinationAndFiles.getValue()) {
+        for (SerializableDataFile dataFile : destinationAndFiles.getValue()) {
           c.output(
               FileWriteResult.builder()

Review Comment:
   What will happen if the workitem fails here. If data is already written to 
Iceberg, sounds like we'll never clean up such temporary data from failed 
bundles ?
   
   Probably there's no correctness issue though if we never finalize 
data/manifest files related to such data written from failed bundles.



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