Search in sources :

Example 1 with DescribePipelineOptionsResponse

use of org.apache.beam.model.jobmanagement.v1.JobApi.DescribePipelineOptionsResponse in project beam by apache.

the class InMemoryJobService method describePipelineOptions.

@Override
public void describePipelineOptions(DescribePipelineOptionsRequest request, StreamObserver<DescribePipelineOptionsResponse> responseObserver) {
    LOG.trace("{} {}", DescribePipelineOptionsRequest.class.getSimpleName(), request);
    try {
        DescribePipelineOptionsResponse response = DescribePipelineOptionsResponse.newBuilder().addAllOptions(PipelineOptionsFactory.describe(PipelineOptionsFactory.getRegisteredOptions())).build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    } catch (Exception e) {
        LOG.error("Error describing pipeline options", e);
        responseObserver.onError(Status.INTERNAL.withCause(e).asException());
    }
}
Also used : DescribePipelineOptionsResponse(org.apache.beam.model.jobmanagement.v1.JobApi.DescribePipelineOptionsResponse) DescribePipelineOptionsRequest(org.apache.beam.model.jobmanagement.v1.JobApi.DescribePipelineOptionsRequest) StatusRuntimeException(org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException) StatusException(org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusException)

Aggregations

DescribePipelineOptionsRequest (org.apache.beam.model.jobmanagement.v1.JobApi.DescribePipelineOptionsRequest)1 DescribePipelineOptionsResponse (org.apache.beam.model.jobmanagement.v1.JobApi.DescribePipelineOptionsResponse)1 StatusException (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusException)1 StatusRuntimeException (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException)1