Skip to content

Commit

Permalink
added spark propery setting on SparkContext creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisaTronetti committed Mar 2, 2022
1 parent a1b1ede commit 04e14fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/utils/ContextFactory.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
}

0 comments on commit 04e14fa

Please sign in to comment.