job

package
v0.3.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterJobContext

type ClusterJobContext struct {
	// contains filtered or unexported fields
}

func NewClusterJobContext

func NewClusterJobContext(
	clusterContext context.ClusterContext,
	pendingPodChecker podchecks.PodChecker,
	stuckTerminatingPodExpiry time.Duration,
	updateThreadCount int,
) *ClusterJobContext

func (*ClusterJobContext) AddAnnotation

func (c *ClusterJobContext) AddAnnotation(jobs []*RunningJob, annotations map[string]string)

func (*ClusterJobContext) DeleteJobs

func (c *ClusterJobContext) DeleteJobs(jobs []*RunningJob)

func (*ClusterJobContext) GetJobs

func (c *ClusterJobContext) GetJobs() ([]*RunningJob, error)

func (*ClusterJobContext) MarkIssueReported

func (c *ClusterJobContext) MarkIssueReported(issue *PodIssue)

func (*ClusterJobContext) MarkIssuesResolved

func (c *ClusterJobContext) MarkIssuesResolved(job *RunningJob)

type FailedSubmissionDetails

type FailedSubmissionDetails struct {
	Pod         *v1.Pod
	Job         *api.Job
	Error       error
	Recoverable bool
}

type IssueType

type IssueType int
const (
	UnableToSchedule  IssueType = iota
	StuckStartingUp   IssueType = iota
	StuckTerminating  IssueType = iota
	ExternallyDeleted IssueType = iota
)

type JobContext

type JobContext interface {
	GetJobs() ([]*RunningJob, error)
	MarkIssueReported(issue *PodIssue)
	MarkIssuesResolved(job *RunningJob)
	DeleteJobs(jobs []*RunningJob)
	AddAnnotation(jobs []*RunningJob, annotations map[string]string)
}

type PodIssue

type PodIssue struct {
	OriginatingPod *v1.Pod
	Pods           []*v1.Pod
	Message        string
	Retryable      bool
	Reported       bool
	Type           IssueType
	Cause          api.Cause
}

type RunningJob

type RunningJob struct {
	JobId      string
	ActivePods []*v1.Pod
	Issue      *PodIssue
}

type SubmitService

type SubmitService struct {
	// contains filtered or unexported fields
}

func NewSubmitter

func NewSubmitter(
	clusterContext context.ClusterContext,
	podDefaults *configuration.PodDefaults,
	submissionThreadCount int,
	fatalPodSubmissionErrors []string,
) *SubmitService

func (*SubmitService) SubmitJobs

func (allocationService *SubmitService) SubmitJobs(jobsToSubmit []*api.Job) []*FailedSubmissionDetails

type Submitter

type Submitter interface {
	SubmitJobs(jobsToSubmit []*api.Job) []*FailedSubmissionDetails
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL