Github user jerryshao commented on a diff in the pull request: https://github.com/apache/spark/pull/18322#discussion_r123415327 --- Diff: core/src/main/scala/org/apache/spark/SparkConf.scala --- @@ -543,6 +545,42 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging with Seria } } + if (contains("spark.driver.memory")) { + val driverMemory = get("spark.driver.memory") + if (Try(JavaUtils.byteStringAsBytes(driverMemory)).getOrElse(-1L) <= 0) { + throw new IllegalArgumentException(s"spark.driver.memory " + + s"(was ${driverMemory}) can only be a positive number") + } + } + if (contains("spark.executor.memory")) { + val executorMemory = get("spark.executor.memory") + if (Try(JavaUtils.byteStringAsBytes(executorMemory)).getOrElse(-1L) <= 0) { + throw new IllegalArgumentException(s"spark.executor.memory " + + s"(was ${executorMemory}) can only be a positive number") + } --- End diff -- This above two checks seems unnecessary, let's not change unrelated code.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org