zhanghw created FLINK-23506:
-------------------------------

             Summary: word_count.py 执行错误
                 Key: FLINK-23506
                 URL: https://issues.apache.org/jira/browse/FLINK-23506
             Project: Flink
          Issue Type: Bug
          Components: API / Python
    Affects Versions: 1.13.1
            Reporter: zhanghw


$ bin/flink run --python examples/python/table/batch/word_count.py $ bin/flink 
run --python examples/python/table/batch/word_count.py 

SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in 
[jar:file:/home/hdfs/flink-1.13.1/lib/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:
 Found binding in 
[jar:file:/home/hdfs/hadoop-3.2.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:
 See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.SLF4J: Actual binding is of type 
[org.apache.logging.slf4j.Log4jLoggerFactory]Results directory: 
/tmp/resultTraceback (most recent call last):  File 
"examples/python/table/batch/word_count.py", line 78, in <module>    
word_count()  File "examples/python/table/batch/word_count.py", line 72, in 
word_count    t_env.execute("word_count")  File 
"/home/hdfs/flink-1.13.1/opt/python/pyflink.zip/pyflink/table/table_environment.py",
 line 1315, in execute  File 
"/home/hdfs/flink-1.13.1/opt/python/py4j-0.10.8.1-src.zip/py4j/java_gateway.py",
 line 1286, in __call__  File 
"/home/hdfs/flink-1.13.1/opt/python/pyflink.zip/pyflink/util/exceptions.py", 
line 146, in deco  File 
"/home/hdfs/flink-1.13.1/opt/python/py4j-0.10.8.1-src.zip/py4j/protocol.py", 
line 328, in get_return_valuepy4j.protocol.Py4JJavaError: An error occurred 
while calling o10.execute.: java.lang.NoSuchMethodError: 
org.apache.flink.streaming.api.graph.StreamGraph.setJobType(Lorg/apache/flink/runtime/jobgraph/JobType;)V
 at 
org.apache.flink.streaming.api.graph.StreamGraphGenerator.configureStreamGraph(StreamGraphGenerator.java:329)
 at 
org.apache.flink.streaming.api.graph.StreamGraphGenerator.generate(StreamGraphGenerator.java:297)
 at 
org.apache.flink.table.planner.utils.ExecutorUtils.generateStreamGraph(ExecutorUtils.java:52)
 at 
org.apache.flink.table.planner.delegation.BatchExecutor.createPipeline(BatchExecutor.java:51)
 at 
org.apache.flink.table.api.internal.TableEnvironmentImpl.execute(TableEnvironmentImpl.java:1460)
 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.api.python.shaded.py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
 at 
org.apache.flink.api.python.shaded.py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
 at org.apache.flink.api.python.shaded.py4j.Gateway.invoke(Gateway.java:282) at 
org.apache.flink.api.python.shaded.py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
 at 
org.apache.flink.api.python.shaded.py4j.commands.CallCommand.execute(CallCommand.java:79)
 at 
org.apache.flink.api.python.shaded.py4j.GatewayConnection.run(GatewayConnection.java:238)
 at java.lang.Thread.run(Thread.java:748)
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:1762)
 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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to