mxm commented on code in PR #15566:
URL: https://github.com/apache/iceberg/pull/15566#discussion_r2917598835
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/FlinkWriteOptions.java:
##########
@@ -82,7 +85,18 @@ private FlinkWriteOptions() {}
ConfigOptions.key("write-parallelism").intType().noDefaultValue();
public static final ConfigOption<Boolean> COMPACTION_ENABLE =
-
ConfigOptions.key("compaction-enabled").booleanType().defaultValue(false);
+ ConfigOptions.key(RewriteDataFilesConfig.PREFIX + "enabled")
+ .booleanType()
+ .defaultValue(false)
+ .withDeprecatedKeys("compaction-enabled");
Review Comment:
I moved the enabled flag behind the config prefix.
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergSink.java:
##########
@@ -626,6 +633,92 @@ public Builder setSnapshotProperty(String property, String
value) {
return this;
}
+ /**
+ * Enables or disables compaction (rewriting data files) as a post-commit
maintenance task.
+ *
+ * @param enabled whether to enable compaction
+ * @see RewriteDataFilesConfig for the default config.
+ * @deprecated See {@code rewriteDatafiles(..)}
+ */
+ @Deprecated
+ public Builder compaction(boolean enabled) {
+ writeOptions.put(FlinkWriteOptions.COMPACTION_ENABLE.key(),
Boolean.toString(enabled));
+ return this;
+ }
Review Comment:
I deprecated this method in favor of `rewriteDataFiles`. I think it's better
to use the actual maintenance task names, to avoid confusion.
--
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]