Skip to content

Commit

Permalink
Set number of task managers and task slots when running Flink YARN se…
Browse files Browse the repository at this point in the history
…ssion
  • Loading branch information
he-sk committed Sep 28, 2020
1 parent e62f417 commit f72d404
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ class FlinkYarnSession(

// await for all futureInitOps to finish
Await.result(futureInitOps, Math.max(30, 5 * hosts.size).seconds)
val numberOfTaskSlots = config.getString(s"system.$configKey.config.yaml.taskmanager.numberOfTaskSlots")

var failedStartUpAttempts = 0
while (!isUp) {
try {
var done = false

shell ! s"${config.getString(s"system.$configKey.path.home")}/bin/yarn-session.sh -d"
shell ! s"${config.getString(s"system.$configKey.path.home")}/bin/yarn-session.sh -n ${hosts.size} -s $numberOfTaskSlots -d"

var cntr = config.getInt(s"system.$configKey.startup.polling.counter")
while (!done) {
Expand Down

0 comments on commit f72d404

Please sign in to comment.