Run an Apache flink job in python, using Kafka without Docker

51 Views Asked by At

I would like to run the Greeter example https://github.com/apache/flink-statefun-playground/blob/release-3.3/python/greeter/functions.py on my computer, but without Docker to be sure I setup Flink and Kafka manually and properly (and to understand how to do so). From what I understand I need several components:

1 - Flink, I have Java & Flink installed and I am running a flink instance with:

./start-cluster.sh

2 - Kafka (I am on Windows), in 2 cmd I enter these to start it:

.\kafka_2.13-3.6.0\bin\windows\zookeeper-server-start.bat .\kafka_2.13-3.6.0\config\zookeeper.properties
.\kafka_2.13-3.6.0\bin\windows\kafka-server-start.bat .\kafka_2.13-3.6.0\config\server.properties

3 - At this point I still need to let Kafka be an entry point (ingress) and output point (egress) for Flink, so where do the file https://github.com/apache/flink-statefun-playground/blob/release-3.3/python/greeter/module.yaml shoud live?

4 - My biggest problem is how to trigger / test the code ... I should run the code where the greeter functions are located:

python functions.py

and then do a POST to http://localhost/statefun but with which data?

I thank you in advance for the answer, feel free to correct me if I did not express myself correctly ..

0

There are 0 best solutions below