Skip to content

Commit 51406be

Browse files
watermenrxin
authored andcommitted
[SPARK-9737] [YARN] Add the suggested configuration when required executor memory is above the max threshold of this cluster on YARN mode
Author: Yadong Qi <[email protected]> Closes apache#8028 from watermen/SPARK-9737 and squashes the following commits: 48bdf3d [Yadong Qi] Add suggested configuration. (cherry picked from commit 86fa4ba) Signed-off-by: Reynold Xin <[email protected]>
1 parent 0e4f58e commit 51406be

File tree

1 file changed

+4
-2
lines changed
  • yarn/src/main/scala/org/apache/spark/deploy/yarn

1 file changed

+4
-2
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,14 @@ private[spark] class Client(
203203
val executorMem = args.executorMemory + executorMemoryOverhead
204204
if (executorMem > maxMem) {
205205
throw new IllegalArgumentException(s"Required executor memory (${args.executorMemory}" +
206-
s"+$executorMemoryOverhead MB) is above the max threshold ($maxMem MB) of this cluster!")
206+
s"+$executorMemoryOverhead MB) is above the max threshold ($maxMem MB) of this cluster! " +
207+
"Please increase the value of 'yarn.scheduler.maximum-allocation-mb'.")
207208
}
208209
val amMem = args.amMemory + amMemoryOverhead
209210
if (amMem > maxMem) {
210211
throw new IllegalArgumentException(s"Required AM memory (${args.amMemory}" +
211-
s"+$amMemoryOverhead MB) is above the max threshold ($maxMem MB) of this cluster!")
212+
s"+$amMemoryOverhead MB) is above the max threshold ($maxMem MB) of this cluster! " +
213+
"Please increase the value of 'yarn.scheduler.maximum-allocation-mb'.")
212214
}
213215
logInfo("Will allocate AM container, with %d MB memory including %d MB overhead".format(
214216
amMem,

0 commit comments

Comments
 (0)