From 9a6d44c5b49aa7af3fc1bac69d3da40751b470a5 Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Mon, 21 Oct 2024 21:38:51 +0200 Subject: [PATCH] Support for empty value of master option --- .../eu/dnetlib/dhp/application/SparkScalaApplication.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dhp-common/src/main/scala/eu/dnetlib/dhp/application/SparkScalaApplication.scala b/dhp-common/src/main/scala/eu/dnetlib/dhp/application/SparkScalaApplication.scala index 526bbd295..09a1887b1 100644 --- a/dhp-common/src/main/scala/eu/dnetlib/dhp/application/SparkScalaApplication.scala +++ b/dhp-common/src/main/scala/eu/dnetlib/dhp/application/SparkScalaApplication.scala @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.application import eu.dnetlib.dhp.common.Constants import eu.dnetlib.dhp.utils.DHPUtils.writeHdfsFile +import org.apache.commons.lang3.StringUtils import scala.io.Source @@ -69,7 +70,7 @@ abstract class AbstractScalaApplication( .builder() .config(conf) .appName(getClass.getSimpleName) - if (master != null) + if (StringUtils.isNotBlank(master)) b.master(master) b.getOrCreate() }