Hello, I have a managed Flink application on AWS (...
# troubleshooting
j
Hello, I have a managed Flink application on AWS (version 1.15) and have the following keyed co-processing function:
Copy code
class Function(KeyedCoProcessFunction):

    parameter: Types.STRING

    def open(self, runtime_context: RuntimeContext) -> None:
        ttl_config = (
            StateTtlConfig.new_builder(Time.days(1))
            .set_update_type(StateTtlConfig.UpdateType.OnReadAndWrite)
            .set_state_visibility(StateTtlConfig.StateVisibility.NeverReturnExpired)
            .build()
        )
        self.parameter = runtime_context.get_state(
            ValueStateDescriptor(f"Value store for parameter", Types.STRING())
        )
        self.parameter.enable_time_to_live(ttl_config)

    def process_element1(self, value, ctx: KeyedCoProcessFunction.Context) -> None:
        self.parameter.value()  # line that fails
        ...

    ...
Works fine for the most part, but I get errors from time to time. Anyone knows why I'm getting this error?
y
This smells like a bug. Seems like something is trying re-initialize already initialized serializer. This should happen once per operator.
j
That sucks. Managed aws severly limits my ability to update the code.
But thanks for the swift feedback. Much apriciated.
πŸ‘πŸ» 1