Skip to content

Commit 742582f

Browse files
committed
Set number of task managers and task slots when running Flink YARN session
1 parent 77730b0 commit 742582f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

peel-extensions/src/main/scala/org/peelframework/flink/beans/system/FlinkYarnSession.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,14 @@ class FlinkYarnSession(
9393

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

9798
var failedStartUpAttempts = 0
9899
while (!isUp) {
99100
try {
100101
var done = false
101102

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

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

0 commit comments

Comments
 (0)