Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11825

Resolve name clash of StateTTL TimeCharacteristic class

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              klion26 Congxian Qiu
              fhueske Fabian Hueske
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m