chamikaramj commented on code in PR #32666:
URL: https://github.com/apache/beam/pull/32666#discussion_r1792418910
##########
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:
It might make sense to document this. I guess following might work as a
workaround to cleanup such files.
https://iceberg.apache.org/docs/1.5.1/spark-procedures/#remove_orphan_files
--
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]