|
18 | 18 |
|
19 | 19 | package org.apache.flink.configuration;
|
20 | 20 |
|
| 21 | +import org.apache.flink.annotation.Experimental; |
21 | 22 | import org.apache.flink.annotation.PublicEvolving;
|
22 | 23 | import org.apache.flink.annotation.docs.Documentation;
|
23 | 24 | import org.apache.flink.api.common.BatchShuffleMode;
|
@@ -181,4 +182,62 @@ public class ExecutionOptions {
|
181 | 182 | + " operators. NOTE: It takes effect only in the BATCH runtime mode and requires sorted inputs"
|
182 | 183 | + SORT_INPUTS.key()
|
183 | 184 | + " to be enabled.");
|
| 185 | + |
| 186 | + // ------------------------- Async State Execution -------------------------- |
| 187 | + |
| 188 | + /** |
| 189 | + * The max limit of in-flight records number in async state execution, 'in-flight' refers to the |
| 190 | + * records that have entered the operator but have not yet been processed and emitted to the |
| 191 | + * downstream. If the in-flight records number exceeds the limit, the newly records entering |
| 192 | + * will be blocked until the in-flight records number drops below the limit. |
| 193 | + */ |
| 194 | + @Experimental |
| 195 | + @Documentation.ExcludeFromDocumentation( |
| 196 | + "This is an experimental option, internal use only for now.") |
| 197 | + public static final ConfigOption<Integer> ASYNC_INFLIGHT_RECORDS_LIMIT = |
| 198 | + ConfigOptions.key("execution.async-state.in-flight-records-limit") |
| 199 | + .intType() |
| 200 | + .defaultValue(6000) |
| 201 | + .withDescription( |
| 202 | + "The max limit of in-flight records number in async state execution, 'in-flight' refers" |
| 203 | + + " to the records that have entered the operator but have not yet been processed and" |
| 204 | + + " emitted to the downstream. If the in-flight records number exceeds the limit," |
| 205 | + + " the newly records entering will be blocked until the in-flight records number drops below the limit."); |
| 206 | + |
| 207 | + /** |
| 208 | + * The size of buffer under async state execution. Async state execution provides a buffer |
| 209 | + * mechanism to reduce state access. When the number of state requests in the buffer exceeds the |
| 210 | + * batch size, a batched state execution would be triggered. Larger batch sizes will bring |
| 211 | + * higher end-to-end latency, this option works with {@link #ASYNC_STATE_BUFFER_TIMEOUT} to |
| 212 | + * control the frequency of triggering. |
| 213 | + */ |
| 214 | + @Experimental |
| 215 | + @Documentation.ExcludeFromDocumentation( |
| 216 | + "This is an experimental option, internal use only for now.") |
| 217 | + public static final ConfigOption<Integer> ASYNC_STATE_BUFFER_SIZE = |
| 218 | + ConfigOptions.key("execution.async-state.buffer-size") |
| 219 | + .intType() |
| 220 | + .defaultValue(1000) |
| 221 | + .withDescription( |
| 222 | + "The size of buffer under async state execution. Async state execution provides a buffer mechanism to reduce state access." |
| 223 | + + " When the number of state requests in the active buffer exceeds the batch size," |
| 224 | + + " a batched state execution would be triggered. Larger batch sizes will bring higher end-to-end latency," |
| 225 | + + " this option works with 'execution.async-state.buffer-timeout' to control the frequency of triggering."); |
| 226 | + |
| 227 | + /** |
| 228 | + * The timeout of buffer triggering in milliseconds. If the buffer has not reached the {@link |
| 229 | + * #ASYNC_STATE_BUFFER_SIZE} within 'buffer-timeout' milliseconds, a trigger will perform |
| 230 | + * actively. |
| 231 | + */ |
| 232 | + @Experimental |
| 233 | + @Documentation.ExcludeFromDocumentation( |
| 234 | + "This is an experimental option, internal use only for now.") |
| 235 | + public static final ConfigOption<Long> ASYNC_STATE_BUFFER_TIMEOUT = |
| 236 | + ConfigOptions.key("execution.async-state.buffer-timeout") |
| 237 | + .longType() |
| 238 | + .defaultValue(1000L) |
| 239 | + .withDescription( |
| 240 | + "The timeout of buffer triggering in milliseconds. If the buffer has not reached the" |
| 241 | + + " 'execution.async-state.buffer-size' within 'buffer-timeout' milliseconds," |
| 242 | + + " a trigger will perform actively."); |
184 | 243 | }
|
0 commit comments