ИМХО следующий способ с spark.driver.allowMultipleContexts
должен работать ... создать сеанс контекста спарка отдельно с новой конфигурацией спарка.
conf.set("es.index.auto.create", "true")
conf.set("es.nodes", "XXXXXXXX")
conf.set("es.port", "9020")
conf.set("spark.driver.allowMultipleContexts", "true")
val sc1 = new SparkContext(conf)
conf.set("es.index.auto.create", "true")
conf.set("es.nodes", "yyyyyy")
conf.set("es.port", "9020")
conf.set("spark.driver.allowMultipleContexts", "true")
val sc2 = new SparkContext(conf)