public class InMemoryJobService extends org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase implements FnService
JobInvoker
.
Job management is handled in-memory rather than any persistent storage, running the risk of leaking jobs if the InMemoryJobService crashes.
TODO: replace in-memory job management state with persistent solution.
Modifier and Type | Method and Description |
---|---|
void |
cancel(org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobResponse> responseObserver) |
void |
close()
.
|
static InMemoryJobService |
create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor stagingServiceDescriptor,
JobInvoker invoker) |
void |
getMessageStream(org.apache.beam.model.jobmanagement.v1.JobApi.JobMessagesRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessagesResponse> responseObserver) |
void |
getState(org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateResponse> responseObserver) |
void |
getStateStream(org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateResponse> responseObserver) |
void |
prepare(org.apache.beam.model.jobmanagement.v1.JobApi.PrepareJobRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.PrepareJobResponse> responseObserver) |
void |
run(org.apache.beam.model.jobmanagement.v1.JobApi.RunJobRequest request,
io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.RunJobResponse> responseObserver) |
bindService
public static InMemoryJobService create(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor stagingServiceDescriptor, JobInvoker invoker)
public void prepare(org.apache.beam.model.jobmanagement.v1.JobApi.PrepareJobRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.PrepareJobResponse> responseObserver)
prepare
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void run(org.apache.beam.model.jobmanagement.v1.JobApi.RunJobRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.RunJobResponse> responseObserver)
run
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void getState(org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateResponse> responseObserver)
getState
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void cancel(org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobResponse> responseObserver)
cancel
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void getStateStream(org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.GetJobStateResponse> responseObserver)
getStateStream
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void getMessageStream(org.apache.beam.model.jobmanagement.v1.JobApi.JobMessagesRequest request, io.grpc.stub.StreamObserver<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessagesResponse> responseObserver)
getMessageStream
in class org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase
public void close() throws java.lang.Exception
FnService
There should be no more calls to any service method by the time a call to FnService.close()
begins. Specifically, this means that a Server
that this service is bound to
should have completed a call to the Server.shutdown()
method, and all future
incoming calls will be rejected.