Documentation ¶
Index ¶
- type Deduplicator
- type PostgresDeduplicator
- type Server
- func (s *Server) CancelJobSet(grpcCtx context.Context, req *api.JobSetCancelRequest) (*types.Empty, error)
- func (s *Server) CancelJobs(grpcCtx context.Context, req *api.JobCancelRequest) (*api.CancellationResult, error)
- func (s *Server) CreateQueue(ctx context.Context, q *api.Queue) (*types.Empty, error)
- func (s *Server) CreateQueues(ctx context.Context, list *api.QueueList) (*api.BatchQueueCreateResponse, error)
- func (s *Server) DeleteQueue(ctx context.Context, request *api.QueueDeleteRequest) (*types.Empty, error)
- func (s *Server) GetQueue(ctx context.Context, request *api.QueueGetRequest) (*api.Queue, error)
- func (s *Server) GetQueues(request *api.StreamingQueueGetRequest, server api.Submit_GetQueuesServer) error
- func (s *Server) GetUser(ctx *armadacontext.Context) string
- func (s *Server) Health(_ context.Context, _ *types.Empty) (*api.HealthCheckResponse, error)
- func (s *Server) PreemptJobs(grpcCtx context.Context, req *api.JobPreemptRequest) (*types.Empty, error)
- func (s *Server) ReprioritizeJobs(grpcCtx context.Context, req *api.JobReprioritizeRequest) (*api.JobReprioritizeResponse, error)
- func (s *Server) SubmitJobs(grpcCtx context.Context, req *api.JobSubmitRequest) (*api.JobSubmitResponse, error)
- func (s *Server) UpdateQueue(ctx context.Context, q *api.Queue) (*types.Empty, error)
- func (s *Server) UpdateQueues(ctx context.Context, list *api.QueueList) (*api.BatchQueueUpdateResponse, error)
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(db *pgxpool.Pool) *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( queueService api.QueueServiceServer, publisher pulsarutils.Publisher[*armadaevents.EventSequence], queueCache armadaqueue.ReadOnlyQueueRepository, submissionConfig configuration.SubmissionConfig, deduplicator Deduplicator, authorizer auth.ActionAuthorizer, ) *Server
func (*Server) CancelJobSet ¶
func (*Server) CancelJobs ¶
func (s *Server) CancelJobs(grpcCtx context.Context, req *api.JobCancelRequest) (*api.CancellationResult, error)
func (*Server) CreateQueue ¶
func (*Server) CreateQueues ¶
func (*Server) DeleteQueue ¶
func (*Server) GetQueues ¶
func (s *Server) GetQueues(request *api.StreamingQueueGetRequest, server api.Submit_GetQueuesServer) error
func (*Server) PreemptJobs ¶
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 (*Server) UpdateQueues ¶
Click to show internal directories.
Click to hide internal directories.