Reputation: 1565
From the Flink official document we know that we can "Run a single Flink job on YARN " by the command below ,my question is can we "Run a single Flink job on YARN " by Rest API, and got the application API ?
./bin/flink run -m yarn-cluster -yn 2 ./examples/batch/WordCount.jar
Upvotes: 0
Views: 1346
Reputation: 9245
See the (somewhat deceptively named) Monitoring REST API. You can use the /jars/upload
request to send your (fat/uber) jar to the cluster. This returns back an id, that you can use with the /jars/:jarid/run
request to start your job.
If you also need to start up the cluster, then you're currently (AFAIK) going to need to write some Java code to start a cluster on YARN. There are two source files in Flink that do this same thing:
Upvotes: 1