[
https://issues.apache.org/jira/browse/FLINK-9637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571271#comment-16571271
]
ASF GitHub Bot commented on FLINK-9637:
---------------------------------------
twalthr commented on a change in pull request #6379: [FLINK-9637] Add public
user documentation for state TTL feature
URL: https://github.com/apache/flink/pull/6379#discussion_r208139216
##########
File path: docs/dev/stream/state/state.md
##########
@@ -266,6 +266,101 @@ a `ValueState`. Once the count reaches 2 it will emit
the average and clear the
we start over from `0`. Note that this would keep a different state value for
each different input
key if we had tuples with different values in the first field.
+### State time-to-live (TTL)
+
+A time-to-live (TTL) can be assigned to the keyed state value.
+In this case it will expire after the configured TTL
+and its stored value will be cleaned up on the best effort basis which is
discussed in details later.
+
+The state collection types support per-entry TTLs: list elements and map
entries expire independently.
+
+To use state TTL you must first build a `StateTtlConfiguration` object:
+
+<div class="codetabs" markdown="1">
+<div data-lang="java" markdown="1">
+{% highlight java %}
+StateTtlConfiguration ttlConfig = StateTtlConfiguration
Review comment:
Include imports to find the newly introduced class. Also to clarify which
Flink `Time` class we are using.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add public user documentation for TTL feature
> ---------------------------------------------
>
> Key: FLINK-9637
> URL: https://issues.apache.org/jira/browse/FLINK-9637
> Project: Flink
> Issue Type: Sub-task
> Components: State Backends, Checkpointing
> Affects Versions: 1.6.0
> Reporter: Andrey Zagrebin
> Assignee: Andrey Zagrebin
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)