Support for empty value of master option

This commit is contained in:
Giambattista Bloisi 2024-10-21 21:38:51 +02:00
parent 72fd618ebb
commit bccf84a1a9
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package eu.dnetlib.dhp.application
import eu.dnetlib.dhp.common.Constants import eu.dnetlib.dhp.common.Constants
import eu.dnetlib.dhp.utils.DHPUtils.writeHdfsFile import eu.dnetlib.dhp.utils.DHPUtils.writeHdfsFile
import org.apache.commons.lang3.StringUtils
import scala.io.Source import scala.io.Source
@ -69,7 +70,7 @@ abstract class AbstractScalaApplication(
.builder() .builder()
.config(conf) .config(conf)
.appName(getClass.getSimpleName) .appName(getClass.getSimpleName)
if (master != null) if (StringUtils.isNotBlank(master))
b.master(master) b.master(master)
b.getOrCreate() b.getOrCreate()
} }