# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from . import beam_fn_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2
[docs]class BeamFnControlStub(object):
"""
Control Plane API
Progress reporting and splitting still need further vetting. Also, this may
change with the addition of new types of instructions/responses related to
metrics.
An API that describes the work that a SDK harness is meant to do.
Stable
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Control = channel.stream_stream(
'/org.apache.beam.model.fn_execution.v1.BeamFnControl/Control',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.FromString,
)
self.GetProcessBundleDescriptor = channel.unary_unary(
'/org.apache.beam.model.fn_execution.v1.BeamFnControl/GetProcessBundleDescriptor',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.FromString,
)
[docs]class BeamFnControlServicer(object):
"""
Control Plane API
Progress reporting and splitting still need further vetting. Also, this may
change with the addition of new types of instructions/responses related to
metrics.
An API that describes the work that a SDK harness is meant to do.
Stable
"""
[docs] def Control(self, request_iterator, context):
"""Instructions sent by the runner to the SDK requesting different types
of work.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] def GetProcessBundleDescriptor(self, request, context):
"""Used to get the full process bundle descriptors for bundles one
is asked to process.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnControlServicer_to_server(servicer, server):
rpc_method_handlers = {
'Control': grpc.stream_stream_rpc_method_handler(
servicer.Control,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.SerializeToString,
),
'GetProcessBundleDescriptor': grpc.unary_unary_rpc_method_handler(
servicer.GetProcessBundleDescriptor,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnControl', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnControl(object):
"""
Control Plane API
Progress reporting and splitting still need further vetting. Also, this may
change with the addition of new types of instructions/responses related to
metrics.
An API that describes the work that a SDK harness is meant to do.
Stable
"""
[docs] @staticmethod
def Control(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/org.apache.beam.model.fn_execution.v1.BeamFnControl/Control',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionResponse.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.InstructionRequest.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs] @staticmethod
def GetProcessBundleDescriptor(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/org.apache.beam.model.fn_execution.v1.BeamFnControl/GetProcessBundleDescriptor',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.GetProcessBundleDescriptorRequest.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.ProcessBundleDescriptor.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs]class BeamFnDataStub(object):
"""Stable
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Data = channel.stream_stream(
'/org.apache.beam.model.fn_execution.v1.BeamFnData/Data',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString,
)
[docs]class BeamFnDataServicer(object):
"""Stable
"""
[docs] def Data(self, request_iterator, context):
"""Used to send data between harnesses.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnDataServicer_to_server(servicer, server):
rpc_method_handlers = {
'Data': grpc.stream_stream_rpc_method_handler(
servicer.Data,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnData', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnData(object):
"""Stable
"""
[docs] @staticmethod
def Data(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/org.apache.beam.model.fn_execution.v1.BeamFnData/Data',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.Elements.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs]class BeamFnStateStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.State = channel.stream_stream(
'/org.apache.beam.model.fn_execution.v1.BeamFnState/State',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.FromString,
)
[docs]class BeamFnStateServicer(object):
"""Missing associated documentation comment in .proto file."""
[docs] def State(self, request_iterator, context):
"""Used to get/append/clear state stored by the runner on behalf of the SDK.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnStateServicer_to_server(servicer, server):
rpc_method_handlers = {
'State': grpc.stream_stream_rpc_method_handler(
servicer.State,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnState', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnState(object):
"""Missing associated documentation comment in .proto file."""
[docs] @staticmethod
def State(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/org.apache.beam.model.fn_execution.v1.BeamFnState/State',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateRequest.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StateResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs]class BeamFnLoggingStub(object):
"""Stable
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Logging = channel.stream_stream(
'/org.apache.beam.model.fn_execution.v1.BeamFnLogging/Logging',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.FromString,
)
[docs]class BeamFnLoggingServicer(object):
"""Stable
"""
[docs] def Logging(self, request_iterator, context):
"""Allows for the SDK to emit log entries which the runner can
associate with the active job.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnLoggingServicer_to_server(servicer, server):
rpc_method_handlers = {
'Logging': grpc.stream_stream_rpc_method_handler(
servicer.Logging,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnLogging', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnLogging(object):
"""Stable
"""
[docs] @staticmethod
def Logging(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/org.apache.beam.model.fn_execution.v1.BeamFnLogging/Logging',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogEntry.List.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.LogControl.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs]class BeamFnExternalWorkerPoolStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.StartWorker = channel.unary_unary(
'/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StartWorker',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.FromString,
)
self.StopWorker = channel.unary_unary(
'/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StopWorker',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.FromString,
)
[docs]class BeamFnExternalWorkerPoolServicer(object):
"""Missing associated documentation comment in .proto file."""
[docs] def StartWorker(self, request, context):
"""Start the SDK worker with the given ID.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] def StopWorker(self, request, context):
"""Stop the SDK worker.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnExternalWorkerPoolServicer_to_server(servicer, server):
rpc_method_handlers = {
'StartWorker': grpc.unary_unary_rpc_method_handler(
servicer.StartWorker,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.SerializeToString,
),
'StopWorker': grpc.unary_unary_rpc_method_handler(
servicer.StopWorker,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnExternalWorkerPool(object):
"""Missing associated documentation comment in .proto file."""
[docs] @staticmethod
def StartWorker(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StartWorker',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerRequest.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StartWorkerResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs] @staticmethod
def StopWorker(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/org.apache.beam.model.fn_execution.v1.BeamFnExternalWorkerPool/StopWorker',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerRequest.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.StopWorkerResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
[docs]class BeamFnWorkerStatusStub(object):
"""API for SDKs to report debug-related statuses to runner during pipeline execution.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.WorkerStatus = channel.stream_stream(
'/org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus/WorkerStatus',
request_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.SerializeToString,
response_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.FromString,
)
[docs]class BeamFnWorkerStatusServicer(object):
"""API for SDKs to report debug-related statuses to runner during pipeline execution.
"""
[docs] def WorkerStatus(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_BeamFnWorkerStatusServicer_to_server(servicer, server):
rpc_method_handlers = {
'WorkerStatus': grpc.stream_stream_rpc_method_handler(
servicer.WorkerStatus,
request_deserializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.FromString,
response_serializer=org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
[docs]class BeamFnWorkerStatus(object):
"""API for SDKs to report debug-related statuses to runner during pipeline execution.
"""
[docs] @staticmethod
def WorkerStatus(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus/WorkerStatus',
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusResponse.SerializeToString,
org_dot_apache_dot_beam_dot_model_dot_fn__execution_dot_v1_dot_beam__fn__api__pb2.WorkerStatusRequest.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)