pyflink get_list_state报错

  File "/app/app/hadoop-3.2.1/tmp/nm-local-dir/usercache/root/appcache/application_1685180983025_0004/python-dist-8c4d25c0-070e-4bcc-9d96-d79b23f95d7d/python-archives/venv.zip/venv/lib/python3.9/site-packages/pyflink/fn_execution/datastream/process/input_handler.py", line 131, in _emit_results
    for result in results:
  File "/app/app/flink-1.16.0/opt/python/pyflink.zip/pyflink/datastream/data_stream.py", line 1192, in process_element
  File "/tmp/pyflink/d4e74486-b577-46a1-a677-137b0b9f17ea/84c56d88-e00a-4acb-95ed-6e26ec0afd1b/process_clpf_gaps.py", line 163, in flat_map
AttributeError: 'NoneType' object has no attribute 'group'


in commit
    self.commit_internal_state(internal_state)
  File "/app/app/hadoop-3.2.1/tmp/nm-local-dir/usercache/root/appcache/application_1685180983025_0004/python-dist-438ab188-9ef9-4d2c-9bed-276e57e37293/python-archives/venv.zip/venv/lib/python3.9/site-packages/pyflink/fn_execution/state_impl.py", line 1213, in commit_internal_state
    internal_state.commit()
  File "/app/app/hadoop-3.2.1/tmp/nm-local-dir/usercache/root/appcache/application_1685180983025_0004/python-dist-438ab188-9ef9-4d2c-9bed-276e57e37293/python-archives/venv.zip/venv/lib/python3.9/site-packages/apache_beam/runners/worker/bundle_processor.py", line 566, in commit
    to_await = self._state_handler.extend(
  File "/app/app/hadoop-3.2.1/tmp/nm-local-dir/usercache/root/appcache/application_1685180983025_0004/python-dist-438ab188-9ef9-4d2c-9bed-276e57e37293/python-archives/venv.zip/venv/lib/python3.9/site-packages/apache_beam/runners/worker/sdk_worker.py", line 1190, in extend
    coder.encode_to_stream(element, out, True)
  File "pyflink/fn_execution/beam/beam_coder_impl_fast.pyx", line 53, in pyflink.fn_execution.beam.beam_coder_impl_fast.FlinkFieldCoderBeamWrapper.encode_to_stream
  File "pyflink/fn_execution/beam/beam_coder_impl_fast.pyx", line 54, in pyflink.fn_execution.beam.beam_coder_impl_fast.FlinkFieldCoderBeamWrapper.encode_to_stream
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 795, in pyflink.fn_execution.coder_impl_fast.GenericArrayCoderImpl.encode_to_stream
TypeError: Expected list, got str


class MyMapFunction(FlatMapFunction):
    def open(self, runtime_context: RuntimeContext):
        self.process_id_to_bus_seq = runtime_context.get_map_state(MapStateDescriptor('process_id_map_bus_seq', Types.STRING(), Types.STRING()))
        self.gapslist=runtime_context.get_list_state(ListStateDescriptor('process_list', Types.LIST(Types.STRING())))


self.gapslist.add(message)

这行报错导致
 

猜你喜欢

转载自blog.csdn.net/zhaoyangjian724/article/details/131417884
今日推荐