Exemplo n.º 1
0
    def run_pipeline(self, pipeline: PipelineBuilder, initial_target_type='worker'):
        task_request = pipeline.to_task_request(serialiser)
        task_request.reply_topic = self.__reply_topic

        target = Address()
        target.namespace = default_namespace
        target.type = initial_target_type
        target.id = task_request.id

        return self._run_flink_loop(task_request, target)
Exemplo n.º 2
0
    def run_action(self,
                   pipeline: PipelineBuilder,
                   action: TaskAction,
                   initial_target_type='worker'):
        task_action = TaskActionRequest(id=pipeline.id,
                                        action=action,
                                        reply_topic=self.__reply_topic)

        target = Address()
        target.namespace = default_namespace
        target.type = initial_target_type
        target.id = pipeline.id

        return self._run_flink_loop(task_action, target)
    def run_pipeline(self,
                     pipeline: PipelineBuilder,
                     initial_target_type='worker'):
        task_request = pipeline.to_task_request(test_harness_serialiser)
        task_request.reply_topic = self.__reply_topic

        target = Address()
        target.namespace = default_namespace
        target.type = initial_target_type
        target.id = task_request.id

        result = self._run_flink_loop(task_request, target)

        if isinstance(result, TaskErrorException):
            raise result

        return result
    def run_action(self,
                   pipeline: PipelineBuilder,
                   action: TaskAction,
                   initial_target_type='worker'):
        task_action = TaskActionRequest(id=pipeline.id,
                                        action=action,
                                        reply_topic=self.__reply_topic)

        target = Address()
        target.namespace = default_namespace
        target.type = initial_target_type
        target.id = pipeline.id

        result = self._run_flink_loop(task_action, target)

        if isinstance(result, TaskErrorException):
            raise result

        return result
Exemplo n.º 5
0
def update_address(address: Address, namespace, address_type, address_id):
    address.namespace = namespace
    address.type = address_type
    address.id = address_id