public class GRpcJobServiceImpl
extends com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBase
JobServiceGrpc.JobServiceImplBase to provide
functionality for resolving and fetching specifications for jobs to be run by the Genie Agent.| Constructor and Description |
|---|
GRpcJobServiceImpl(AgentJobService agentJobService,
JobServiceProtoConverter jobServiceProtoConverter,
JobServiceProtoErrorComposer protoErrorComposer,
io.micrometer.core.instrument.MeterRegistry meterRegistry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeJobArchiveStatus(com.netflix.genie.proto.ChangeJobArchiveStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ChangeJobArchiveStatusResponse> responseObserver)
When the agent wants to set the archival status of a job post-execution (i.e.
|
void |
changeJobStatus(com.netflix.genie.proto.ChangeJobStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ChangeJobStatusResponse> responseObserver)
When the agent wants to tell the system that the status of a job is changed this API is called.
|
void |
claimJob(com.netflix.genie.proto.ClaimJobRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ClaimJobResponse> responseObserver)
When an agent is claiming responsibility and ownership for a job this API is called.
|
void |
configure(com.netflix.genie.proto.ConfigureRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ConfigureResponse> responseObserver)
This API provides runtime configuration to the agent (example: timeouts, parallelism, etc.).
|
void |
getJobSpecification(com.netflix.genie.proto.JobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
Assuming a specification has already been resolved the agent will call this API with a job id to fetch the
specification.
|
void |
getJobStatus(com.netflix.genie.proto.GetJobStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.GetJobStatusResponse> responseObserver)
When the agent wants to confirm it's status is still the expected one (i.e.
|
void |
handshake(com.netflix.genie.proto.HandshakeRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.HandshakeResponse> responseObserver)
This API gives the server a chance to reject a client/agent based on its metadata (version, location, ...).
|
void |
reserveJobId(com.netflix.genie.proto.ReserveJobIdRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ReserveJobIdResponse> responseObserver)
This API will reserve a job id using the supplied metadata in the request and return the reserved job id.
|
void |
resolveJobSpecification(com.netflix.genie.proto.JobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
This API will take a request to resolve a Job Specification and given the inputs figure out all the details
needed to flesh out a job specification for the Agent to run.
|
void |
resolveJobSpecificationDryRun(com.netflix.genie.proto.DryRunJobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
The agent requests that a job specification be resolved without impacting any state in the database.
|
public GRpcJobServiceImpl(AgentJobService agentJobService, JobServiceProtoConverter jobServiceProtoConverter, JobServiceProtoErrorComposer protoErrorComposer, io.micrometer.core.instrument.MeterRegistry meterRegistry)
agentJobService - The implementation of the AgentJobService to usejobServiceProtoConverter - DTO/Proto converterprotoErrorComposer - proto error message composermeterRegistry - meter registrypublic void handshake(com.netflix.genie.proto.HandshakeRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.HandshakeResponse> responseObserver)
handshake in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing client metadataresponseObserver - To send the responsepublic void configure(com.netflix.genie.proto.ConfigureRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ConfigureResponse> responseObserver)
configure in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The agent requestresponseObserver - To send the responsepublic void reserveJobId(com.netflix.genie.proto.ReserveJobIdRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ReserveJobIdResponse> responseObserver)
reserveJobId in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing all the metadata necessary to reserve a job id in the systemresponseObserver - To send the responsepublic void resolveJobSpecification(com.netflix.genie.proto.JobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
resolveJobSpecification in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request informationresponseObserver - How to send a responsepublic void getJobSpecification(com.netflix.genie.proto.JobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
getJobSpecification in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing the job id to return the specification forresponseObserver - How to send a responsepublic void resolveJobSpecificationDryRun(com.netflix.genie.proto.DryRunJobSpecificationRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.JobSpecificationResponse> responseObserver)
resolveJobSpecificationDryRun in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing all the metadata required to resolve a job specificationresponseObserver - The observer to send a response withpublic void claimJob(com.netflix.genie.proto.ClaimJobRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ClaimJobResponse> responseObserver)
claimJob in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing the job id being claimed and other pertinent metadataresponseObserver - The observer to send a response withpublic void changeJobStatus(com.netflix.genie.proto.ChangeJobStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ChangeJobStatusResponse> responseObserver)
changeJobStatus in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing the necessary metadata to change job status for a given jobresponseObserver - The observer to send a response withpublic void getJobStatus(com.netflix.genie.proto.GetJobStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.GetJobStatusResponse> responseObserver)
getJobStatus in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing the job id to look upresponseObserver - The observer to send a response withpublic void changeJobArchiveStatus(com.netflix.genie.proto.ChangeJobArchiveStatusRequest request,
io.grpc.stub.StreamObserver<com.netflix.genie.proto.ChangeJobArchiveStatusResponse> responseObserver)
changeJobArchiveStatus in class com.netflix.genie.proto.JobServiceGrpc.JobServiceImplBaserequest - The request containing the job id to look upresponseObserver - The observer to send a response with