When I run a Python file in Flink CLI using the following code:
python3 word_count.py
I got the error like this:
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
And I changed the way to run this Python file:
./bin/flink run --python3 /opt/flink/examples/python/table/batch/word_count.py
I got another error :
Could not build the program from JAR file.
Use the help option (-h or --help) to get help on the command.