Beispiel #1
0
 def __init__(self, spec):
     super(DataStreamStatelessFunctionOperation, self).__init__(spec)
     self.runtime_context = create_runtime_context(
         self.spec.serialized_fn.runtime_context, self.base_metric_group)
     self.process_element_func, self.open_func, self.close_func = \
         operation_utils.extract_data_stream_stateless_function(
             self.spec.serialized_fn, self.runtime_context)
Beispiel #2
0
 def __init__(self, spec, keyed_state_backend):
     super(DataStreamKeyedStatefulOperation, self).__init__(spec)
     self.runtime_context = create_runtime_context(
         self.spec.serialized_fn.runtime_context, self.base_metric_group,
         keyed_state_backend)
     self.keyed_state_backend = keyed_state_backend
     self.process_element_func, self.open_func, self.close_func = \
         operation_utils.extract_keyed_stateful_function(
             self.spec.serialized_fn,
             keyed_state_backend,
             self.runtime_context)
Beispiel #3
0
 def __init__(self, spec):
     super(ProcessFunctionOperation, self).__init__(spec)
     self.runtime_context = create_runtime_context(
         self.spec.serialized_fn.runtime_context, self.base_metric_group)
     self.timer_service = ProcessFunctionOperation.InternalTimerService()
     self.function_context = ProcessFunctionOperation.InternalProcessFunctionContext(
         self.timer_service)
     self.process_element_func, self.open_func, self.close_func = \
         operation_utils.extract_process_function(
             self.spec.serialized_fn,
             self.function_context,
             self.runtime_context)