Skip to content

Commit

Permalink
sometimes exexutor get sparkenv will fail
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Dec 17, 2018
1 parent df7b5ba commit 06fcb27
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ class PSServiceSink(val property: Properties, val registry: MetricRegistry,
psDriverUrl = "spark://ps-driver-endpoint@" + psDriverHost + ":" + psDriverPort
}

parseArgs

def createRpcEnv = {
val isDriver = env.executorId == SparkContext.DRIVER_IDENTIFIER
val bindAddress = hostname
Expand All @@ -108,6 +106,7 @@ class PSServiceSink(val property: Properties, val registry: MetricRegistry,
Thread.sleep(3000)
logInfo(s"start PSExecutor;env:${env}")
if (env.executorId != SparkContext.DRIVER_IDENTIFIER) {
parseArgs
val rpcEnv = createRpcEnv
val pSExecutorBackend = new PSExecutorBackend(env, rpcEnv, psDriverUrl, psExecutorId, hostname, cores)
PSExecutorBackend.executorBackend = Some(pSExecutorBackend)
Expand Down

0 comments on commit 06fcb27

Please sign in to comment.