Zakelly commented on a change in pull request #16153: URL: https://github.com/apache/flink/pull/16153#discussion_r654810546
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java ########## @@ -607,6 +612,53 @@ public StateBackend getStateBackend() { return defaultStateBackend; } + /** + * Enable the change log for current state backend. this changelog allows operators to persist + * state changes in a very fine-grained manner, as described below: + * + * <p>Stateful operators write the state changes to that log (logging the state), in addition to + * applying them to the state tables in RocksDB or the in-mem Hashtable. + * + * <p>An operator can acknowledge a checkpoint as soon as the changes in the log have reached + * the durable checkpoint storage. + * + * <p>The state tables are persisted periodically, independent of the checkpoints. We call this + * the materialization of the state on the checkpoint storage. + * + * <p>Once the state is materialized on checkpoint storage, the state changelog can be truncated + * to the corresponding point. + * + * <p>It establish a way to drastically reduce the checkpoint interval for streaming + * applications across state backends. For more details please check the FLIP-158. + * + * <p>If this method is not called explicitly, it means no preference for enabling the change + * log. Configs for change log enabling will override in different config levels + * (job/local/cluster). + * + * @param enabled true if enable the change log for state backend explicitly, otherwise disable + * the change log. + * @return This StreamExecutionEnvironment itself, to allow chaining of function calls. + * @see #isChangelogStateBackendEnabled() + */ + @PublicEvolving + public StreamExecutionEnvironment enableChangelogStateBackend(boolean enabled) { Review comment: Yes, I added some description. 🙂 -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org