Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Conversation

@kimoonkim
Copy link
Member

@foxish @mccheah

It seems there is a small bug in the current client code. My client exits right away without waiting for the driver pod to complete.

2017-06-02 14:48:36 INFO Client:54 - Waiting for application spark-hdfstest-1496440110123 to finish...
2017-06-02 14:48:36 INFO LoggingPodStatusWatcherImpl:54 - Container final statuses:
Container name: spark-kubernetes-driver
Container image: docker:5000/spark-driver:kimoon-0602-1
Container state: Waiting
Pending reason: PodInitializing
2017-06-02 14:48:36 INFO Client:54 - Application spark-hdfstest-1496440110123 finished.

Think it should have been podCompletedFuture.await below instead of countDown:

override def awaitCompletion(): Unit = {
    podCompletedFuture.countDown()
    logInfo(pod.map { p =>
      s”Container final statuses:\n\n${containersDescription(p)}”
    }.getOrElse(“No containers were found in the driver pod.“))
  }

The client waits for the driver to finish after this patch.

2017-06-02 15:27:41 INFO  LoggingPodStatusWatcherImpl:54 - Container final statuses:


	 Container name: spark-kubernetes-driver
	 Container image: docker:5000/spark-driver:kimoon-0602-1
	 Container state: Terminated
	 Exit code: 0
2017-06-02 15:27:41 INFO  Client:54 - Application spark-hdfstest-1496442152207 finished.
2017-06-02 15:27:41 INFO  ShutdownHookManager:54 - Shutdown hook called
2017-06-02 15:27:41 INFO  ShutdownHookManager:54 - Deleting directory /private/var/folders/6t/m6rqw14s78gbm3ggzsxg_ypr0000gp/T/uploaded-jars-2d319a09-877c-4264-92ec-dd85a24e97ac
2017-06-02 15:27:41 INFO  ShutdownHookManager:54 - Deleting directory /private/var/folders/6t/m6rqw14s78gbm3ggzsxg_ypr0000gp/T/uploaded-files-9a5b0e9f-1b83-483a-9e46-52017fa3f574

@mccheah
Copy link

mccheah commented Jun 2, 2017

+1 - merge when it's green.

Copy link

@ash211 ash211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep looks right to me. Great catch @kimoonkim !

@erikerlandson erikerlandson merged commit bb1b234 into apache-spark-on-k8s:branch-2.1-kubernetes Jun 2, 2017
@kimoonkim kimoonkim deleted the fix-client-await-bug branch July 14, 2017 17:27
foxish pushed a commit that referenced this pull request Jul 24, 2017
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants