devaraj-kavali commented on a change in pull request #17726: [SPARK-17928] [Mesos] No driver.memoryOverhead setting for mesos cluster mode URL: https://github.com/apache/spark/pull/17726#discussion_r247592016
########## File path: resource-managers/mesos/src/test/scala/org/apache/spark/deploy/rest/mesos/MesosRestServerSuite.scala ########## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.deploy.rest.mesos + +import javax.servlet.http.HttpServletResponse + +import org.scalatest.mockito.MockitoSugar + +import org.apache.spark.{SparkConf, SparkFunSuite} +import org.apache.spark.deploy.TestPrematureExit +import org.apache.spark.deploy.mesos.MesosDriverDescription +import org.apache.spark.deploy.rest.{CreateSubmissionRequest, CreateSubmissionResponse, SubmitRestProtocolMessage, SubmitRestProtocolResponse} +import org.apache.spark.internal.config +import org.apache.spark.scheduler.cluster.mesos.{MesosClusterPersistenceEngineFactory, MesosClusterScheduler} + +class MesosRestServerSuite extends SparkFunSuite + with TestPrematureExit with MockitoSugar { + + test("test default driver overhead memory") { + testOverheadMemory(new SparkConf(), 2384) + } + + test("test configured driver overhead memory") { + val conf = new SparkConf() + conf.set(config.DRIVER_MEMORY_OVERHEAD.key, "1000") + testOverheadMemory(conf, 3000) + } + Review comment: Thanks @rvesse for explaining it. I don't think it is a better way to auto-correct the wrong value if it is explicitly configured by the user instead of failing and letting the user know. And also it makes no-way to configure small value if the users want to have based on their workload. I see that the same is followed in yarn and k8s deployment modes as well, if we want to change this we may have to change in yarn and k8s also. Please let me know either way. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
