org.apache.oozie
Class BundleJobBean

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

@Entity
public class BundleJobBean
extends Object
implements org.apache.hadoop.io.Writable, org.apache.oozie.client.BundleJob, JsonBean


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
BundleJobBean()
           
 
Method Summary
 String getAcl()
           
 String getAppName()
           
 String getAppPath()
           
 String getConf()
           
 StringBlob getConfBlob()
           
 String getConsoleUrl()
           
 List<org.apache.oozie.client.CoordinatorJob> getCoordinators()
           
 Date getCreatedTime()
           
 Timestamp getCreatedTimestamp()
           
 Date getEndTime()
           
 Timestamp getEndTimestamp()
           
 String getExternalId()
          Return externalId
 String getGroup()
          Deprecated. 
 String getId()
           
 String getJobXml()
           
 StringBlob getJobXmlBlob()
           
 Date getKickoffTime()
           
 Timestamp getKickoffTimestamp()
           
 Date getLastModifiedTime()
          Get last modified time
 Timestamp getLastModifiedTimestamp()
           
 String getOrigJobXml()
           
 StringBlob getOrigJobXmlBlob()
           
 Date getPauseTime()
           
 Timestamp getPauseTimestamp()
           
 int getPending()
           
 Date getStartTime()
           
 Timestamp getstartTimestamp()
           
 org.apache.oozie.client.Job.Status getStatus()
           
 String getStatusStr()
           
 Timestamp getSuspendedTimestamp()
           
 int getTimeout()
           
 org.apache.oozie.client.BundleJob.Timeunit getTimeUnit()
           
 String getTimeUnitStr()
           
 String getUser()
           
 boolean isPending()
          Return if the action is pending.
 boolean isTerminalStatus()
           
 void readFields(DataInput dataInput)
           
 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 setConfBlob(StringBlob conf)
           
 void setConsoleUrl(String consoleUrl)
          Set consoleUrl
 void setCoordJobs(List<CoordinatorJobBean> coordJobs)
          Set coordJobs
 void setCreatedTime(Date createTime)
           
 void setEndTime(Date endTime)
           
 void setEndTimestamp(Timestamp endTimestamp)
           
 void setExternalId(String externalId)
          Set externalId
 void setGroup(String group)
          Set group
 void setId(String id)
          Set id
 void setJobXml(String jobXml)
           
 void setJobXmlBlob(StringBlob jobXmlBlob)
           
 void setKickoffTime(Date kickoffTime)
           
 void setKickoffTimestamp(Timestamp kickoffTimestamp)
           
 void setLastModifiedTime(Date lastModifiedTime)
           
 void setLastModifiedTimestamp(Timestamp lastModifiedTimestamp)
           
 void setOrigJobXml(String origJobXml)
           
 void setOrigJobXmlBlob(StringBlob origJobXml)
           
 void setPauseTime(Date pauseTime)
           
 void setPauseTimestamp(Timestamp pauseTimestamp)
           
 void setPending()
          Set pending to true
 void setPending(int i)
          Set pending value
 void setStartTime(Date startTime)
          Set startTime
 void setStartTimestamp(Timestamp startTimestamp)
           
 void setStatus(org.apache.oozie.client.Job.Status status)
          Set status
 void setStatus(String statusStr)
          Set status
 void setSuspendedTime(Date suspendTime)
           
 void setSuspendedTimestamp(Timestamp suspendedTimestamp)
           
 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<BundleJobBean> applications, String timeZoneId)
          Convert a Bundle job 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

BundleJobBean

public BundleJobBean()
Method Detail

getKickoffTimestamp

public Timestamp getKickoffTimestamp()
Returns:
the kickoffTimestamp

getstartTimestamp

public Timestamp getstartTimestamp()
Returns:
the startTimestamp

setKickoffTimestamp

public void setKickoffTimestamp(Timestamp kickoffTimestamp)
Parameters:
kickoffTimestamp - the kickoffTimestamp to set

setStartTimestamp

public void setStartTimestamp(Timestamp startTimestamp)
Parameters:
startTimestamp - the startTimestamp to set

setStartTime

public void setStartTime(Date startTime)
Set startTime

Parameters:
startTime - the startTime to set

getEndTimestamp

public Timestamp getEndTimestamp()
Returns:
the endTimestamp

setEndTimestamp

public void setEndTimestamp(Timestamp endTimestamp)
Parameters:
endTimestamp - the endTimestamp to set

getPauseTimestamp

public Timestamp getPauseTimestamp()
Returns:
the pauseTimestamp

setPauseTimestamp

public void setPauseTimestamp(Timestamp pauseTimestamp)
Parameters:
pauseTimestamp - the pauseTimestamp to set

getCreatedTimestamp

public Timestamp getCreatedTimestamp()
Returns:
the createdTimestamp

getCreatedTime

public Date getCreatedTime()
Specified by:
getCreatedTime in interface org.apache.oozie.client.BundleJob
Returns:
the createdTime

getTimeUnitStr

public String getTimeUnitStr()
Returns:
the timeUnitStr

getPending

public int getPending()
Returns:
the pending

setPending

public void setPending()
Set pending to true

Specified by:
setPending in interface org.apache.oozie.client.Job
Parameters:
pending - set pending to true

setPending

public void setPending(int i)
Set pending value

Parameters:
pending - set pending value

resetPending

public void resetPending()
Set pending to false

Specified by:
resetPending in interface org.apache.oozie.client.Job
Parameters:
pending - set pending to false

isPending

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

Returns:
if the action is pending.

getLastModifiedTimestamp

public Timestamp getLastModifiedTimestamp()
Returns:
the lastModifiedTimestamp

setLastModifiedTimestamp

public void setLastModifiedTimestamp(Timestamp lastModifiedTimestamp)
Parameters:
lastModifiedTimestamp - the lastModifiedTimestamp to set

getSuspendedTimestamp

public Timestamp getSuspendedTimestamp()
Returns:
the suspendedTimestamp

setSuspendedTimestamp

public void setSuspendedTimestamp(Timestamp suspendedTimestamp)
Parameters:
suspendedTimestamp - the suspendedTimestamp to set

getJobXml

public String getJobXml()
Returns:
the jobXml

setJobXml

public void setJobXml(String jobXml)
Parameters:
jobXml - the jobXml to set

setJobXmlBlob

public void setJobXmlBlob(StringBlob jobXmlBlob)

getJobXmlBlob

public StringBlob getJobXmlBlob()

getOrigJobXml

public String getOrigJobXml()
Returns:
the origJobXml

setOrigJobXml

public void setOrigJobXml(String origJobXml)
Parameters:
origJobXml - the origJobXml to set

setOrigJobXmlBlob

public void setOrigJobXmlBlob(StringBlob origJobXml)

getOrigJobXmlBlob

public StringBlob getOrigJobXmlBlob()

setCreatedTime

public void setCreatedTime(Date createTime)
Parameters:
createTime - the createdTime to set

setLastModifiedTime

public void setLastModifiedTime(Date lastModifiedTime)
Parameters:
lastModifiedTime -

getLastModifiedTime

public Date getLastModifiedTime()
Get last modified time

Returns:
last modified time

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
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

getEndTime

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

getKickoffTime

public Date getKickoffTime()
Specified by:
getKickoffTime in interface org.apache.oozie.client.BundleJob

getTimeUnit

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

setEndTime

public void setEndTime(Date endTime)

setKickoffTime

public void setKickoffTime(Date kickoffTime)

getPauseTime

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

setPauseTime

public void setPauseTime(Date pauseTime)

setSuspendedTime

public void setSuspendedTime(Date suspendTime)
Parameters:
return - the suspendTime

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.

getAppName

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

getAppPath

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

getConf

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

getConsoleUrl

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

getCoordinators

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

getGroup

@Deprecated
public String getGroup()
Deprecated. 

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

getAcl

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

getId

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

getTimeout

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

getUser

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

setId

public void setId(String id)
Set id

Parameters:
id - the id to set

setAppPath

public void setAppPath(String bundlePath)
Set bundlePath

Parameters:
bundlePath - the bundlePath to set

setAppName

public void setAppName(String bundleName)
Set bundleName

Parameters:
bundleName - the bundleName to set

getExternalId

public String getExternalId()
Return externalId

Specified by:
getExternalId in interface org.apache.oozie.client.Job
Returns:
externalId

setExternalId

public void setExternalId(String externalId)
Set externalId

Parameters:
externalId - the externalId to set

setConf

public void setConf(String conf)
Set conf

Parameters:
conf - the conf to set

setConfBlob

public void setConfBlob(StringBlob conf)

getConfBlob

public StringBlob getConfBlob()

setStatus

public void setStatus(org.apache.oozie.client.Job.Status status)
Set status

Specified by:
setStatus in interface org.apache.oozie.client.Job
Parameters:
status - the status to set

getStatus

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

setStatus

public void setStatus(String statusStr)
Set status

Parameters:
status - the status to set

getStatusStr

public String getStatusStr()
Returns:
status string

setTimeUnit

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

Parameters:
timeUnit - the timeUnit to set

setTimeOut

public void setTimeOut(int timeOut)
Set timeOut

Parameters:
timeOut - the timeOut to set

setUser

public void setUser(String user)
Set user

Parameters:
user - the user to set

setGroup

public void setGroup(String group)
Set group

Parameters:
group - the group to set

setConsoleUrl

public void setConsoleUrl(String consoleUrl)
Set consoleUrl

Parameters:
consoleUrl - the consoleUrl to set

setCoordJobs

public void setCoordJobs(List<CoordinatorJobBean> coordJobs)
Set coordJobs

Parameters:
coordJobs - the coordJobs to set

toJSONArray

public static org.json.simple.JSONArray toJSONArray(List<BundleJobBean> applications,
                                                    String timeZoneId)
Convert a Bundle job list into a JSONArray.

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

toString

public String toString()
Overrides:
toString in class Object

getStartTime

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

isTerminalStatus

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


Copyright © 2015 Apache Software Foundation. All Rights Reserved.