ExecutorPodsSnapshotsStore¶
ExecutorPodsSnapshotsStore is an abstraction of executor pods snapshots stores that subscribers can subscribe to and be notified about single pod or full snapshots updates.
Contract¶
Registering Subscriber¶
addSubscriber(
processBatchIntervalMillis: Long)(
onNewSnapshots: Seq[ExecutorPodsSnapshot] => Unit): Unit
Registers a new subscriber to be notified about new ExecutorPodsSnapshots every processBatchIntervalMillis interval
Used when:
Notifying Subscribers¶
notifySubscribers(): Unit
Used when:
ExecutorPodsAllocatoris requested to change the total expected executors
Full Executor Pod State Synchronization¶
replaceSnapshot(
newSnapshot: Seq[Pod]): Unit
Used when:
PollRunnableis requested to start (every spark.kubernetes.executor.apiPollingInterval whenExecutorPodsPollingSnapshotSourceis started)
Stopping¶
stop(): Unit
Used when:
KubernetesClusterSchedulerBackendis requested to stop
Single Executor Pod State Update¶
updatePod(
updatedPod: Pod): Unit
Used when:
ExecutorPodsWatcheris requested to eventReceived