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

BatchExecutionKeyedStateBackend is using incorrect ExecutionConfig when creating serializer

    XMLWordPrintableJSON

Details

    Description

      org.apache.flink.streaming.api.operators.sorted.state.BatchExecutionKeyedStateBackend#getOrCreateKeyedState is using freshly constructed ExecutionConfig, instead of the one configured by the user from the environment.

          public <N, S extends State, T> S getOrCreateKeyedState(
                  TypeSerializer<N> namespaceSerializer, StateDescriptor<S, T> stateDescriptor)
                  throws Exception {
              checkNotNull(namespaceSerializer, "Namespace serializer");
              checkNotNull(
                      keySerializer,
                      "State key serializer has not been configured in the config. "
                              + "This operation cannot use partitioned state.");
      
              if (!stateDescriptor.isSerializerInitialized()) {
                  stateDescriptor.initializeSerializerUnlessSet(new ExecutionConfig());
              }
      

      The correct one could be obtained from env.getExecutionConfig() in org.apache.flink.streaming.api.operators.sorted.state.BatchExecutionStateBackend#createKeyedStateBackend

      Attachments

        Issue Links

          Activity

            People

              dwysakowicz Dawid Wysakowicz
              pnowojski Piotr Nowojski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: