submit

package
v0.4.48 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deduplicator

type Deduplicator interface {
	GetOriginalJobIds(ctx *armadacontext.Context, queue string, jobRequests []*api.JobSubmitRequestItem) (map[string]string, error)
	StoreOriginalJobIds(ctx *armadacontext.Context, queue string, mappings map[string]string) error
}

Deduplicator deduplicates jobs submitted ot armada in order to prevent double submission

type PostgresDeduplicator

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

PostgresDeduplicator is an implementation of a Deduplicator that uses a pgkeyvalue.KeyValueStore as its state store

func NewDeduplicator

func NewDeduplicator(kvStore pgkeyvalue.KeyValueStore) *PostgresDeduplicator

func (*PostgresDeduplicator) GetOriginalJobIds

func (s *PostgresDeduplicator) GetOriginalJobIds(ctx *armadacontext.Context, queue string, jobRequests []*api.JobSubmitRequestItem) (map[string]string, error)

func (*PostgresDeduplicator) StoreOriginalJobIds

func (s *PostgresDeduplicator) StoreOriginalJobIds(ctx *armadacontext.Context, queue string, mappings map[string]string) error

type Server

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

Server is a service that accepts API calls according to the original Armada submit API and publishes messages to Pulsar based on those calls.

func NewServer

func NewServer(
	publisher pulsarutils.Publisher,
	queueRepository repository.QueueRepository,
	queueCache repository.ReadOnlyQueueRepository,
	jobRepository repository.JobRepository,
	submissionConfig configuration.SubmissionConfig,
	deduplicator Deduplicator,
	submitChecker scheduler.SubmitScheduleChecker,
	authorizer server.ActionAuthorizer,
	requireQueueAndJobSet bool,
) *Server

func (*Server) CancelJobSet

func (s *Server) CancelJobSet(grpcCtx context.Context, req *api.JobSetCancelRequest) (*types.Empty, error)

func (*Server) CancelJobs

func (s *Server) CancelJobs(grpcCtx context.Context, req *api.JobCancelRequest) (*api.CancellationResult, error)

func (*Server) CreateQueue

func (s *Server) CreateQueue(grpcCtx context.Context, req *api.Queue) (*types.Empty, error)

func (*Server) CreateQueues

func (s *Server) CreateQueues(grpcCtx context.Context, req *api.QueueList) (*api.BatchQueueCreateResponse, error)

func (*Server) DeleteQueue

func (s *Server) DeleteQueue(grpcCtx context.Context, req *api.QueueDeleteRequest) (*types.Empty, error)

func (*Server) GetQueue

func (s *Server) GetQueue(grpcCtx context.Context, req *api.QueueGetRequest) (*api.Queue, error)

func (*Server) GetQueues

func (*Server) GetUser

func (s *Server) GetUser(ctx *armadacontext.Context) string

func (*Server) Health

func (*Server) PreemptJobs

func (s *Server) PreemptJobs(grpcCtx context.Context, req *api.JobPreemptRequest) (*types.Empty, error)

func (*Server) ReprioritizeJobs

func (s *Server) ReprioritizeJobs(grpcCtx context.Context, req *api.JobReprioritizeRequest) (*api.JobReprioritizeResponse, error)

func (*Server) SubmitJobs

func (s *Server) SubmitJobs(grpcCtx context.Context, req *api.JobSubmitRequest) (*api.JobSubmitResponse, error)

SubmitJobs allows users to submit jobs to Armada. On receipt of a request, the following actions are performed:

  • The request is validated to make sure it is well formed. If this fails then an error is returned
  • Each JobRequestItem inside the request is checked to see if it is a duplicate
  • Each non-duplicate is converted into an armadaevents.SubmitMessage
  • All SubmitMessages are checked to see if the job they define can be scheduled (an example of a job that cannot be scheduled would be a job that requires more resources than exists on any node). If any message fails this check then an error is returned.
  • The SubmitMessages are published to Pulsar.

func (*Server) UpdateQueue

func (s *Server) UpdateQueue(grpcCtx context.Context, req *api.Queue) (*types.Empty, error)

func (*Server) UpdateQueues

func (s *Server) UpdateQueues(grpcCtx context.Context, req *api.QueueList) (*api.BatchQueueUpdateResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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