我正在尝试运行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:11org.apache.flink.runtime.JobException:恢复被NoRestartBackoffTimeStrategy抑制网址:org.apache.flink.runtime.executiongraph.f故障切换.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138)网址:org.apache.flink.runtime.executiongraph.f故障切换.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82)网址:org.apache.flink.runtimescheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:228)网址:org.apache.flink.runtimescheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:218)网址:org.apache.flink.runtimescheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:209)网址:org.apache.flink.runtimescheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:679)位于org.apache.flink.runtime.SchedulerNG.updateTaskExecutionState(SchedulerNG.java:79)网址:org.apache.flink.runtime.jobmaster.jobmaster.updateTaskExecutionState(jobmaster.java:444)位于java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)位于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.ioke(Method.java:564)网址:org.apache.flink.runtime.rpc.akka.AkkaRpcActorLambda$handleRpcInvocation$1(AkkaRpcActor.java:316)网址: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)网址:org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkka RpcActor.java:78)网址: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.applyOrElse$(PartialFunction.scala:122)在akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)在scala。PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)在scala。PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)在scala。PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)在akka.aactor.actor.aroundRecive(actor.scala:537)在akka.aactor.actor.aroundRecive$(actor.scala:535)在akka.actor.AbstractActor.aroundRecive(AbstractActor.scala:220)在akka.aactor.ActorCell.rereceiveMessage(ActorCell.scala:580)在akka.aactor.ActorCell.ioke(ActorCell.scala:548)位于akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)在akka.dispatch.Mailbox.run(Mailbox.scala:231)位于akka.dispatch.Mailbox.exec(Mailbox.scala:243)位于java.base/java.util.concurrent.FukJoinTask.doExec(ForkJoinTask.java:290)位于java.base/java.util.concurrent.FukJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)位于java.base/java.util.concurrent.FukJoinPool.scan(ForkJoinPool.java:1665)位于java.base/java.util.concurrent.FukJoinPool.runWorker(ForkJoinPool.java:1598)位于java.base/java.util.concurrent.FForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)由以下原因引起:java.lang.ExceptionInInitializerError网址:org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner.createPythonExecutionEnvironment(BeanPythonFunctionRunner.java:401)网址:org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner.lambda$open$0(BeamPython FunctionRunner.java:243)位于org.apache.flink.runtime.memory.MemoryManagerLambda$getSharedMemoryResourceForManagedMemory$5(MemoryManager.java:539)位于org.apache.flink.runtime.memory.SharedResources.createResource(SharedResources.java:126)位于org.apache.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(BeamPython FunctionRunner.java:246)网址:org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperator.open(AbstractpythonFunctionOperationr.java:131)网址:org.apache.flink.streaming.api.operators.python.AbstractOneInputPythonFunctionOperator.open(AbstractoneInputPython FunctionOperator.java:116)网址:org.apache.flink.streaming.api.operators.python.PythonProcessOperator.open(PythonPProcessOperator.java:59)网址:org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorsChain.java:110)网址:org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:711)网址:org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutiator$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)网址:org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)网址:org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927)网址: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版本:14网址:org.apache.beam.runners.core.constructure.Environments$JavaVersion.forSpecification(Environments.java:106)网址:org.apache.beam.runners.core.constructure.Environments.getJavaVersion(Environments.java:355)网址:org.apache.beam.runners.core.constructure.Environments.getDefaultJavaSdkHarnessContainerUrl(Environments.java:402)网址:org.apache.beam.runners.core.constructure.Environments。(Environments.java:119)…还有20个
java.lang.UnsupportedOperationException: unsupported Java version: 14
Java版本似乎是错误的。请尝试安装其他版本。