Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/1099#discussion_r13843048
--- Diff:
yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
@@ -160,15 +160,19 @@ class Client(args: ClientArguments, conf:
Configuration, sparkConf: SparkConf)
// If we have requested more then the clusters max for a single
resource then exit.
if (args.workerMemory > maxMem) {
- logError("Required worker memory (%d MB), is above the max threshold
(%d MB) of this cluster.".
- format(args.workerMemory, maxMem))
- System.exit(1)
+ val errorMessage = "Required worker memory (%d MB), is above the max
threshold (%d MB) of this cluster."
+ .format(args.workerMemory, maxMem)
+ logError(errorMessage)
+ throw new IllegalArgumentException(errorMessage)
+
}
val amMem = args.amMemory + YarnAllocationHandler.MEMORY_OVERHEAD
if (amMem > maxMem) {
- logError("Required AM memory (%d) is above the max threshold (%d) of
this cluster".
- format(args.amMemory, maxMem))
- System.exit(1)
+ val errorMessage = "Required AM memory (%d) is above the max
threshold (%d) of this cluster"
+ .format(args.amMemory, maxMem)
+ logError(errorMessage)
+ throw new IllegalArgumentException(errorMessage)
+
--- End diff --
same.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---