Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,9 @@ private[spark] class ClientArguments(args: Array[String], sparkConf: SparkConf)
* This is intended to be called only after the provided arguments have been parsed.
*/
private def validateArgs(): Unit = {
// TODO: memory checks are outdated (SPARK-3476)
Map[Boolean, String](
(numExecutors <= 0) -> "You must specify at least 1 executor!",
(amMemory <= amMemoryOverhead) -> s"AM memory must be > $amMemoryOverhead MB",
(executorMemory <= executorMemoryOverhead) ->
s"Executor memory must be > $executorMemoryOverhead MB"
).foreach { case (errorCondition, errorMessage) =>
if (errorCondition) {
throw new IllegalArgumentException(errorMessage + "\n" + getUsageMessage())
}
if (numExecutors <= 0) {
throw new IllegalArgumentException(
"You must specify at least 1 executor!\n" + getUsageMessage())
}
}

Expand Down