Source code for apache_beam.portability.api.beam_artifact_api_pb2_grpc

from __future__ import absolute_import
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
from builtins import object
import grpc

from . import beam_artifact_api_pb2 as beam__artifact__api__pb2


[docs]class ArtifactRetrievalServiceStub(object): """A service to retrieve artifacts for use in a Job. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.ResolveArtifacts = channel.unary_unary( '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/ResolveArtifacts', request_serializer=beam__artifact__api__pb2.ResolveArtifactsRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.ResolveArtifactsResponse.FromString, ) self.GetArtifact = channel.unary_stream( '/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/GetArtifact', request_serializer=beam__artifact__api__pb2.GetArtifactRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.GetArtifactResponse.FromString, )
[docs]class ArtifactRetrievalServiceServicer(object): """A service to retrieve artifacts for use in a Job. """
[docs] def ResolveArtifacts(self, request, context): """Resolves the given artifact references into one or more replacement artifact references (e.g. a Maven dependency into a (transitive) set of jars. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs] def GetArtifact(self, request, context): """Retrieves the given artifact as a stream of bytes. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs]def add_ArtifactRetrievalServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'ResolveArtifacts': grpc.unary_unary_rpc_method_handler( servicer.ResolveArtifacts, request_deserializer=beam__artifact__api__pb2.ResolveArtifactsRequest.FromString, response_serializer=beam__artifact__api__pb2.ResolveArtifactsResponse.SerializeToString, ), 'GetArtifact': grpc.unary_stream_rpc_method_handler( servicer.GetArtifact, request_deserializer=beam__artifact__api__pb2.GetArtifactRequest.FromString, response_serializer=beam__artifact__api__pb2.GetArtifactResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'org.apache.beam.model.job_management.v1.ArtifactRetrievalService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
[docs]class ArtifactStagingServiceStub(object): """A service that allows the client to act as an ArtifactRetrievalService, for a particular job with the server initiating requests and receiving responses. A client calls the service with an ArtifactResponseWrapper that has the staging token set, and thereafter responds to the server's requests. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.ReverseArtifactRetrievalService = channel.stream_stream( '/org.apache.beam.model.job_management.v1.ArtifactStagingService/ReverseArtifactRetrievalService', request_serializer=beam__artifact__api__pb2.ArtifactResponseWrapper.SerializeToString, response_deserializer=beam__artifact__api__pb2.ArtifactRequestWrapper.FromString, )
[docs]class ArtifactStagingServiceServicer(object): """A service that allows the client to act as an ArtifactRetrievalService, for a particular job with the server initiating requests and receiving responses. A client calls the service with an ArtifactResponseWrapper that has the staging token set, and thereafter responds to the server's requests. """
[docs] def ReverseArtifactRetrievalService(self, request_iterator, context): # missing associated documentation comment in .proto file pass context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs]def add_ArtifactStagingServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'ReverseArtifactRetrievalService': grpc.stream_stream_rpc_method_handler( servicer.ReverseArtifactRetrievalService, request_deserializer=beam__artifact__api__pb2.ArtifactResponseWrapper.FromString, response_serializer=beam__artifact__api__pb2.ArtifactRequestWrapper.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'org.apache.beam.model.job_management.v1.ArtifactStagingService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
[docs]class LegacyArtifactStagingServiceStub(object): """Legacy artifact staging service for pipeline-level artifacts. A service to stage artifacts for use in a Job. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.PutArtifact = channel.stream_unary( '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/PutArtifact', request_serializer=beam__artifact__api__pb2.PutArtifactRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.PutArtifactResponse.FromString, ) self.CommitManifest = channel.unary_unary( '/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/CommitManifest', request_serializer=beam__artifact__api__pb2.CommitManifestRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.CommitManifestResponse.FromString, )
[docs]class LegacyArtifactStagingServiceServicer(object): """Legacy artifact staging service for pipeline-level artifacts. A service to stage artifacts for use in a Job. """
[docs] def PutArtifact(self, request_iterator, context): """Stage an artifact to be available during job execution. The first request must contain the name of the artifact. All future requests must contain sequential chunks of the content of the artifact. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs] def CommitManifest(self, request, context): """Commit the manifest for a Job. All artifacts must have been successfully uploaded before this call is made. Throws error INVALID_ARGUMENT if not all of the members of the manifest are present """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs]def add_LegacyArtifactStagingServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'PutArtifact': grpc.stream_unary_rpc_method_handler( servicer.PutArtifact, request_deserializer=beam__artifact__api__pb2.PutArtifactRequest.FromString, response_serializer=beam__artifact__api__pb2.PutArtifactResponse.SerializeToString, ), 'CommitManifest': grpc.unary_unary_rpc_method_handler( servicer.CommitManifest, request_deserializer=beam__artifact__api__pb2.CommitManifestRequest.FromString, response_serializer=beam__artifact__api__pb2.CommitManifestResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'org.apache.beam.model.job_management.v1.LegacyArtifactStagingService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
[docs]class LegacyArtifactRetrievalServiceStub(object): """A service to retrieve artifacts for use in a Job. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.GetManifest = channel.unary_unary( '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetManifest', request_serializer=beam__artifact__api__pb2.GetManifestRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.GetManifestResponse.FromString, ) self.GetArtifact = channel.unary_stream( '/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetArtifact', request_serializer=beam__artifact__api__pb2.LegacyGetArtifactRequest.SerializeToString, response_deserializer=beam__artifact__api__pb2.ArtifactChunk.FromString, )
[docs]class LegacyArtifactRetrievalServiceServicer(object): """A service to retrieve artifacts for use in a Job. """
[docs] def GetManifest(self, request, context): """Get the manifest for the job """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs] def GetArtifact(self, request, context): """Get an artifact staged for the job. The requested artifact must be within the manifest """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs]def add_LegacyArtifactRetrievalServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'GetManifest': grpc.unary_unary_rpc_method_handler( servicer.GetManifest, request_deserializer=beam__artifact__api__pb2.GetManifestRequest.FromString, response_serializer=beam__artifact__api__pb2.GetManifestResponse.SerializeToString, ), 'GetArtifact': grpc.unary_stream_rpc_method_handler( servicer.GetArtifact, request_deserializer=beam__artifact__api__pb2.LegacyGetArtifactRequest.FromString, response_serializer=beam__artifact__api__pb2.ArtifactChunk.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))