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

Clear up StateBackend, AbstractStateBackend abstractions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: DataStream API
    • Labels:
      None

      Description

      Currently there is a StateBackend interface and an AbstractStateBackend class which are not very closely related to each other. I think this should be cleared up before the 1.0 release a little bit.

      The KvState for instance requires an AbstractStateBackend which does not implement the StateBackend. On the other hand the StateDescriptors bind to StateBackends

      I think we could get rid of the StateBackend interface and rename the AbstractStateBackend -> StateBackend. We only need to modify the bind method of the descriptors.

        Activity

        Hide
        aljoscha Aljoscha Krettek added a comment -

        StateBackend could be StateBinder.

        Show
        aljoscha Aljoscha Krettek added a comment - StateBackend could be StateBinder .
        Hide
        StephanEwen Stephan Ewen added a comment -

        I think the AbstractStateBackend should actually implement StateBackend.

        Then we have something similar as for example the Java Collection Library:

        • List is the basic interface
        • AbstractList has all the shared methods (like "contains()" or" toArray()")
        • ArrayList is the specific implementation
        Show
        StephanEwen Stephan Ewen added a comment - I think the AbstractStateBackend should actually implement StateBackend . Then we have something similar as for example the Java Collection Library: List is the basic interface AbstractList has all the shared methods (like "contains()" or" toArray()") ArrayList is the specific implementation
        Hide
        aljoscha Aljoscha Krettek added a comment -

        I'm not so sure. The StateBackend needs to be aware of the namespace of the currently requested state. See getPartitionedState where an anonymous StateBackend is created that then calls the state creation methods on AbstractStateBackend with the actual namespace. So I still think StateBinder would be a good name for that.

        Show
        aljoscha Aljoscha Krettek added a comment - I'm not so sure. The StateBackend needs to be aware of the namespace of the currently requested state. See getPartitionedState where an anonymous StateBackend is created that then calls the state creation methods on AbstractStateBackend with the actual namespace. So I still think StateBinder would be a good name for that.
        Hide
        aljoscha Aljoscha Krettek added a comment -

        This was fixed via some other changes.

        Show
        aljoscha Aljoscha Krettek added a comment - This was fixed via some other changes.
        Hide
        aljoscha Aljoscha Krettek added a comment -

        Reopen to fix component

        Show
        aljoscha Aljoscha Krettek added a comment - Reopen to fix component

          People

          • Assignee:
            Unassigned
            Reporter:
            gyfora Gyula Fora
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development