1996fanrui commented on code in PR #22560:
URL: https://github.com/apache/flink/pull/22560#discussion_r1203434702
##########
flink-core/src/main/java/org/apache/flink/configuration/ExecutionOptions.java:
##########
@@ -92,6 +92,43 @@ public class ExecutionOptions {
.withDescription(
"Tells if we should use compression for the state
snapshot data or not");
+ public static final ConfigOption<Boolean> BUFFER_TIMEOUT_ENABLED =
+ ConfigOptions.key("execution.buffer-timeout.enabled")
+ .booleanType()
+ .defaultValue(true)
+ .withDescription(
+ Description.builder()
+ .text(
+ "If disabled, the config
execution.buffer-timeout will not take effect and the flushing will be
triggered only when the output "
+ + "buffer is full thus
maximizing throughput")
+ .build());
+
+ public static final ConfigOption<Duration> BUFFER_TIMEOUT_INTERVAL =
+ ConfigOptions.key("execution.buffer-timeout.interval")
+ .durationType()
+ .defaultValue(Duration.ofMillis(100))
+ .withDescription(
+ Description.builder()
+ .text(
+ "The maximum time frequency
(milliseconds) for the flushing of the output buffers. By default "
+ + "the output buffers
flush frequently to provide low latency and to aid smooth developer "
+ + "experience. Setting the
parameter can result in three logical modes:")
+ .list(
+ text(
+ "A positive value triggers
flushing periodically by that interval"),
+ text(
+ FLUSH_AFTER_EVERY_RECORD
+ + " triggers
flushing after every record thus minimizing latency"),
+ text(
+ "If the config "
+ +
BUFFER_TIMEOUT_ENABLED.key()
+ + " is false,"
+ + " trigger
flushing only when the output buffer is full thus maximizing "
+ + "throughput"))
+ .build());
+
+ /** @deprecated Use {@link #BUFFER_TIMEOUT_INTERVAL} instead. */
+ @Deprecated
public static final ConfigOption<Duration> BUFFER_TIMEOUT =
ConfigOptions.key("execution.buffer-timeout")
Review Comment:
Don't need to create a new `ConfigOption`, you can take a look this
[PR](https://github.com/apache/flink/pull/20867/files#diff-7d4e333f055cb785073ea9bf5a53fcc7f8f527ba4230e153dd9e59212093aec4).
<img width="988" alt="image"
src="https://github.com/apache/flink/assets/38427477/82328ecc-536f-43b9-a9cd-c3c18ce04a4a">
--
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]