From cace2f96e6aaa27a7c43dd83299b9c2a47fcb2d0 Mon Sep 17 00:00:00 2001 From: Marc Lamy Date: Thu, 11 Apr 2024 17:58:23 +0200 Subject: [PATCH] add the possibility to override Spark conf in SparkSpec (#6) --- .../src/main/scala/com/amadeus/dataio/test/SparkSpec.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/src/main/scala/com/amadeus/dataio/test/SparkSpec.scala b/test/src/main/scala/com/amadeus/dataio/test/SparkSpec.scala index db5a626..b5e2a93 100644 --- a/test/src/main/scala/com/amadeus/dataio/test/SparkSpec.scala +++ b/test/src/main/scala/com/amadeus/dataio/test/SparkSpec.scala @@ -34,6 +34,7 @@ trait SparkSpec extends TestSuite with BeforeAndAfter { .builder() .master("local[1]") .config("spark.ui.enabled", "false") + .config(overrideSparkConf) .appName(getTestName) .getOrCreate() } @@ -42,6 +43,12 @@ trait SparkSpec extends TestSuite with BeforeAndAfter { spark.close() } + /** + * Override to edit the Spark configuration. + * @return The map of new configuration values. + */ + def overrideSparkConf: Map[String, String] = Map.empty + /** * @return the test suite's name */