wypoon commented on code in PR #6799:
URL: https://github.com/apache/iceberg/pull/6799#discussion_r1333556985
##########
core/src/main/java/org/apache/iceberg/ManifestWriter.java:
##########
@@ -52,20 +52,38 @@ public abstract class ManifestWriter<F extends
ContentFile<F>> implements FileAp
private long deletedRows = 0L;
private Long minDataSequenceNumber = null;
- private ManifestWriter(PartitionSpec spec, OutputFile file, Long snapshotId)
{
+ private ManifestWriter(
+ PartitionSpec spec,
+ OutputFile file,
+ Long snapshotId,
+ String compressionCodec,
+ Integer compressionLevel) {
this.file = file;
this.specId = spec.specId();
- this.writer = newAppender(spec, file);
+ this.writer = newAppender(spec, file, compressionCodec, compressionLevel);
this.snapshotId = snapshotId;
this.reused = new GenericManifestEntry<>(spec.partitionType());
this.stats = new PartitionSummary(spec);
}
protected abstract ManifestEntry<F> prepare(ManifestEntry<F> entry);
+ /**
+ * @deprecated since 1.4.0, will be removed in 1.5.0; use {@link
+ * ManifestWriter#newAppender(PartitionSpec, OutputFile, String,
Integer)} instead.
+ */
+ @Deprecated
protected abstract FileAppender<ManifestEntry<F>> newAppender(
PartitionSpec spec, OutputFile outputFile);
+ protected FileAppender<ManifestEntry<F>> newAppender(
Review Comment:
@ConeyLiu I see your point.
@nastra recommended making the new `newAppender` with 4 parameters
non-abstract (calling the old `newAppender` with 2 parameters) to avoid
breaking the API. However, as you point out, when we remove the deprecated
2-parameter `newAppender` in a future release, this 4-parameter `newAppender`
will have to become abstract, which will break the API then. We either break
the API now or later. @nastra what do you think?
--
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]