def app(self, appid): if '@' in appid: return WorkflowActionApi(self.user).app(appid) oozie_api = get_oozie(self.user) workflow = oozie_api.get_job(jobid=appid) common = { 'id': workflow.id, 'name': workflow.appName, 'status': workflow.status, 'apiStatus': self._api_status(workflow.status), 'progress': workflow.get_progress(), 'type': 'workflow', } request = MockDjangoRequest(self.user) response = list_oozie_workflow(request, job_id=appid) common['properties'] = json.loads(response.content) common['properties']['xml'] = '' common['properties']['properties'] = '' common['properties']['coordinator_id'] = workflow.get_parent_job_id() common['properties']['bundle_id'] = workflow.conf_dict.get( 'oozie.bundle.id') return common
def app(self, appid): if '@' in appid: return WorkflowActionApi(self.user).app(appid) oozie_api = get_oozie(self.user) workflow = oozie_api.get_job(jobid=appid) common = { 'id': workflow.id, 'name': workflow.appName, 'status': workflow.status, 'apiStatus': self._api_status(workflow.status), 'progress': workflow.get_progress(), 'type': 'workflow', 'user': workflow.user, 'duration': workflow.durationTime, 'submitted': workflow.submissionTime * 1000, 'canWrite': has_job_edition_permission(workflow, self.user), } request = MockDjangoRequest(self.user) response = list_oozie_workflow(request, job_id=appid) common['properties'] = json.loads(response.content) common['properties']['xml'] = '' common['properties']['properties'] = '' common['properties']['coordinator_id'] = workflow.get_parent_job_id() common['properties']['bundle_id'] = workflow.conf_dict.get( 'oozie.bundle.id') common['properties']['parameters'] = self._get_variables(workflow) common['doc_url'] = common['properties'].get('doc_url') return common
def app(self, appid): if '@' in appid: return WorkflowActionApi(self.user).app(appid) oozie_api = get_oozie(self.user) workflow = oozie_api.get_job(jobid=appid) common = { 'id': workflow.id, 'name': workflow.appName, 'status': workflow.status, 'apiStatus': self._api_status(workflow.status), 'progress': workflow.get_progress(), 'type': 'workflow', 'user': workflow.user, 'duration': workflow.durationTime, 'submitted': workflow.submissionTime * 1000, 'canWrite': has_job_edition_permission(workflow, self.user), } request = MockDjangoRequest(self.user) response = list_oozie_workflow(request, job_id=appid) common['properties'] = json.loads(response.content) common['properties']['xml'] = '' common['properties']['properties'] = '' common['properties']['coordinator_id'] = workflow.get_parent_job_id() common['properties']['bundle_id'] = workflow.conf_dict.get('oozie.bundle.id') common['properties']['parameters'] = self._get_variables(workflow) common['doc_url'] = common['properties'].get('doc_url') return common
def app(self, appid): if '@' in appid: return WorkflowActionApi(self.user).app(appid) oozie_api = get_oozie(self.user) workflow = oozie_api.get_job(jobid=appid) common = { 'id': workflow.id, 'name': workflow.appName, 'status': workflow.status, 'apiStatus': self._api_status(workflow.status), 'progress': workflow.get_progress(), 'type': 'workflow', } request = MockDjangoRequest(self.user) response = list_oozie_workflow(request, job_id=appid) common['properties'] = json.loads(response.content) common['properties']['xml'] = '' common['properties']['properties'] = '' common['properties']['coordinator_id'] = workflow.get_parent_job_id() common['properties']['bundle_id'] = workflow.conf_dict.get('oozie.bundle.id') return common
def app(self, appid): oozie_api = get_oozie(self.user) workflow = oozie_api.get_job(jobid=appid) common = {'id': workflow.id, 'name': workflow.appName, 'status': workflow.status} request = MockDjangoRequest(self.user) response = list_oozie_workflow(request, job_id=appid) common['properties'] = json.loads(response.content) return common