From 04e14fa712183717df7e3efd84797f299edc3071 Mon Sep 17 00:00:00 2001 From: ElisaTronetti Date: Wed, 2 Mar 2022 21:55:12 +0000 Subject: [PATCH] added spark propery setting on SparkContext creation --- src/main/scala/utils/ContextFactory.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/utils/ContextFactory.scala b/src/main/scala/utils/ContextFactory.scala index 69b0cdd..d5722bb 100644 --- a/src/main/scala/utils/ContextFactory.scala +++ b/src/main/scala/utils/ContextFactory.scala @@ -14,6 +14,10 @@ object ContextFactory { * @return the newly created [[SparkContext]] */ def create(appName: String, masterAddress: String, jarPath: String): SparkContext = new SparkContext( - new SparkConf().setAppName(appName).setMaster(masterAddress).setJars(Seq(jarPath)) + new SparkConf() + .setAppName(appName) + .setMaster(masterAddress) + .setJars(Seq(jarPath)) + .set("spark.driver.maxResultSize", "2g") ) }