flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9511) Implement TTL config
Date Tue, 10 Jul 2018 08:53:00 GMT

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

ASF GitHub Bot commented on FLINK-9511:
---------------------------------------

Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6277#discussion_r201264096
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfiguration.java
---
    @@ -93,4 +97,82 @@ public Time getTtl() {
     	public TtlTimeCharacteristic getTimeCharacteristic() {
     		return timeCharacteristic;
     	}
    +
    +	@Override
    +	public String toString() {
    +		return "StateTtlConfiguration{" +
    +			"ttlUpdateType=" + ttlUpdateType +
    +			", stateVisibility=" + stateVisibility +
    +			", timeCharacteristic=" + timeCharacteristic +
    +			", ttl=" + ttl +
    +			'}';
    +	}
    +
    +	public static Builder newBuilder(Time ttl) {
    +		return new Builder(ttl);
    +	}
    +
    +	/**
    +	 * Builder for the {@link StateTtlConfiguration}.
    +	 */
    +	public static class Builder {
    +
    +		private TtlUpdateType ttlUpdateType = OnCreateAndWrite;
    +		private TtlStateVisibility stateVisibility = NeverReturnExpired;
    +		private TtlTimeCharacteristic timeCharacteristic = ProcessingTime;
    +		private Time ttl;
    +
    +		public Builder(Time ttl) {
    --- End diff --
    
    @azagrebin I removed the default value for TimeCharacteristic, it will depend on users'
choice. Do you agree this mode?


> Implement TTL config
> --------------------
>
>                 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
>              Labels: pull-request-available
>             Fix For: 1.6.0
>
>
> `TtlConfig` has to be in flink core module.
> Another option is to consider adding TtlConfig builder.



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

Mime
View raw message