org.apache.oozie
Class WorkflowJobBean

java.lang.Object
  extended by org.apache.oozie.WorkflowJobBean
All Implemented Interfaces:
org.apache.hadoop.io.Writable, JsonBean, org.apache.oozie.client.WorkflowJob

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.oozie.client.WorkflowJob
org.apache.oozie.client.WorkflowJob.Status
 
Constructor Summary
WorkflowJobBean()
          Default constructor.
 
Method Summary
 String getAcl()
           
 List<org.apache.oozie.client.WorkflowAction> getActions()
           
 String getAppName()
           
 String getAppPath()
           
 String getConf()
           
 StringBlob getConfBlob()
           
 String getConsoleUrl()
          Return the workflow job console URL.
 Date getCreatedTime()
           
 Timestamp getCreatedTimestamp()
           
 Date getEndTime()
           
 Timestamp getEndTimestamp()
           
 String getExternalId()
           
 String getGroup()
           
 String getId()
           
 Date getLastModifiedTime()
           
 Timestamp getLastModifiedTimestamp()
           
 String getlogToken()
           
 String getLogToken()
           
 String getParentId()
          Return the corresponding Action ID, if any.
 String getProtoActionConf()
           
 StringBlob getProtoActionConfBlob()
           
 int getRun()
           
 String getSlaXml()
           
 StringBlob getSlaXmlBlob()
           
 Date getStartTime()
           
 Timestamp getStartTimestamp()
           
 org.apache.oozie.client.WorkflowJob.Status getStatus()
           
 String getStatusStr()
           
 String getUser()
           
 BinaryBlob getWfInstanceBlob()
           
 WorkflowInstance getWorkflowInstance()
           
 boolean inTerminalState()
           
 void readFields(DataInput dataInput)
          Deserialize a workflow bean from a data input.
 void setActions(List<WorkflowActionBean> nodes)
           
 void setAppName(String appName)
           
 void setAppPath(String appPath)
           
 void setConf(String conf)
           
 void setConfBlob(StringBlob conf)
           
 void setConsoleUrl(String consoleUrl)
          Set the workflow job console URL.
 void setCreatedTime(Date createdTime)
           
 void setEndTime(Date endTime)
           
 void setExternalId(String externalId)
           
 void setGroup(String group)
           
 void setId(String id)
           
 void setLastModifiedTime(Date lastModifiedTime)
           
 void setLogToken(String logToken)
           
 void setParentId(String parentId)
          Set coordinator action id
 void setProtoActionConf(String protoActionConf)
           
 void setProtoActionConfBlob(StringBlob protoBytes)
           
 void setRun(int run)
           
 void setSlaXml(String slaXml)
           
 void setSlaXmlBlob(StringBlob slaXml)
           
 void setStartTime(Date startTime)
           
 void setStatus(org.apache.oozie.client.WorkflowJob.Status val)
           
 void setStatusStr(String statusStr)
           
 void setUser(String user)
           
 void setWfInstanceBlob(BinaryBlob wfInstance)
           
 void setWorkflowInstance(WorkflowInstance workflowInstance)
           
static org.json.simple.JSONArray toJSONArray(List<WorkflowJobBean> workflows, String timeZoneId)
          Convert a workflows 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)
          Serialize the workflow bean to a data output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkflowJobBean

public WorkflowJobBean()
Default constructor.

Method Detail

write

public void write(DataOutput dataOutput)
           throws IOException
Serialize the workflow bean to a data output.

Specified by:
write in interface org.apache.hadoop.io.Writable
Parameters:
dataOutput - data output.
Throws:
IOException - thrown if the workflow bean could not be serialized.

readFields

public void readFields(DataInput dataInput)
                throws IOException
Deserialize a workflow 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.

inTerminalState

public boolean inTerminalState()

getLogToken

public String getLogToken()

setLogToken

public void setLogToken(String logToken)

getSlaXml

public String getSlaXml()

setSlaXml

public void setSlaXml(String slaXml)

setSlaXmlBlob

public void setSlaXmlBlob(StringBlob slaXml)

getSlaXmlBlob

public StringBlob getSlaXmlBlob()

getWorkflowInstance

public WorkflowInstance getWorkflowInstance()

getWfInstanceBlob

public BinaryBlob getWfInstanceBlob()

setWorkflowInstance

public void setWorkflowInstance(WorkflowInstance workflowInstance)

setWfInstanceBlob

public void setWfInstanceBlob(BinaryBlob wfInstance)

getProtoActionConf

public String getProtoActionConf()

setProtoActionConf

public void setProtoActionConf(String protoActionConf)

setProtoActionConfBlob

public void setProtoActionConfBlob(StringBlob protoBytes)

getProtoActionConfBlob

public StringBlob getProtoActionConfBlob()

getlogToken

public String getlogToken()

getLastModifiedTimestamp

public Timestamp getLastModifiedTimestamp()

getStartTimestamp

public Timestamp getStartTimestamp()

getCreatedTimestamp

public Timestamp getCreatedTimestamp()

getEndTimestamp

public Timestamp getEndTimestamp()

setStatusStr

public void setStatusStr(String statusStr)

setStatus

public void setStatus(org.apache.oozie.client.WorkflowJob.Status val)

getStatus

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

getStatusStr

public String getStatusStr()

setExternalId

public void setExternalId(String externalId)

getExternalId

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

setLastModifiedTime

public void setLastModifiedTime(Date lastModifiedTime)

getLastModifiedTime

public Date getLastModifiedTime()
Specified by:
getLastModifiedTime in interface org.apache.oozie.client.WorkflowJob

getCreatedTime

public Date getCreatedTime()
Specified by:
getCreatedTime in interface org.apache.oozie.client.WorkflowJob

setCreatedTime

public void setCreatedTime(Date createdTime)

getStartTime

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

setStartTime

public void setStartTime(Date startTime)

getEndTime

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

setEndTime

public void setEndTime(Date endTime)

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.WorkflowJob

setAppPath

public void setAppPath(String appPath)

getAppName

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

setAppName

public void setAppName(String appName)

getId

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

setId

public void setId(String id)

getConf

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

setConf

public void setConf(String conf)

setConfBlob

public void setConfBlob(StringBlob conf)

getConfBlob

public StringBlob getConfBlob()

getUser

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

setUser

public void setUser(String user)

getGroup

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

getAcl

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

setGroup

public void setGroup(String group)

getRun

public int getRun()
Specified by:
getRun in interface org.apache.oozie.client.WorkflowJob

setRun

public void setRun(int run)

getConsoleUrl

public String getConsoleUrl()
Return the workflow job console URL.

Specified by:
getConsoleUrl in interface org.apache.oozie.client.WorkflowJob
Returns:
the workflow job console URL.

getParentId

public String getParentId()
Return the corresponding Action ID, if any.

Specified by:
getParentId in interface org.apache.oozie.client.WorkflowJob
Returns:
the coordinator Action Id.

setParentId

public void setParentId(String parentId)
Set coordinator action id

Parameters:
parentId - : coordinator action id

setConsoleUrl

public void setConsoleUrl(String consoleUrl)
Set the workflow job console URL.

Parameters:
consoleUrl - the workflow job console URL.

getActions

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

setActions

public void setActions(List<WorkflowActionBean> nodes)

toString

public String toString()
Overrides:
toString in class Object

toJSONArray

public static org.json.simple.JSONArray toJSONArray(List<WorkflowJobBean> workflows,
                                                    String timeZoneId)
Convert a workflows list into a JSONArray.

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


Copyright © 2015 Apache Software Foundation. All Rights Reserved.