Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Add failure-earlier-drivers as a separate category of failures (#24)
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
ashrayjain authored Apr 10, 2019
1 parent b67be85 commit 8233771
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions internal/extender/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ import (
)

const (
failureUnbound = "failure-unbound"
failureInternal = "failure-internal"
failureFit = "failure-fit"
failureNonSparkPod = "failure-non-spark-pod"
success = "success"
successRescheduled = "success-rescheduled"
successAlreadyBound = "success-already-bound"
failureUnbound = "failure-unbound"
failureInternal = "failure-internal"
failureFit = "failure-fit"
failureEarlierDriver = "failure-earlier-driver"
failureNonSparkPod = "failure-non-spark-pod"
success = "success"
successRescheduled = "success-rescheduled"
successAlreadyBound = "success-already-bound"
)

// SparkSchedulerExtender is a kubernetes scheduler extended responsible for ensuring
Expand Down Expand Up @@ -216,7 +217,7 @@ func (s *SparkSchedulerExtender) selectDriverNode(ctx context.Context, driver *v
}
ok := s.fitEarlierDrivers(ctx, queuedDrivers, driverNodeNames, executorNodeNames, availableResources)
if !ok {
return "", failureFit, werror.Error("earlier drivers do not fit to the cluster")
return "", failureEarlierDriver, werror.Error("earlier drivers do not fit to the cluster")
}
}
applicationResources, err := sparkResources(ctx, driver)
Expand Down

0 comments on commit 8233771

Please sign in to comment.