sumeetgajjar commented on code in PR #5893:
URL: https://github.com/apache/iceberg/pull/5893#discussion_r989556455
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -141,7 +141,24 @@ public static ManifestReader<DataFile> read(
* @return a manifest writer
*/
public static ManifestWriter<DataFile> write(PartitionSpec spec, OutputFile
outputFile) {
- return write(1, spec, outputFile, null);
+ return write(spec, outputFile, /* compressionCodec */ null, /*
compressionLevel */ null);
+ }
+
+ /**
+ * Create a new {@link ManifestWriter}.
+ *
+ * <p>Manifests created by this writer have all entry snapshot IDs set to
null. All entries will
+ * inherit the snapshot ID that will be assigned to the manifest on commit.
+ *
+ * @param spec {@link PartitionSpec} used to produce {@link DataFile}
partition tuples
+ * @param outputFile the destination file location
+ * @param compressionCodec compression codec for the manifest file
+ * @param compressionLevel compression level of the compressionCodec
+ * @return a manifest writer
+ */
+ public static ManifestWriter<DataFile> write(
+ PartitionSpec spec, OutputFile outputFile, String compressionCodec,
String compressionLevel) {
Review Comment:
Sure, I'll refactor it to `Integer`.
The reason I suggest using `Integer` and not the primitive int type is to
facilitate cases when the codec is set to `snappy` and `uncompressed`. Since
both of these codecs, no compression level is required, null can be passed here.
I would like to hear your thoughts on this before I go ahead and make the
change
--
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]