Tom
Tom

Reputation: 6342

Flink 1.12.0 on yarn doesn't recognize yn

I used the following script to submit my application on yarn.

MAIN_CLASS=org.example.app.HelloFlink
flink run -m yarn-cluster -yn 4 -ys 1 -ynm FlinkHiveIntegrationTest -c $MAIN_CLASS /learn.flink.ioc-1.0-SNAPSHOT.jar

It complains that Could not get job jar and dependencies from JAR file: JAR file does not exist: -yn.

When I remove the -yn 4 in the script,then it works. I have used -yn in previous flink version to specify the number of containers. So, how could I specify the number of containers for Flink 1.12.0

Upvotes: 0

Views: 821

Answers (1)

David Anderson
David Anderson

Reputation: 43524

The -yn option was deprecated by FLIP-6, and has been ignored since the legacy runtime was removed in Flink 1.8. Now this option is no longer recognized by the CLI; see FLINK-12362.

Instead, the ResourceManager will automatically launch as many containers as are needed to satisfy the parallelism requested by the job.

Upvotes: 2

Related Questions