You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Aljoscha Krettek (JIRA)" <ji...@apache.org> on 2019/03/20 14:44:00 UTC
[jira] [Closed] (FLINK-11825) Resolve name clash of StateTTL
TimeCharacteristic class
[ https://issues.apache.org/jira/browse/FLINK-11825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aljoscha Krettek closed FLINK-11825.
------------------------------------
Resolution: Fixed
Fixed on master in
6a66f7acf370e12ad65ee24293ed47d2c5db225c
> Resolve name clash of StateTTL TimeCharacteristic class
> -------------------------------------------------------
>
> Key: FLINK-11825
> URL: https://issues.apache.org/jira/browse/FLINK-11825
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / State Backends
> Affects Versions: 1.7.2, 1.8.1
> Reporter: Fabian Hueske
> Assignee: Congxian Qiu(klion26)
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.9.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The StateTTL feature introduced the class \{{org.apache.flink.api.common.state.TimeCharacteristic}} which clashes with \{{org.apache.flink.streaming.api.TimeCharacteristic}}.
> This is a problem for two reasons:
> 1. Users get confused because the mistakenly import \{{org.apache.flink.api.common.state.TimeCharacteristic}}.
> 2. When using the StateTTL feature, users need to spell out the package name for \{{org.apache.flink.api.common.state.TimeCharacteristic}} because the other class is most likely already imported.
> Since \{{org.apache.flink.streaming.api.TimeCharacteristic}} is one of the most used classes of the DataStream API, we should make sure that users can use it without import problems.
> These error are hard to spot and confusing for many users.
> I see two ways to resolve the issue:
> 1. drop \{{org.apache.flink.api.common.state.TimeCharacteristic}} and use \{{org.apache.flink.streaming.api.TimeCharacteristic}} throwing an exception if an incorrect characteristic is used.
> 2. rename the class \{{org.apache.flink.api.common.state.TimeCharacteristic}} to some other name.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)