PyFlink OverflowError: Python int too large to convert to C long

File "apache_beam/runners/worker/operations.py", line 357, in apache_beam.runners.worker.operations.Operation.output
  File "apache_beam/runners/worker/operations.py", line 359, in apache_beam.runners.worker.operations.Operation.output
  File "apache_beam/runners/worker/operations.py", line 221, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
  File "pyflink/fn_execution/beam/beam_operations_fast.pyx", line 71, in pyflink.fn_execution.beam.beam_operations_fast.FunctionOperation.process
  File "pyflink/fn_execution/beam/beam_operations_fast.pyx", line 85, in pyflink.fn_execution.beam.beam_operations_fast.FunctionOperation.process
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 166, in pyflink.fn_execution.coder_impl_fast.DataStreamFlatMapCoderImpl.encode_to_stream
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 72, in accept
    yield from self.process_element(normal_data, timestamp)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 117, in process_element
    yield from self._emit_output(output_result)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 133, in _emit_output
    yield from self._output_factory.from_normal_data(output_result)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/output_factory.py", line 62, in from_normal_data
    for normal_data in normal_data_iter:
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/datastream/window_operator.py", line 395, in process_element
    self.window_state.add(value)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 173, in add
    self.get_internal_state().add(v)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 125, in get_internal_state
    self.name, self.namespace, self._value_coder)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 972, in _get_internal_bag_state
    encoded_namespace = self._encode_namespace(namespace)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 1025, in _encode_namespace
    encoded_namespace = self._namespace_coder_impl.encode_nested(namespace)
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 841, in pyflink.fn_execution.coder_impl_fast.TimeWindowCoderImpl.encode_nested
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 843, in pyflink.fn_execution.coder_impl_fast.TimeWindowCoderImpl.encode_nested
OverflowError: Python int too large to convert to C long

	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
	at org.apache.beam.sdk.util.MoreFutures.get(MoreFutures.java:60)
	at org.apache.beam.runners.fnexecution.control.SdkHarnessClient$BundleProcessor$ActiveBundle.close(SdkHarnessClient.java:504)
	at org.apache.beam.runners.fnexecution.control.DefaultJobBundleFactory$SimpleStageBundleFactory$1.close(DefaultJobBundleFactory.java:555)
	at org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner.finishBundle(BeamPythonFunctionRunner.java:381)
	... 18 more
Caused by: java.lang.RuntimeException: Error received from SDK harness for instruction 4: Traceback (most recent call last):
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 289, in _execute
    response = task()
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 362, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 607, in do_instruction
    getattr(request, request_type), request.instruction_id)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 644, in process_bundle
    bundle_processor.process_bundle(instruction_id))
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1000, in process_bundle
    element.data)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 228, in process_encoded
    self.output(decoded_value)
  File "apache_beam/runners/worker/operations.py", line 357, in apache_beam.runners.worker.operations.Operation.output
  File "apache_beam/runners/worker/operations.py", line 359, in apache_beam.runners.worker.operations.Operation.output
  File "apache_beam/runners/worker/operations.py", line 221, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
  File "pyflink/fn_execution/beam/beam_operations_fast.pyx", line 71, in pyflink.fn_execution.beam.beam_operations_fast.FunctionOperation.process
  File "pyflink/fn_execution/beam/beam_operations_fast.pyx", line 85, in pyflink.fn_execution.beam.beam_operations_fast.FunctionOperation.process
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 166, in pyflink.fn_execution.coder_impl_fast.DataStreamFlatMapCoderImpl.encode_to_stream
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 72, in accept
    yield from self.process_element(normal_data, timestamp)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 117, in process_element
    yield from self._emit_output(output_result)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/input_handler.py", line 133, in _emit_output
    yield from self._output_factory.from_normal_data(output_result)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/utils/output_factory.py", line 62, in from_normal_data
    for normal_data in normal_data_iter:
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/datastream/window_operator.py", line 395, in process_element
    self.window_state.add(value)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 173, in add
    self.get_internal_state().add(v)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 125, in get_internal_state
    self.name, self.namespace, self._value_coder)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 972, in _get_internal_bag_state
    encoded_namespace = self._encode_namespace(namespace)
  File "/mnt/yarn/usercache/hadoop/appcache/application_1626312576687_0005/python-dist-ec818b88-ee9b-42d9-838b-9a13b7f845c3/python-archives/venv.zip/venv/lib64/python3.7/site-packages/pyflink/fn_execution/state_impl.py", line 1025, in _encode_namespace
    encoded_namespace = self._namespace_coder_impl.encode_nested(namespace)
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 841, in pyflink.fn_execution.coder_impl_fast.TimeWindowCoderImpl.encode_nested
  File "pyflink/fn_execution/coder_impl_fast.pyx", line 843, in pyflink.fn_execution.coder_impl_fast.TimeWindowCoderImpl.encode_nested
OverflowError: Python int too large to convert to C long

	at org.apache.beam.runners.fnexecution.control.FnApiControlClient$ResponseStreamObserver.onNext(FnApiControlClient.java:180)
	at org.apache.beam.runners.fnexecution.control.FnApiControlClient$ResponseStreamObserver.onNext(FnApiControlClient.java:160)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.ForwardingServerCallListener.onMessage(ForwardingServerCallListener.java:33)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.Contexts$ContextualizedServerCallListener.onMessage(Contexts.java:76)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more

org.apache.flink.client.program.ProgramAbortException: java.lang.RuntimeException: Python process exits with code: 1
	at org.apache.flink.client.python.PythonDriver.main(PythonDriver.java:134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
	at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246)
	at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054)
	at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
	at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132)
Caused by: java.lang.RuntimeException: Python process exits with code: 1
	at org.apache.flink.client.python.PythonDriver.main(PythonDriver.java:124)
	... 16 more
Exception in thread "Thread-11" java.lang.IllegalStateException: Trying to access closed classloader. Please check if you store classloaders directly or indirectly in static fields. If the stacktrace suggests that the leak occurs in a third party library and cannot be fixed immediately, you can disable this check with the configuration 'classloader.check-leaked-classloader'.
	at org.apache.flink.runtime.execution.librarycache.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.ensureInner(FlinkUserCodeClassLoaders.java:164)
	at org.apache.flink.runtime.execution.librarycache.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.getResource(FlinkUserCodeClassLoaders.java:183)
	at org.apache.hadoop.conf.Configuration.getResource(Configuration.java:2779)
	at org.apache.hadoop.conf.Configuration.getStreamReader(Configuration.java:3035)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2994)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2967)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2847)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:1199)
	at org.apache.hadoop.conf.Configuration.getTimeDuration(Configuration.java:1811)
	at org.apache.hadoop.conf.Configuration.getTimeDuration(Configuration.java:1788)
	at org.apache.hadoop.util.ShutdownHookManager.getShutdownTimeout(ShutdownHookManager.java:183)
	at org.apache.hadoop.util.ShutdownHookManager.shutdownExecutor(ShutdownHookManager.java:145)
	at org.apache.hadoop.util.ShutdownHookManager.access$300(ShutdownHookManager.java:65)
	at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:102)

你可能感兴趣的:(Flink)