当我使用以下代码在 Flink CLI 中运行 Python 文件时:
python3 word_count.py
我得到这样的错误:
Traceback (most recent call last):
File "word_count.py", line 79, in <module>
word_count()
File "word_count.py", line 37, in word_count
t_config = TableConfig()
File "/usr/local/lib/python3.7/dist-packages/pyflink/table/table_config.py", line 49, in __init__
gateway = get_gateway()
File "/usr/local/lib/python3.7/dist-packages/pyflink/java_gateway.py", line 68, in get_gateway
callback_server_listening_address, callback_server_listening_port)
TypeError: 'JavaPackage' object is not callable
我改变了运行这个 Python 文件的方式:
./bin/flink run --python3 /opt/flink/examples/python/table/batch/word_count.py
我得到另一个错误:
Could not build the program from JAR file.
Use the help option (-h or --help) to get help on the command.