@ConditionalOnProperty(value="genie.grpc.server.enabled", havingValue="true") @GrpcService(value=com.netflix.genie.proto.JobServiceGrpc.class, interceptors=SimpleLoggingInterceptor.class) 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,
com.netflix.genie.web.rpc.grpc.services.impl.v4.JobServiceProtoErrorComposer protoErrorComposer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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 |
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 |
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, com.netflix.genie.web.rpc.grpc.services.impl.v4.JobServiceProtoErrorComposer protoErrorComposer)
agentJobService
- The implementation of the AgentJobService
to usejobServiceProtoConverter
- DTO/Proto converterprotoErrorComposer
- proto error message composerpublic 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.JobServiceImplBase
request
- The request containing client metadataresponseObserver
- 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.JobServiceImplBase
request
- 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.JobServiceImplBase
request
- 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.JobServiceImplBase
request
- 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.JobServiceImplBase
request
- 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.JobServiceImplBase
request
- 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.JobServiceImplBase
request
- The request containing the necessary metadata to change job status for a given jobresponseObserver
- The observer to send a response with