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_r247452065
 
 

 ##########
 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:
   Sorry If I did not understand you correctly.
   
   Here the intent of PR is to take the value whatever is set for 
`config.DRIVER_MEMORY_OVERHEAD.key`, if there is no value set for 
`config.DRIVER_MEMORY_OVERHEAD.key` then take the max (0.10*driver_mem, 384). 
   
   Having another test with `conf.set(config.DRIVER_MEMORY_OVERHEAD.key, "10")` 
doesn't make the difference with the existing one 
`conf.set(config.DRIVER_MEMORY_OVERHEAD.key, "1000")` since it is going to take 
the value whatever set.
   
   Please let me know if it still doesn't make sense.

----------------------------------------------------------------
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]

Reply via email to