Skip to content

Commit

Permalink
fix dead loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngone51 committed Apr 18, 2019
1 parent 9c238b8 commit ea54dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -183,6 +183,8 @@ private[deploy] class ExecutorRunner(
Files.write(header, stderr, StandardCharsets.UTF_8)
stderrAppender = FileAppender(process.getErrorStream, stderr, conf)

state = ExecutorState.RUNNING
worker.send(ExecutorStateChanged(appId, execId, state, None, None))
// Wait for it to exit; executor may exit with code 0 (when driver instructs it to shutdown)
// or with nonzero exit code
val exitCode = process.waitFor()
Expand Down
Expand Up @@ -540,12 +540,12 @@ private[deploy] class Worker(
executorDir,
workerUri,
conf,
appLocalDirs, ExecutorState.RUNNING)
appLocalDirs,
ExecutorState.LAUNCHING)
executors(appId + "/" + execId) = manager
manager.start()
coresUsed += cores_
memoryUsed += memory_
sendToMaster(ExecutorStateChanged(appId, execId, manager.state, None, None))
} catch {
case e: Exception =>
logError(s"Failed to launch executor $appId/$execId for ${appDesc.name}.", e)
Expand Down

0 comments on commit ea54dd4

Please sign in to comment.