[ 
https://issues.apache.org/jira/browse/FLINK-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529598#comment-16529598
 ] 

Andrey Zagrebin commented on FLINK-9511:
----------------------------------------

Hi [~yanghua], `TtlConfig` has to be moved to flink-core. The current 
`TtlConfig` is just a sketch to enable previous steps with main TTL logic.

Also it seems that at the moment we cannot activate TTL in state descriptors 
for users yet because we need at the same time more integration tests with 
backends for it and some modifications in user faced state factory method which 
I am still working on.

I would suggest to rename this issue to "Implement TTL config". Would you be 
interested to move current `TtlConfig` to flink-core module next to state 
descriptor, rename it to `StateTtlConfiguration` and maybe optionally consider 
introducing a user friendly builder if needed? It would be nice to merge it 
next week.

> Make StateDescriptor configurable with optional TTL
> ---------------------------------------------------
>
>                 Key: FLINK-9511
>                 URL: https://issues.apache.org/jira/browse/FLINK-9511
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Java API, State Backends, Checkpointing
>    Affects Versions: 1.6.0
>            Reporter: Andrey Zagrebin
>            Assignee: vinoyang
>            Priority: Major
>             Fix For: 1.6.0
>
>
> TTL can be enabled and configured in the constructor of abstract 
> StateDescriptor and become available in all subclasses:
> | {code:java}
> enum StateTtlUpdateType { Disabled, OnCreateAndWrite, OnReadAndWrite }
> enum StateTtlCleanupGuarantee { Relaxed, Exact }
> enum TtlStateVisibility { Relaxed, Exact }
> class TtlConfig {
>   StateTtlUpdateType updateType;
>   StateTtlCleanupGuarantee cleanupStrategy;
>   TtlStateVisibility stateVisibility;
>   TimeCharacteristic timeCharacteristic;
>   long ttl;
> }
> // previous constructor
> StateDescriptor(...) {
>   this.ttlConfig = ttlConfig.DISABLED;
> }
> // overloaded constructor with TtlConfig
> StateDescriptor(..., ttlConfig) {
>   ...
> }
> {code}
>  |
> `TtlConfig` has to be in flink core module.
> Another option is to consider adding TtlConfig builder.
> Queryable state can be unsupported with TTL for now.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to