org.apache.oozie.client.rest
Class JsonCoordinatorJob

java.lang.Object
  extended by org.apache.oozie.client.rest.JsonCoordinatorJob
All Implemented Interfaces:
org.apache.oozie.client.CoordinatorJob, org.apache.oozie.client.Job, JsonBean
Direct Known Subclasses:
CoordinatorJobBean

@Entity
public class JsonCoordinatorJob
extends Object
implements org.apache.oozie.client.CoordinatorJob, JsonBean


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.oozie.client.CoordinatorJob
org.apache.oozie.client.CoordinatorJob.Execution, org.apache.oozie.client.CoordinatorJob.Timeunit
 
Nested classes/interfaces inherited from interface org.apache.oozie.client.Job
org.apache.oozie.client.Job.Status
 
Constructor Summary
JsonCoordinatorJob()
           
 
Method Summary
 String getAcl()
           
 List<org.apache.oozie.client.CoordinatorAction> getActions()
           
 String getAppName()
           
 String getAppPath()
           
 String getBundleId()
           
 int getConcurrency()
           
 String getConf()
           
 String getConsoleUrl()
          Return the coordinate application console URL.
 Date getEndTime()
           
 org.apache.oozie.client.CoordinatorJob.Execution getExecutionOrder()
           
 String getExternalId()
           
 String getFrequency()
           
 String getGroup()
           
 String getId()
           
 int getLastActionNumber()
           
 Date getLastActionTime()
           
 int getMatThrottling()
           
 Date getNextMaterializedTime()
           
 int getNumActions()
           
 Date getPauseTime()
           
 Date getStartTime()
           
 org.apache.oozie.client.Job.Status getStatus()
           
 int getTimeout()
           
 org.apache.oozie.client.CoordinatorJob.Timeunit getTimeUnit()
           
 String getTimeZone()
           
 String getUser()
           
 void resetPending()
          Set pending to false
 void setActions(List<? extends JsonCoordinatorAction> nodes)
           
 void setAppName(String appName)
           
 void setAppPath(String appPath)
           
 void setBundleId(String bundleId)
           
 void setConcurrency(int concurrency)
           
 void setConf(String conf)
           
 void setConsoleUrl(String consoleUrl)
          Set the coordinate application console URL.
 void setEndTime(Date endTime)
           
 void setExecutionOrder(org.apache.oozie.client.CoordinatorJob.Execution order)
           
 void setExternalId(String externalId)
           
 void setFrequency(String frequency)
           
 void setGroup(String group)
           
 void setId(String id)
           
 void setLastActionNumber(int lastActionNumber)
           
 void setLastActionTime(Date lastAction)
           
 void setMatThrottling(int matThrottling)
           
 void setNextMaterializedTime(Date nextMaterializedTime)
           
 void setNumActions(int numAction)
           
 void setPauseTime(Date pauseTime)
           
 void setPending()
          Set pending to true
 void setStartTime(Date startTime)
           
 void setStatus(org.apache.oozie.client.Job.Status status)
           
 void setTimeout(int timeOut)
           
 void setTimeUnit(org.apache.oozie.client.CoordinatorJob.Timeunit timeUnit)
           
 void setTimeZone(String timeZone)
           
 void setUser(String user)
           
static org.json.simple.JSONArray toJSONArray(List<? extends JsonCoordinatorJob> applications, String timeZoneId)
          Convert a coordinator application list into a JSONArray.
 org.json.simple.JSONObject toJSONObject()
          Return the JSONObject for the bean with GMT time zone.
 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

JsonCoordinatorJob

public JsonCoordinatorJob()
Method Detail

toJSONObject

public org.json.simple.JSONObject toJSONObject()
Description copied from interface: JsonBean
Return the JSONObject for the bean with GMT time zone.

Specified by:
toJSONObject in interface JsonBean
Returns:
the JSONObject for the bean with GMT time zone.

toJSONObject

public org.json.simple.JSONObject toJSONObject(String timeZoneId)
Description copied from interface: JsonBean
Return the JSONObject for the bean with the given time zone.

Specified by:
toJSONObject in interface JsonBean
Parameters:
timeZoneId - the time zone to use
Returns:
the JSONObject for the bean with the given time zone.

getAppPath

public String getAppPath()
Specified by:
getAppPath in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getAppPath in interface org.apache.oozie.client.Job

setAppPath

public void setAppPath(String appPath)

getAppName

public String getAppName()
Specified by:
getAppName in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getAppName in interface org.apache.oozie.client.Job

setAppName

public void setAppName(String appName)

getId

public String getId()
Specified by:
getId in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getId in interface org.apache.oozie.client.Job

setId

public void setId(String id)

setExternalId

public void setExternalId(String externalId)

getExternalId

public String getExternalId()
Specified by:
getExternalId in interface org.apache.oozie.client.Job

getConf

public String getConf()
Specified by:
getConf in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getConf in interface org.apache.oozie.client.Job

setConf

public void setConf(String conf)

getStatus

public org.apache.oozie.client.Job.Status getStatus()
Specified by:
getStatus in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getStatus in interface org.apache.oozie.client.Job

setStatus

public void setStatus(org.apache.oozie.client.Job.Status status)
Specified by:
setStatus in interface org.apache.oozie.client.Job

setFrequency

public void setFrequency(String frequency)

getFrequency

public String getFrequency()
Specified by:
getFrequency in interface org.apache.oozie.client.CoordinatorJob

setTimeUnit

public void setTimeUnit(org.apache.oozie.client.CoordinatorJob.Timeunit timeUnit)

getTimeUnit

public org.apache.oozie.client.CoordinatorJob.Timeunit getTimeUnit()
Specified by:
getTimeUnit in interface org.apache.oozie.client.CoordinatorJob

setTimeZone

public void setTimeZone(String timeZone)

getTimeZone

public String getTimeZone()
Specified by:
getTimeZone in interface org.apache.oozie.client.CoordinatorJob

setConcurrency

public void setConcurrency(int concurrency)

getConcurrency

public int getConcurrency()
Specified by:
getConcurrency in interface org.apache.oozie.client.CoordinatorJob

getMatThrottling

public int getMatThrottling()

setMatThrottling

public void setMatThrottling(int matThrottling)

setExecutionOrder

public void setExecutionOrder(org.apache.oozie.client.CoordinatorJob.Execution order)

getExecutionOrder

public org.apache.oozie.client.CoordinatorJob.Execution getExecutionOrder()
Specified by:
getExecutionOrder in interface org.apache.oozie.client.CoordinatorJob

setTimeout

public void setTimeout(int timeOut)

getTimeout

public int getTimeout()
Specified by:
getTimeout in interface org.apache.oozie.client.CoordinatorJob

setLastActionTime

public void setLastActionTime(Date lastAction)

getLastActionTime

public Date getLastActionTime()
Specified by:
getLastActionTime in interface org.apache.oozie.client.CoordinatorJob

getNextMaterializedTime

public Date getNextMaterializedTime()
Specified by:
getNextMaterializedTime in interface org.apache.oozie.client.CoordinatorJob

setNextMaterializedTime

public void setNextMaterializedTime(Date nextMaterializedTime)

getStartTime

public Date getStartTime()
Specified by:
getStartTime in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getStartTime in interface org.apache.oozie.client.Job

setStartTime

public void setStartTime(Date startTime)

getEndTime

public Date getEndTime()
Specified by:
getEndTime in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getEndTime in interface org.apache.oozie.client.Job

setEndTime

public void setEndTime(Date endTime)

getPauseTime

public Date getPauseTime()
Specified by:
getPauseTime in interface org.apache.oozie.client.Job

setPauseTime

public void setPauseTime(Date pauseTime)

getUser

public String getUser()
Specified by:
getUser in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getUser in interface org.apache.oozie.client.Job

setUser

public void setUser(String user)

getGroup

public String getGroup()
Specified by:
getGroup in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getGroup in interface org.apache.oozie.client.Job

getAcl

public String getAcl()
Specified by:
getAcl in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getAcl in interface org.apache.oozie.client.Job

setGroup

public void setGroup(String group)

getBundleId

public String getBundleId()
Specified by:
getBundleId in interface org.apache.oozie.client.CoordinatorJob

setBundleId

public void setBundleId(String bundleId)

getConsoleUrl

public String getConsoleUrl()
Return the coordinate application console URL.

Specified by:
getConsoleUrl in interface org.apache.oozie.client.CoordinatorJob
Specified by:
getConsoleUrl in interface org.apache.oozie.client.Job
Returns:
the coordinate application console URL.

setConsoleUrl

public void setConsoleUrl(String consoleUrl)
Set the coordinate application console URL.

Parameters:
consoleUrl - the coordinate application console URL.

toString

public String toString()
Overrides:
toString in class Object

setActions

public void setActions(List<? extends JsonCoordinatorAction> nodes)

getActions

public List<org.apache.oozie.client.CoordinatorAction> getActions()
Specified by:
getActions in interface org.apache.oozie.client.CoordinatorJob

toJSONArray

public static org.json.simple.JSONArray toJSONArray(List<? extends JsonCoordinatorJob> applications,
                                                    String timeZoneId)
Convert a coordinator application list into a JSONArray.

Parameters:
applications - list.
timeZoneId - time zone to use for dates in the JSON array.
Returns:
the corresponding JSON array.

getLastActionNumber

public int getLastActionNumber()

setLastActionNumber

public void setLastActionNumber(int lastActionNumber)

setPending

public void setPending()
Set pending to true

Specified by:
setPending in interface org.apache.oozie.client.Job

resetPending

public void resetPending()
Set pending to false

Specified by:
resetPending in interface org.apache.oozie.client.Job

getNumActions

public int getNumActions()

setNumActions

public void setNumActions(int numAction)


Copyright © 2013 Apache Software Foundation. All Rights Reserved.