diff --git a/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala b/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala index 07c6190b390b8..13040cfaa1238 100644 --- a/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala +++ b/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala @@ -485,14 +485,14 @@ private[spark] object CoarseGrainedExecutorBackend extends Logging { .executorResources .foreach { case (ResourceProfile.OFFHEAP_MEM, request) => - driverConf.set(MEMORY_OFFHEAP_SIZE.key, request.amount.toString) + driverConf.set(MEMORY_OFFHEAP_SIZE.key, request.amount.toString + "m") driverConf.set(MEMORY_OFFHEAP_ENABLED.key, "true") logInfo(s"set off heap memory to $request") case (ResourceProfile.MEMORY, request) => - driverConf.set(EXECUTOR_MEMORY.key, request.amount.toString) + driverConf.set(EXECUTOR_MEMORY.key, request.amount.toString + "m") logInfo(s"set memory to $request") case (ResourceProfile.OVERHEAD_MEM, request) => - driverConf.set(EXECUTOR_MEMORY_OVERHEAD.key, request.amount.toString) + driverConf.set(EXECUTOR_MEMORY_OVERHEAD.key, request.amount.toString + "m") logInfo(s"set memory_overhead to $request") case _ => }