ConeyLiu commented on code in PR #6335:
URL: https://github.com/apache/iceberg/pull/6335#discussion_r1039686191
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -499,6 +501,40 @@ protected long snapshotId() {
return snapshotId;
}
+ protected static <F extends ContentFile<F>> List<ManifestFile>
writeFilesToManifests(
+ Iterable<F> files,
+ Supplier<ManifestWriter<F>> createWriter,
+ Long newFilesSequenceNumber,
+ long targetSizeBytes)
+ throws IOException {
+ List<ManifestFile> result = Lists.newArrayList();
+ Iterator<F> fileIterator = files.iterator();
+ ManifestWriter<F> writer = null;
Review Comment:
~~Updated with try-finally, while try-with-resources seems not easy to
implement.~~
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -499,6 +501,40 @@ protected long snapshotId() {
return snapshotId;
}
+ protected static <F extends ContentFile<F>> List<ManifestFile>
writeFilesToManifests(
+ Iterable<F> files,
+ Supplier<ManifestWriter<F>> createWriter,
+ Long newFilesSequenceNumber,
+ long targetSizeBytes)
+ throws IOException {
+ List<ManifestFile> result = Lists.newArrayList();
+ Iterator<F> fileIterator = files.iterator();
+ ManifestWriter<F> writer = null;
Review Comment:
Updated
--
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]