RussellSpitzer commented on code in PR #15652:
URL: https://github.com/apache/iceberg/pull/15652#discussion_r2940998396
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -241,6 +260,55 @@ static ManifestWriter<DataFile> newWriter(
"Cannot write manifest for table version: " + formatVersion);
}
+ /**
+ * Create a new {@link ManifestWriter} for the given format version with
custom writer properties.
+ *
+ * @param formatVersion a target format version
+ * @param spec a {@link PartitionSpec}
+ * @param outputFile an {@link OutputFile} where the manifest will be written
+ * @param snapshotId a snapshot ID for the manifest entries, or null for an
inherited ID
+ * @param writerProperties properties passed through to the underlying file
writer
+ * @return a manifest writer
+ */
+ public static ManifestWriter<DataFile> write(
+ int formatVersion,
+ PartitionSpec spec,
+ OutputFile outputFile,
+ Long snapshotId,
+ Map<String, String> writerProperties) {
+ return newWriter(
+ formatVersion,
+ spec,
+ EncryptedFiles.plainAsEncryptedOutput(outputFile),
+ snapshotId,
+ null,
+ writerProperties);
+ }
+
+ @VisibleForTesting
+ static ManifestWriter<DataFile> newWriter(
Review Comment:
Good call, that should be a bit tighter.
--
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]