0

我正在尝试运行 Apache Flink 1.14.0 附带的 python 示例,但不断出现错误。我按照说明安装,.jar示例工作正常,所以我不确定 python 有什么问题。

例如,该命令./bin/flink run --python /Users/[...]/flink-1.14.0/examples/python/datastream/word_count.py会生成以下异常:

2021-11-05 23:04:11 org.apache.flink.runtime.JobException:恢复被 org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138) 的 NoRestartBackoffTimeStrategy 抑制在 org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82) 在 org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:228) 在 org.apache .flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:218) 在 org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:209) 在 org.apache.flink.runtime.scheduler.SchedulerBase .updateTaskExecutionState(SchedulerBase.java:679) 在 org.apache.flink.runtime.scheduler.SchedulerNG。updateTaskExecutionState(SchedulerNG.java:79) at org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:444) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java。 base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.base/java.lang.reflect。 Method.invoke(Method.java:564) at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:316) at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils .runWithContextClassLoader(ClassLoadingUtils.java:83) 在 org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:314) 在 org.apache.flink.runtime.rpc.akka.AkkaRpcActor。handleRpcMessage(AkkaRpcActor.java:217) at org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:78) at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor. java:163) 在 akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) 在 akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) 在 scala.PartialFunction.applyOrElse(PartialFunction.scala:123 ) 在 scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) 在 scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) 在 akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) 在 scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at akka.actor.Actor.aroundReceive(Actor.scala:537) at akka.actor.Actor。aroundReceive$(Actor.scala:535) at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) at akka.actor.ActorCell.invoke(ActorCell. scala:548) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:27​​0) at akka.dispatch.Mailbox.run(Mailbox.scala:231) at akka.dispatch.Mailbox.exec(Mailbox.scala:243) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) 在 java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) 在 java.base/java。 util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) 在 java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) 在 java.base/java.util.concurrent.ForkJoinWorkerThread.run( ForkJoinWorkerThread.java:183) 原因:org.apache.flink 中的 java.lang.ExceptionInInitializerError。streaming.api.runners.python.beam.BeamPythonFunctionRunner.createPythonExecutionEnvironment(BeamPythonFunctionRunner.java:401) at org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner.lambda$open$0(BeamPythonFunctionRunner.java:243)在 org.apache.flink.runtime.memory.SharedResources.createResource(SharedResources.java:126) 在 org.apache.org.apache.flink.runtime.memory.MemoryManager.lambda$getSharedMemoryResourceForManagedMemory$5(MemoryManager.java:539)。 flink.runtime.memory.SharedResources.getOrAllocateSharedResource(SharedResources.java:72) 在 org.apache.flink.runtime.memory.MemoryManager.getSharedMemoryResourceForManagedMemory(MemoryManager.java:555) 在 org.apache.flink.streaming.api.runners。 python.beam.BeamPythonFunctionRunner.open(BeamPythonFunctionRunner.java:246) 在 org.apache.flink.streaming.api.operators.python。AbstractPythonFunctionOperator.open(AbstractPythonFunctionOperator.java:131) at org.apache.flink.streaming.api.operators.python.AbstractOneInputPythonFunctionOperator.open(AbstractOneInputPythonFunctionOperator.java:116) at org.apache.flink.streaming.api.operators.python。 PythonProcessOperator.open(PythonProcessOperator.java:59) at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:110) at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates( StreamTask.java:711) 在 org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.call(StreamTaskActionExecutor.java:100) 在 org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask. java:687) 在 org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:654) at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) at org.apache .flink.runtime.taskmanager.Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run (Thread.java:832) 原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 org.apache 的 14 .beam.runners.core.construction.Environments.getJavaVersion(Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners .core.construction.Environments.(Environments.java:119) ... 20 更多654) 在 org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) 在 org.apache.flink .runtime.taskmanager.Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread .java:832) 原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 org.apache.beam 的 14 .runners.core.construction.Environments.getJavaVersion(Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core .construction.Environments.(Environments.java:119) ... 20 更多654) 在 org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) 在 org.apache.flink .runtime.taskmanager.Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread .java:832) 原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 org.apache.beam 的 14 .runners.core.construction.Environments.getJavaVersion(Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core .construction.Environments.(Environments.java:119) ... 20 更多org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) 的 org.apache.flink.runtime.taskmanager 的 apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)。 Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread.java:832)原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 org.apache.beam.runners.core 的 14。 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 中的 construction.Environments.getJavaVersion(Environments.java:355)。 (Environments.java:119) ... 20 更多org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) 的 org.apache.flink.runtime.taskmanager 的 apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)。 Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread.java:832)原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 org.apache.beam.runners.core 的 14。 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 中的 construction.Environments.getJavaVersion(Environments.java:355)。 (Environments.java:119) ... 20 更多taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task. java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread.java:832) 原因:java.lang .UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 14 处 org.apache.beam.runners.core.construction.Environments.getJavaVersion( Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119 ) ... 20 更多taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task. java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) at java.base/java.lang.Thread.run(Thread.java:832) 原因:java.lang .UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 的 14 处 org.apache.beam.runners.core.construction.Environments.getJavaVersion( Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119 ) ... 20 更多runWithSystemExitMonitoring(Task.java:958) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)在 org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) 在 java.base/java.lang.Thread.run(Thread.java:832) 引起:java.lang.UnsupportedOperationException:不支持Java 版本: org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 中的 14,在 org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java: 355) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) 的 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) ...还有 20 个runWithSystemExitMonitoring(Task.java:958) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)在 org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) 在 java.base/java.lang.Thread.run(Thread.java:832) 引起:java.lang.UnsupportedOperationException:不支持Java 版本: org.apache.beam.runners.core.construction.Environments$JavaVersion.forSpecification(Environments.java:106) 中的 14,在 org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java: 355) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) 的 org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) ...还有 20 个restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)在 java.base/java.lang.Thread.run(Thread.java:832) 引起:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion 的 14。 forSpecification(Environments.java:106) at org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java:355) at org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments. java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) ... 20 更多restoreAndInvoke(Task.java:927) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)在 java.base/java.lang.Thread.run(Thread.java:832) 引起:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction.Environments$JavaVersion 的 14。 forSpecification(Environments.java:106) at org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java:355) at org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments. java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) ... 20 更多java:575) 在 java.base/java.lang.Thread.run(Thread.java:832) 原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction 的 14。 Environments$JavaVersion.forSpecification(Environments.java:106) 在 org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments。 getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) ... 20 更多java:575) 在 java.base/java.lang.Thread.run(Thread.java:832) 原因:java.lang.UnsupportedOperationException:不支持的 Java 版本:org.apache.beam.runners.core.construction 的 14。 Environments$JavaVersion.forSpecification(Environments.java:106) 在 org.apache.beam.runners.core.construction.Environments.getJavaVersion(Environments.java:355) 在 org.apache.beam.runners.core.construction.Environments。 getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) 在 org.apache.beam.runners.core.construction.Environments.(Environments.java:119) ... 20 更多Environments.getJavaVersion(Environments.java:355) at org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) at org.apache.beam.runners.core.construction.Environments.(Environments .java:119) ... 20 多个Environments.getJavaVersion(Environments.java:355) at org.apache.beam.runners.core.construction.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402) at org.apache.beam.runners.core.construction.Environments.(Environments .java:119) ... 20 多个

4

1 回答 1

0
java.lang.UnsupportedOperationException: unsupported Java version: 14

Java版本似乎是错误的。尝试安装另一个版本。

于 2021-11-06T18:41:21.817 回答