You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Andrey Zagrebin (JIRA)" <ji...@apache.org> on 2018/06/04 07:48:00 UTC

[jira] [Created] (FLINK-9511) Make StateDescriptor configurable with optional TTL

Andrey Zagrebin created FLINK-9511:
--------------------------------------

             Summary: 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
             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}
 |

Another option is to consider adding StateDescriptor builder



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