From 198b473940dd001928ae884ad78db2204b01c763 Mon Sep 17 00:00:00 2001 From: Denisas Date: Mon, 20 Jun 2022 16:24:40 +0300 Subject: [PATCH 1/2] Update SubmitParams.java Reduced default cores count --- .../main/java/com/exacaster/lighter/spark/SubmitParams.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/com/exacaster/lighter/spark/SubmitParams.java b/server/src/main/java/com/exacaster/lighter/spark/SubmitParams.java index f4bad376..edddca64 100644 --- a/server/src/main/java/com/exacaster/lighter/spark/SubmitParams.java +++ b/server/src/main/java/com/exacaster/lighter/spark/SubmitParams.java @@ -89,7 +89,7 @@ public Integer getNumExecutors() { } public Integer getExecutorCores() { - return ofNullable(executorCores).orElse(2); + return ofNullable(executorCores).orElse(1); } public String getExecutorMemory() { @@ -97,7 +97,7 @@ public String getExecutorMemory() { } public Integer getDriverCores() { - return ofNullable(driverCores).orElse(2); + return ofNullable(driverCores).orElse(1); } public String getDriverMemory() { From 8c734ba12cfc3f2b8412b09a7b0d1abdf0d151d9 Mon Sep 17 00:00:00 2001 From: Denisas Date: Mon, 20 Jun 2022 16:37:49 +0300 Subject: [PATCH 2/2] Fixed test --- .../test/groovy/com/exacaster/lighter/spark/SparkAppTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/groovy/com/exacaster/lighter/spark/SparkAppTest.groovy b/server/src/test/groovy/com/exacaster/lighter/spark/SparkAppTest.groovy index 8b72d025..c83af0ec 100644 --- a/server/src/test/groovy/com/exacaster/lighter/spark/SparkAppTest.groovy +++ b/server/src/test/groovy/com/exacaster/lighter/spark/SparkAppTest.groovy @@ -27,7 +27,7 @@ class SparkAppTest extends Specification { result == [ "spark.executor.memory":"1000M", "spark.driver.memory":"1000M", - "spark.executor.cores":"2", + "spark.executor.cores":"1", "spark.driver.cores":"1", "spark.executor.instances":"0", "spark.kubernetes.driverEnv.TEST1":"test1"