org.apache.oozie
Class CoordinatorJobBean

java.lang.Object
  extended by org.apache.oozie.CoordinatorJobBean
All Implemented Interfaces:
org.apache.hadoop.io.Writable, org.apache.oozie.client.CoordinatorJob, org.apache.oozie.client.Job, JsonBean

@Entity
public class CoordinatorJobBean
extends Object
implements org.apache.hadoop.io.Writable, 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
CoordinatorJobBean()
           
 
Method Summary
 String getAcl()
           
 List<org.apache.oozie.client.CoordinatorAction> getActions()
           
 String getAppName()
           
 String getAppNamespace()
          Get app namespce
 String getAppPath()
           
 String getBundleId()
           
 int getConcurrency()
           
 String getConf()
           
 StringBlob getConfBlob()
           
 String getConsoleUrl()
          Return the coordinate application console URL.
 Date getCreatedTime()
          Get created time
 Timestamp getCreatedTimestamp()
          Get created timestamp
 Date getEndTime()
           
 Timestamp getEndTimestamp()
          Get end timestamp
 String getExecution()
          Get execution
 org.apache.oozie.client.CoordinatorJob.Execution getExecutionOrder()
           
 String getExternalId()
           
 String getFrequency()
           
 String getGroup()
           
 String getId()
           
 String getJobXml()
          Get job xml
 StringBlob getJobXmlBlob()
           
 int getLastActionNumber()
           
 Date getLastActionTime()
           
 Timestamp getLastActionTimestamp()
          Get last action timestamp
 Date getLastModifiedTime()
          Get last modified time
 Timestamp getLastModifiedTimestamp()
          Get last modified timestamp
 int getMatThrottling()
           
 Date getNextMaterializedTime()
           
 Timestamp getNextMaterializedTimestamp()
          Get next materialized timestamp
 int getNumActions()
           
 String getOrigJobXml()
          Get original job xml
 StringBlob getOrigJobXmlBlob()
           
 Date getPauseTime()
           
 Timestamp getPauseTimestamp()
           
 String getSlaXml()
          Get sla xml
 StringBlob getSlaXmlBlob()
           
 Date getStartTime()
           
 Timestamp getStartTimestamp()
          Get start timestamp
 org.apache.oozie.client.Job.Status getStatus()
           
 String getStatusStr()
          Get status
 Date getSuspendedTime()
          Get suspended time
 Timestamp getSuspendedTimestamp()
          Get suspended timestamp
 int getTimeout()
           
 org.apache.oozie.client.CoordinatorJob.Timeunit getTimeUnit()
           
 String getTimeUnitStr()
          Get time unit
 String getTimeZone()
           
 String getUser()
           
 boolean isDoneMaterialization()
          Return if the action is done with materialization
 boolean isPending()
          Return if the action is pending.
 boolean isTerminalStatus()
           
 void readFields(DataInput dataInput)
          Deserialize a coordinator bean from a data input.
 void resetDoneMaterialization()
          Set doneMaterialization to false
 void resetPending()
          Set pending to false
 void setActions(List<CoordinatorActionBean> nodes)
           
 void setAppName(String appName)
           
 void setAppNamespace(String appNamespace)
          Set app namespce
 void setAppPath(String appPath)
           
 void setBundleId(String bundleId)
           
 void setConcurrency(int concurrency)
           
 void setConf(String conf)
           
 void setConfBlob(StringBlob conf)
           
 void setConsoleUrl(String consoleUrl)
          Set the coordinate application console URL.
 void setCreatedTime(Date createTime)
          Set created time
 void setDoneMaterialization()
          Set doneMaterialization to true
 void setDoneMaterialization(int i)
          Set doneMaterialization
 void setEndTime(Date endTime)
           
 void setEndTimestamp(Timestamp endTimestamp)
          Set end timestamp
 void setExecution(String order)
          Get execution
 void setExecutionOrder(org.apache.oozie.client.CoordinatorJob.Execution order)
          Set order
 void setExternalId(String externalId)
           
 void setFrequency(String frequency)
           
 void setGroup(String group)
           
 void setId(String id)
           
 void setJobXml(String jobXml)
          Set job xml
 void setJobXmlBlob(StringBlob jobXmlBlob)
           
 void setLastActionNumber(int lastActionNumber)
           
 void setLastActionTime(Date lastAction)
           
 void setLastActionTimestamp(Timestamp lastActionTimestamp)
          Set last action timestamp
 void setLastModifiedTime(Date lastModifiedTime)
          Set last modified time
 void setLastModifiedTimestamp(Timestamp lastModifiedTimestamp)
          Set last modified timestamp
 void setMatThrottling(int matThrottling)
           
 void setNextMaterializedTime(Date nextMaterializedTime)
           
 void setNextMaterializedTimestamp(Timestamp nextMaterializedTimestamp)
          Set next materialized timestamp
 void setNumActions(int numAction)
           
 void setOrigJobXml(String origJobXml)
          Set original job xml
 void setOrigJobXmlBlob(StringBlob origJobXml)
           
 void setPauseTime(Date pauseTime)
           
 void setPending()
          Set pending to true
 void setSlaXml(String slaXml)
          Set sla xml
 void setSlaXmlBlob(StringBlob slaXml)
           
 void setStartTime(Date startTime)
           
 void setStartTimestamp(Timestamp startTimestamp)
          Set start timestamp
 void setStatus(org.apache.oozie.client.Job.Status val)
           
 void setStatusStr(String status)
          Get status
 void setSuspendedTime(Date suspendedTime)
          Set suspended time
 void setSuspendedTimestamp(Timestamp suspendedTimestamp)
          Set suspended timestamp
 void setTimeout(int timeOut)
           
 void setTimeUnit(org.apache.oozie.client.CoordinatorJob.Timeunit timeUnit)
           
 void setTimeUnitStr(String timeunit)
          Set time unit
 void setTimeZone(String timeZone)
           
 void setUser(String user)
           
static org.json.simple.JSONArray toJSONArray(List<CoordinatorJobBean> 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()
           
 void write(DataOutput dataOutput)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoordinatorJobBean

public CoordinatorJobBean()
Method Detail

getStartTimestamp

public Timestamp getStartTimestamp()
Get start timestamp

Returns:
start timestamp

setStartTimestamp

public void setStartTimestamp(Timestamp startTimestamp)
Set start timestamp

Parameters:
startTimestamp - start timestamp

getEndTimestamp

public Timestamp getEndTimestamp()
Get end timestamp

Returns:
end timestamp

setEndTimestamp

public void setEndTimestamp(Timestamp endTimestamp)
Set end timestamp

Parameters:
endTimestamp - end timestamp

getNextMaterializedTimestamp

public Timestamp getNextMaterializedTimestamp()
Get next materialized timestamp

Returns:
next materialized timestamp

setNextMaterializedTimestamp

public void setNextMaterializedTimestamp(Timestamp nextMaterializedTimestamp)
Set next materialized timestamp

Parameters:
nextMaterializedTimestamp - next materialized timestamp

getLastModifiedTimestamp

public Timestamp getLastModifiedTimestamp()
Get last modified timestamp

Returns:
last modified timestamp

setLastModifiedTimestamp

public void setLastModifiedTimestamp(Timestamp lastModifiedTimestamp)
Set last modified timestamp

Parameters:
lastModifiedTimestamp - last modified timestamp

getSuspendedTimestamp

public Timestamp getSuspendedTimestamp()
Get suspended timestamp

Returns:
suspended timestamp

setSuspendedTimestamp

public void setSuspendedTimestamp(Timestamp suspendedTimestamp)
Set suspended timestamp

Parameters:
suspendedTimestamp - suspended timestamp

getJobXml

public String getJobXml()
Get job xml

Returns:
job xml

setJobXml

public void setJobXml(String jobXml)
Set job xml

Parameters:
jobXml - job xml

setJobXmlBlob

public void setJobXmlBlob(StringBlob jobXmlBlob)

getJobXmlBlob

public StringBlob getJobXmlBlob()

getOrigJobXml

public String getOrigJobXml()
Get original job xml

Returns:
original job xml

setOrigJobXml

public void setOrigJobXml(String origJobXml)
Set original job xml

Parameters:
origJobXml -

setOrigJobXmlBlob

public void setOrigJobXmlBlob(StringBlob origJobXml)

getOrigJobXmlBlob

public StringBlob getOrigJobXmlBlob()

getSlaXml

public String getSlaXml()
Get sla xml

Returns:
sla xml

setSlaXml

public void setSlaXml(String slaXml)
Set sla xml

Parameters:
slaXml - sla xml

setSlaXmlBlob

public void setSlaXmlBlob(StringBlob slaXml)

getSlaXmlBlob

public StringBlob getSlaXmlBlob()

setLastActionTimestamp

public void setLastActionTimestamp(Timestamp lastActionTimestamp)
Set last action timestamp

Parameters:
lastActionTimestamp - last action timestamp

isPending

public boolean isPending()
Return if the action is pending.

Returns:
if the action is pending.

setDoneMaterialization

public void setDoneMaterialization()
Set doneMaterialization to true


setDoneMaterialization

public void setDoneMaterialization(int i)
Set doneMaterialization


resetDoneMaterialization

public void resetDoneMaterialization()
Set doneMaterialization to false


isDoneMaterialization

public boolean isDoneMaterialization()
Return if the action is done with materialization

Returns:
if the action is done with materialization

getAppNamespace

public String getAppNamespace()
Get app namespce

Returns:
app namespce

setAppNamespace

public void setAppNamespace(String appNamespace)
Set app namespce

Parameters:
appNamespace - the app namespce to set

write

public void write(DataOutput dataOutput)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput dataInput)
                throws IOException
Deserialize a coordinator bean from a data input.

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Parameters:
dataInput - data input.
Throws:
IOException - thrown if the workflow bean could not be deserialized.

isTerminalStatus

public boolean isTerminalStatus()
Returns:
true if in terminal status

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

getStatusStr

public String getStatusStr()
Get status

Returns:
status

setStatusStr

public void setStatusStr(String status)
Get status


setStatus

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

getTimeUnitStr

public String getTimeUnitStr()
Get time unit

Returns:
time unit

setTimeUnitStr

public void setTimeUnitStr(String timeunit)
Set time unit


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

setExecutionOrder

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

Parameters:
order -

getExecutionOrder

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

setExecution

public void setExecution(String order)
Get execution


getExecution

public String getExecution()
Get execution

Returns:
execution

setLastActionTime

public void setLastActionTime(Date lastAction)

getLastActionTime

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

getLastActionTimestamp

public Timestamp getLastActionTimestamp()
Get last action timestamp

Returns:
last action timestamp

setNextMaterializedTime

public void setNextMaterializedTime(Date nextMaterializedTime)

getNextMaterializedTime

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

setLastModifiedTime

public void setLastModifiedTime(Date lastModifiedTime)
Set last modified time

Parameters:
lastModifiedTime - last modified time

getLastModifiedTime

public Date getLastModifiedTime()
Get last modified time

Returns:
last modified time

setSuspendedTime

public void setSuspendedTime(Date suspendedTime)
Set suspended time

Parameters:
suspendedTime - suspended time

getSuspendedTime

public Date getSuspendedTime()
Get suspended time

Returns:
suspended time

setStartTime

public void setStartTime(Date startTime)

getStartTime

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

setEndTime

public void setEndTime(Date endTime)

setPauseTime

public void setPauseTime(Date pauseTime)

getEndTime

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

getPauseTime

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

getPauseTimestamp

public Timestamp getPauseTimestamp()

setCreatedTime

public void setCreatedTime(Date createTime)
Set created time

Parameters:
createTime - created time

getCreatedTime

public Date getCreatedTime()
Get created time

Returns:
created time

getCreatedTimestamp

public Timestamp getCreatedTimestamp()
Get created timestamp

Returns:
created timestamp

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)

setConfBlob

public void setConfBlob(StringBlob conf)

getConfBlob

public StringBlob getConfBlob()

setFrequency

public void setFrequency(String frequency)

getFrequency

public String getFrequency()
Specified by:
getFrequency 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)

setTimeout

public void setTimeout(int timeOut)

getTimeout

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

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<CoordinatorActionBean> 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<CoordinatorJobBean> 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)

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.


Copyright © 2015 Apache Software Foundation. All Rights Reserved.