def __init__(self, user, app_id): Api.__init__(self, user) self.app_id = '_'.join( app_id.replace('task_', 'application_').replace( 'attempt_', 'application_').split('_')[:3]) self.task_id = '_'.join( app_id.replace('attempt_', 'task_').split('_')[:5]) self.attempt_id = app_id
def __init__(self, user, app_id): Api.__init__(self, user) self.app_executor_id = app_id self.executor_id, self.app_id = app_id.split('_executor_') job = NativeYarnApi(self.user).get_job(jobid=self.app_id) if job: executors = job.get_executors() self._executors = [executor for executor in executors if executor['executor_id'] == self.executor_id] self.history_server_api = job.history_server_api
def __init__(self, user, app_id): Api.__init__(self, user) start = 'appattempt_' if app_id.startswith( 'appattempt_') else 'attempt_' self.app_id = '_'.join( app_id.replace('task_', 'application_').replace( start, 'application_').split('_')[:3]) self.task_id = '_'.join(app_id.replace(start, 'task_').split('_')[:5]) self.attempt_id = app_id
def __init__(self, user, app_id): Api.__init__(self, user) self.app_id = '_'.join(app_id.replace('task_', 'application_').replace('attempt_', 'application_').split('_')[:3]) self.task_id = '_'.join(app_id.replace('attempt_', 'task_').split('_')[:5]) self.attempt_id = app_id
def __init__(self, user, app_id): Api.__init__(self, user) start = 'appattempt_' if app_id.startswith('appattempt_') else 'attempt_' self.app_id = '_'.join(app_id.replace('task_', 'application_').replace(start, 'application_').split('_')[:3]) self.task_id = '_'.join(app_id.replace(start, 'task_').split('_')[:5]) self.attempt_id = app_id