Re: How to pre upload jar file on Flink Session Cluster Instead of adding manually from the Web UI
Posted by
Yang Wang on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/How-to-pre-upload-jar-file-on-Flink-Session-Cluster-Instead-of-adding-manually-from-the-Web-UI-tp41252p41254.html
Hi Robert,
After checking the JarRunHandler implementation, I think you requirement could be done as following steps.
1. Use the init container to download the user jars or directly baked jars into the image under path /path/of/flink-jars/flink-web-upload
2. Set the Flink configuration option "web.upload.dir: /path/of/flink-jars" for your session cluster. Please note that do not contains the "flink-web-upload" sub directory.
3. Submit the job via the curl command
curl -H "Content-Type: application/json" -X POST -d '{"entryClass":"org.apache.flink.streaming.examples.statemachine.StateMachineExample","parallelism":null,"programArgs":null,"savepointPath":null,"allowNonRestoredState":null}'
http://localhost:8081/jars/StateMachineExample.jar/run
Moreover, you could also have a try with the application mode. Both the standalone[1] and native application[2] mode could meet your requirements with better isolation.
Best,
Yang
I have a Kubernetes cluster with Flink running in Session Mode.
Is there a way to drop the jar file into a folder and/or add it to the Docker image?
--
Robert Cullen
240-475-4490