Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class ExecutorPodsAllocator(
applicationId: String,
schedulerBackend: KubernetesClusterSchedulerBackend,
snapshots: Seq[ExecutorPodsSnapshot]): Unit = {
logDebug(s"Received ${snapshots.size} snapshots")
Copy link
Member Author

Choose a reason for hiding this comment

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

I added this as DEBUG level because Received 0 snapshots is too verbose.

val k8sKnownExecIds = snapshots.flatMap(_.executorPods.keys).distinct
newlyCreatedExecutors --= k8sKnownExecIds
schedulerKnownNewlyCreatedExecs --= k8sKnownExecIds
Expand Down Expand Up @@ -352,8 +353,12 @@ class ExecutorPodsAllocator(
}
}

// Try to request new executors only when there exist remaining slots within the maximum
// number of pending pods and new snapshot arrives in case of waiting for releasing of the
// existing PVCs
val remainingSlotFromPendingPods = maxPendingPods - totalNotRunningPodCount
if (remainingSlotFromPendingPods > 0 && podsToAllocateWithRpId.size > 0) {
if (remainingSlotFromPendingPods > 0 && podsToAllocateWithRpId.size > 0 &&
!(snapshots.isEmpty && podAllocOnPVC && maxPVCs <= PVC_COUNTER.get())) {
Comment on lines 359 to +361
Copy link
Member

Choose a reason for hiding this comment

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

This condition is getting complicated now. Can we add a comment on it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, @viirya

ExecutorPodsAllocator.splitSlots(podsToAllocateWithRpId, remainingSlotFromPendingPods)
.foreach { case ((rpId, podCountForRpId, targetNum), sharedSlotFromPendingPods) =>
val numMissingPodsForRpId = targetNum - podCountForRpId
Expand Down