Skip to content

Commit 390c491

Browse files
committed
Fix zk conf key for mesos zk engine.
1 parent e324ac1 commit 390c491

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkCuratorUtil.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ private[spark] object SparkCuratorUtil extends Logging {
3232
private val RETRY_WAIT_MILLIS = 5000
3333
private val MAX_RECONNECT_ATTEMPTS = 3
3434

35-
def newClient(conf: SparkConf): CuratorFramework = {
36-
val ZK_URL = conf.get("spark.deploy.zookeeper.url")
35+
def newClient(
36+
conf: SparkConf,
37+
zkUrlConf: String = "spark.deploy.zookeeper.url"): CuratorFramework = {
38+
val ZK_URL = conf.get(zkUrlConf)
3739
val zk = CuratorFrameworkFactory.newClient(ZK_URL,
3840
ZK_SESSION_TIMEOUT_MILLIS, ZK_CONNECTION_TIMEOUT_MILLIS,
3941
new ExponentialBackoffRetry(RETRY_WAIT_MILLIS, MAX_RECONNECT_ATTEMPTS))

core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterPersistenceEngine.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private[spark] trait MesosClusterPersistenceEngine {
5555
private[spark] class ZookeeperMesosClusterPersistenceEngineFactory(conf: SparkConf)
5656
extends MesosClusterPersistenceEngineFactory(conf) {
5757

58-
lazy val zk = SparkCuratorUtil.newClient(conf)
58+
lazy val zk = SparkCuratorUtil.newClient(conf, "spark.mesos.deploy.zookeeper.url")
5959

6060
def createEngine(path: String): MesosClusterPersistenceEngine = {
6161
new ZookeeperMesosClusterPersistenceEngine(path, zk, conf)

0 commit comments

Comments
 (0)