Skip to content

Commit

Permalink
[SNAP-293] (#1)
Browse files Browse the repository at this point in the history
Minor changes for snappy implementation of executor to allow override by child implementations.
  • Loading branch information
nthanvi authored and sumwale committed Jul 11, 2021
1 parent d64dd65 commit caf0951
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ private[spark] class CoarseGrainedExecutorBackend(
}(ThreadUtils.sameThread)
}

protected def registerExecutor: Executor =
new Executor(executorId, hostname, env, userClassPath, isLocal = false)

def extractLogUrls: Map[String, String] = {
val prefix = "SPARK_LOG_URL_"
sys.env.filterKeys(_.startsWith(prefix))
Expand All @@ -80,7 +83,7 @@ private[spark] class CoarseGrainedExecutorBackend(
case RegisteredExecutor =>
logInfo("Successfully registered with driver")
try {
executor = new Executor(executorId, hostname, env, userClassPath, isLocal = false)
executor = registerExecutor
} catch {
case NonFatal(e) =>
exitExecutor(1, "Unable to create executor due to " + e.getMessage, e)
Expand Down

0 comments on commit caf0951

Please sign in to comment.