Skip to content

Instantly share code, notes, and snippets.

@developer-sdk
Created October 10, 2016 13:15
Show Gist options
  • Select an option

  • Save developer-sdk/1c13649f9ae82798616b3cefbd3e86a2 to your computer and use it in GitHub Desktop.

Select an option

Save developer-sdk/1c13649f9ae82798616b3cefbd3e86a2 to your computer and use it in GitHub Desktop.
우지 웹서비스 호출
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, urllib, simplejson
# 우지 주소
OOZIE_URL = "0.0.0.0:8080"
OOZIE_JOB_TYPE = "coord"
OOZIE_STATUS = "RUNNING"
# 코디네이터 목록
def getCoordList(status):
request_url = 'http://%s/oozie/v1/jobs?jobtype=%s&len=10000&filter=status=%s' % (OOZIE_URL, OOZIE_JOB_TYPE, OOZIE_STATUS)
return simplejson.load(urllib.urlopen(request_url))
# 잡의 정보
def getJobInfo(job_id):
# 코디네이터 정보 확인
request_url = 'http://%s/oozie/v1/job/%s?show=info&len=10000' % (OOZIE_URL, job_id)
return simplejson.load(urllib.urlopen(request_url))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment