def _parse_job_specific_counters(self, init_config):
    '\n        Return a dictionary for each job counter\n        {\n          job_name: {\n            counter_group_name: [\n                counter_name\n              ]\n            }\n          }\n        }\n        '
    job_counter = {}
    if init_config.get('job_specific_counters'):
        for job in init_config['job_specific_counters']:
            job_name = job.get('job_name')
            metrics = job.get('metrics')
            if (not job_name):
                raise Exception('Counter metrics must have a "job_name"')
            if (not metrics):
                raise Exception('Jobs specified in counter metrics must contain at least one metric')
            if (job_name not in job_counter):
                job_counter[job_name] = {}
            for metric in metrics:
                counter_group_name = metric.get('counter_group_name')
                counters = metric.get('counters')
                if (not counter_group_name):
                    raise Exception('Each counter metric must contain a valid "counter_group_name"')
                if (not counters):
                    raise Exception('Each counter metric must contain a list of "counters"')
                if (counter_group_name not in job_counter[job_name]):
                    job_counter[job_name][counter_group_name] = []
                for counter in counters:
                    counter_name = counter.get('counter_name')
                    if (not counter_name):
                        raise Exception('At least one "counter_name" should be specified in the list of "counters"')
                    job_counter[job_name][counter_group_name].append(counter_name)
    return job_counter
Return a dictionary for each job counter
{
  job_name: {
    counter_group_name: [
        counter_name
      ]
    }
  }
}
def _parse_job_specific_counters(self, init_config):
    '\n        Return a dictionary for each job counter\n        {\n          job_name: {\n            counter_group_name: [\n                counter_name\n              ]\n            }\n          }\n        }\n        '
    job_counter = {}
    if init_config.get('job_specific_counters'):
        for job in init_config['job_specific_counters']:
            job_name = job.get('job_name')
            metrics = job.get('metrics')
            if (not job_name):
                raise Exception('Counter metrics must have a "job_name"')
            if (not metrics):
                raise Exception('Jobs specified in counter metrics must contain at least one metric')
            if (job_name not in job_counter):
                job_counter[job_name] = {}
            for metric in metrics:
                counter_group_name = metric.get('counter_group_name')
                counters = metric.get('counters')
                if (not counter_group_name):
                    raise Exception('Each counter metric must contain a valid "counter_group_name"')
                if (not counters):
                    raise Exception('Each counter metric must contain a list of "counters"')
                if (counter_group_name not in job_counter[job_name]):
                    job_counter[job_name][counter_group_name] = []
                for counter in counters:
                    counter_name = counter.get('counter_name')
                    if (not counter_name):
                        raise Exception('At least one "counter_name" should be specified in the list of "counters"')
                    job_counter[job_name][counter_group_name].append(counter_name)
    return job_counter