Skip to content


ExecutorPodsWatcher is a Kubernetes' Watcher[Pod] to be notified about executor pod updates (and update the ExecutorPodsSnapshotsStore of the parent ExecutorPodsWatchSnapshotSource).

ExecutorPodsWatcher is an internal class of ExecutorPodsWatchSnapshotSource with full access to its internals.

Creating Instance

ExecutorPodsWatcher takes no arguments to be created.

ExecutorPodsWatcher is created when:

  • ExecutorPodsWatchSnapshotSource is requested to start

Executor Pod Update

  action: Action,
  pod: Pod): Unit

eventReceived is part of the Kubernetes Client Watcher abstraction.

eventReceived prints out the following DEBUG message to the logs:

Received executor pod update for pod named [podName], action [action]

eventReceived requests the ExecutorPodsSnapshotsStore (of the parent ExecutorPodsWatchSnapshotSource) to updatePod.

Close Notification

  e: KubernetesClientException): Unit

onClose is part of the Kubernetes Client Watcher abstraction.

onClose prints out the following WARN message to the logs:

Kubernetes client has been closed (this is expected if the application is shutting down.)


ExecutorPodsWatcher uses org.apache.spark.scheduler.cluster.k8s.ExecutorPodsWatchSnapshotSource logger for logging.

Back to top