예제 #1
0
def get_component_output_tables_meta(task_data):
    check_request_parameters(task_data)
    tracker = Tracker(job_id=task_data['job_id'],
                      component_name=task_data['component_name'],
                      role=task_data['role'],
                      party_id=task_data['party_id'])
    output_data_table_infos = tracker.get_output_data_info()
    output_tables_meta = tracker.get_output_data_table(
        output_data_infos=output_data_table_infos)
    return output_tables_meta
예제 #2
0
def get_component_output_tables_meta(task_data):
    check_request_parameters(task_data)
    tracker = Tracker(job_id=task_data['job_id'], component_name=task_data['component_name'],
                      role=task_data['role'], party_id=task_data['party_id'])
    job_dsl_parser = schedule_utils.get_job_dsl_parser_by_job_id(job_id=task_data['job_id'])
    if not job_dsl_parser:
        raise Exception('can not get dag parser, please check if the parameters are correct')
    component = job_dsl_parser.get_component_info(task_data['component_name'])
    if not component:
        raise Exception('can not found component, please check if the parameters are correct')
    output_data_table_infos = tracker.get_output_data_info()
    output_tables_meta = tracker.get_output_data_table(output_data_infos=output_data_table_infos)
    return output_tables_meta
예제 #3
0
    def clean_table(cls, job_id, role, party_id, component_name):
        # clean data table
        stat_logger.info('start delete {} {} {} {} data table'.format(
            job_id, role, party_id, component_name))

        tracker = Tracker(job_id=job_id,
                          role=role,
                          party_id=party_id,
                          component_name=component_name)
        output_data_table_infos = tracker.get_output_data_info()
        if output_data_table_infos:
            delete_tables_by_table_infos(output_data_table_infos)
            stat_logger.info('delete {} {} {} {} data table success'.format(
                job_id, role, party_id, component_name))