|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.client.rest.JsonBundleJob
@Entity public class JsonBundleJob
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.oozie.client.BundleJob |
---|
org.apache.oozie.client.BundleJob.Timeunit |
Nested classes/interfaces inherited from interface org.apache.oozie.client.Job |
---|
org.apache.oozie.client.Job.Status |
Constructor Summary | |
---|---|
JsonBundleJob()
|
Method Summary | |
---|---|
String |
getAcl()
|
String |
getAppName()
|
String |
getAppPath()
|
String |
getConf()
|
String |
getConsoleUrl()
|
List<org.apache.oozie.client.CoordinatorJob> |
getCoordinators()
|
Date |
getCreatedTime()
Get createdTime |
Date |
getEndTime()
|
String |
getExternalId()
Return externalId |
String |
getGroup()
Deprecated. |
String |
getId()
|
Date |
getKickoffTime()
|
Date |
getPauseTime()
Get pauseTime |
Date |
getStartTime()
|
org.apache.oozie.client.Job.Status |
getStatus()
|
int |
getTimeout()
|
org.apache.oozie.client.BundleJob.Timeunit |
getTimeUnit()
|
String |
getUser()
|
void |
resetPending()
Set pending to false |
void |
setAppName(String bundleName)
Set bundleName |
void |
setAppPath(String bundlePath)
Set bundlePath |
void |
setConf(String conf)
Set conf |
void |
setConsoleUrl(String consoleUrl)
Set consoleUrl |
void |
setCoordJobs(List<? extends JsonCoordinatorJob> coordJobs)
Set coordJobs |
void |
setCreatedTime(Date createdTime)
Set createdTime |
void |
setEndTime(Date endTime)
Set endTime |
void |
setExternalId(String externalId)
Set externalId |
void |
setGroup(String group)
Set group |
void |
setId(String id)
Set id |
void |
setKickoffTime(Date kickoffTime)
Set kickoffTime |
void |
setPauseTime(Date pauseTime)
Set pauseTime |
void |
setPending()
Set pending to true |
void |
setStartTime(Date startTime)
Set startTime |
void |
setStatus(org.apache.oozie.client.Job.Status status)
Set status |
void |
setTimeOut(int timeOut)
Set timeOut |
void |
setTimeUnit(org.apache.oozie.client.BundleJob.Timeunit timeUnit)
Set timeUnit |
void |
setUser(String user)
Set user |
static org.json.simple.JSONArray |
toJSONArray(List<? extends JsonBundleJob> applications,
String timeZoneId)
Convert a Bundle job list into a JSONArray. |
org.json.simple.JSONObject |
toJSONObject()
Get the value from the json object. |
org.json.simple.JSONObject |
toJSONObject(String timeZoneId)
Return the JSONObject for the bean with the given time zone. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JsonBundleJob()
Method Detail |
---|
public org.json.simple.JSONObject toJSONObject()
toJSONObject
in interface JsonBean
json
- public JsonBundleJob(JSONObject json) {
appPath = (String) json.get(JsonTags.BUNDLE_JOB_PATH);
appName = (String) json.get(JsonTags.BUNDLE_JOB_NAME);
id = (String) json.get(JsonTags.BUNDLE_JOB_ID);
externalId = (String) json.get(JsonTags.BUNDLE_JOB_EXTERNAL_ID);
conf = (String) json.get(JsonTags.BUNDLE_JOB_CONF);
status = Status.valueOf((String) json.get(JsonTags.BUNDLE_JOB_STATUS));
kickoffTime = JsonUtils.parseDateRfc822((String) json.get(JsonTags.BUNDLE_JOB_KICKOFF_TIME));
startTime = JsonUtils.parseDateRfc822((String) json.get(JsonTags.BUNDLE_JOB_START_TIME));
endTime = JsonUtils.parseDateRfc822((String) json.get(JsonTags.BUNDLE_JOB_END_TIME));
pauseTime = JsonUtils.parseDateRfc822((String) json.get(JsonTags.BUNDLE_JOB_PAUSE_TIME));
createdTime = JsonUtils.parseDateRfc822((String) json.get(JsonTags.BUNDLE_JOB_CREATED_TIME));
timeUnit = Timeunit.valueOf((String) json.get(JsonTags.BUNDLE_JOB_TIMEUNIT));
timeOut = (int) JsonUtils.getLongValue(json, JsonTags.BUNDLE_JOB_TIMEOUT);
user = (String) json.get(JsonTags.BUNDLE_JOB_USER);
group = (String) json.get(JsonTags.BUNDLE_JOB_GROUP);
consoleUrl = (String) json.get(JsonTags.BUNDLE_JOB_CONSOLE_URL);
coordJobs = JsonCoordinatorJob.fromJSONArray((JSONArray) json.get(JsonTags.BUNDLE_COORDINATOR_JOBS));
}
public org.json.simple.JSONObject toJSONObject(String timeZoneId)
JsonBean
toJSONObject
in interface JsonBean
timeZoneId
- the time zone to use
public String getAppName()
getAppName
in interface org.apache.oozie.client.Job
public String getAppPath()
getAppPath
in interface org.apache.oozie.client.Job
public String getConf()
getConf
in interface org.apache.oozie.client.Job
public String getConsoleUrl()
getConsoleUrl
in interface org.apache.oozie.client.Job
public List<org.apache.oozie.client.CoordinatorJob> getCoordinators()
getCoordinators
in interface org.apache.oozie.client.BundleJob
public Date getEndTime()
getEndTime
in interface org.apache.oozie.client.Job
@Deprecated public String getGroup()
getGroup
in interface org.apache.oozie.client.Job
public String getAcl()
getAcl
in interface org.apache.oozie.client.Job
public String getId()
getId
in interface org.apache.oozie.client.Job
public Date getKickoffTime()
getKickoffTime
in interface org.apache.oozie.client.BundleJob
public org.apache.oozie.client.Job.Status getStatus()
getStatus
in interface org.apache.oozie.client.Job
public org.apache.oozie.client.BundleJob.Timeunit getTimeUnit()
getTimeUnit
in interface org.apache.oozie.client.BundleJob
public int getTimeout()
getTimeout
in interface org.apache.oozie.client.BundleJob
public String getUser()
getUser
in interface org.apache.oozie.client.Job
public void setId(String id)
id
- the id to setpublic void setAppPath(String bundlePath)
bundlePath
- the bundlePath to setpublic void setAppName(String bundleName)
bundleName
- the bundleName to setpublic String getExternalId()
getExternalId
in interface org.apache.oozie.client.Job
public void setExternalId(String externalId)
externalId
- the externalId to setpublic void setConf(String conf)
conf
- the conf to setpublic void setStatus(org.apache.oozie.client.Job.Status status)
setStatus
in interface org.apache.oozie.client.Job
status
- the status to setpublic void setKickoffTime(Date kickoffTime)
kickoffTime
- the kickoffTime to setpublic void setStartTime(Date startTime)
kickoffTime
- the kickoffTime to setpublic void setEndTime(Date endTime)
endTime
- the endTime to setpublic Date getPauseTime()
getPauseTime
in interface org.apache.oozie.client.Job
public void setPauseTime(Date pauseTime)
pauseTime
- the pauseTime to setpublic Date getCreatedTime()
getCreatedTime
in interface org.apache.oozie.client.BundleJob
public void setCreatedTime(Date createdTime)
createdTime
- the createdTime to setpublic void setTimeUnit(org.apache.oozie.client.BundleJob.Timeunit timeUnit)
timeUnit
- the timeUnit to setpublic void setTimeOut(int timeOut)
timeOut
- the timeOut to setpublic void setUser(String user)
user
- the user to setpublic void setGroup(String group)
group
- the group to setpublic void setConsoleUrl(String consoleUrl)
consoleUrl
- the consoleUrl to setpublic void setCoordJobs(List<? extends JsonCoordinatorJob> coordJobs)
coordJobs
- the coordJobs to setpublic static org.json.simple.JSONArray toJSONArray(List<? extends JsonBundleJob> applications, String timeZoneId)
application
- list.timeZoneId
- time zone to use for dates in the JSON array.
public Date getStartTime()
getStartTime
in interface org.apache.oozie.client.Job
public void setPending()
setPending
in interface org.apache.oozie.client.Job
pending
- set pending to truepublic void resetPending()
resetPending
in interface org.apache.oozie.client.Job
pending
- set pending to falsepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |