@Entity public class WorkflowActionBean extends java.lang.Object implements org.apache.hadoop.io.Writable, org.apache.oozie.client.WorkflowAction, JsonBean
| Constructor and Description |
|---|
WorkflowActionBean()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getConf() |
StringBlob |
getConfBlob() |
java.lang.String |
getConsoleUrl() |
java.util.Date |
getCreatedTime() |
java.sql.Timestamp |
getCreatedTimestamp() |
java.lang.String |
getCred() |
java.lang.String |
getData() |
StringBlob |
getDataBlob() |
java.util.Date |
getEndTime() |
java.sql.Timestamp |
getEndTimestamp()
Return the action last check time
|
java.lang.String |
getErrorCode() |
java.lang.String |
getErrorMessage() |
java.lang.String |
getExecutionPath()
Return the node execution path.
|
java.lang.String |
getExecutionStats()
Return the action statistics info.
|
java.lang.String |
getExternalChildIDs()
Return the external child IDs.
|
StringBlob |
getExternalChildIDsBlob()
Get external ChildIds
|
java.lang.String |
getExternalId() |
java.lang.String |
getExternalStatus() |
java.lang.String |
getId() |
java.lang.String |
getJobId()
Return the job Id.
|
java.util.Date |
getLastCheckTime()
Return the action last check time
|
java.sql.Timestamp |
getLastCheckTimestamp()
Return the action last check time
|
java.lang.String |
getLogToken()
Return the job log token.
|
java.lang.String |
getName() |
int |
getPending() |
java.util.Date |
getPendingAge()
Return the pending age of the action.
|
java.sql.Timestamp |
getPendingAgeTimestamp()
Return the action last check time
|
int |
getRetries() |
java.lang.String |
getSignalValue()
Return the signal value for the action.
|
java.lang.String |
getSlaXml() |
StringBlob |
getSlaXmlBlob() |
java.util.Date |
getStartTime() |
java.sql.Timestamp |
getStartTimestamp()
Return the action last check time
|
java.lang.String |
getStats() |
StringBlob |
getStatsBlob() |
org.apache.oozie.client.WorkflowAction.Status |
getStatus() |
java.lang.String |
getStatusStr()
Get status
|
java.lang.String |
getTrackerUri() |
java.lang.String |
getTransition() |
java.lang.String |
getType() |
int |
getUserRetryCount() |
int |
getUserRetryInterval() |
int |
getUserRetryMax() |
java.lang.String |
getWfId()
Return the job Id.
|
void |
incRetries()
Increments the number of retries for the action.
|
void |
incrmentUserRetryCount() |
boolean |
inTerminalState()
Return whether workflow action in terminal state or not
|
boolean |
isComplete()
Return if the action is complete.
|
boolean |
isExecutionComplete()
Return if the action execution is complete.
|
boolean |
isPending()
Return if the action is pending.
|
boolean |
isRetryOrManual()
Return if the action is START_RETRY or START_MANUAL or END_RETRY or
END_MANUAL.
|
boolean |
isTerminalWithFailure()
Return if the action is complete with failure.
|
boolean |
isUserRetry()
Return true if the action is USER_RETRY
|
void |
readFields(java.io.DataInput dataInput)
Deserialize an action bean from a data input.
|
void |
resetPending()
Removes the pending flag and pendingAge from the action.
|
void |
resetPendingOnly()
Removes the pending flag from the action.
|
void |
setConf(java.lang.String conf) |
void |
setConfBlob(StringBlob conf) |
void |
setConsoleUrl(java.lang.String consoleUrl)
Set console URL
|
void |
setCreatedTime(java.util.Date createdTime) |
void |
setCred(java.lang.String cred) |
void |
setData(java.lang.String data)
Set data
|
void |
setDataBlob(StringBlob data) |
void |
setEndData(org.apache.oozie.client.WorkflowAction.Status status,
java.lang.String signalValue)
Set the completion information for an action end.
|
void |
setEndTime(java.util.Date endTime)
Set end time
|
void |
setErrorInfo(java.lang.String errorCode,
java.lang.String errorMessage)
Set the error Info
|
void |
setExecutionData(java.lang.String externalStatus,
java.util.Properties actionData)
Set the completion information for an action start.
|
void |
setExecutionPath(java.lang.String executionPath)
Set the node execution path.
|
void |
setExecutionStats(java.lang.String jsonStats)
Set the action statistics info for the workflow action.
|
void |
setExternalChildIDs(java.lang.String externalChildIDs)
Set the external child IDs for the workflow action.
|
void |
setExternalChildIDsBlob(StringBlob externalChildIDs)
Set external child ids
|
void |
setExternalId(java.lang.String externalId)
Set external Id
|
void |
setExternalStatus(java.lang.String externalStatus)
Set external status
|
void |
setId(java.lang.String id) |
void |
setJobId(java.lang.String id)
Set the job id.
|
void |
setLastCheckTime(java.util.Date lastCheckTime)
Sets the action last check time
|
void |
setLogToken(java.lang.String logToken)
Set the job log token.
|
void |
setName(java.lang.String name) |
void |
setPending()
Set the action as pending and the current time as pending.
|
void |
setPending(int i)
Set pending flag
|
void |
setPendingAge(java.util.Date pendingAge)
Set a time when the action will be pending, normally a time in the
future.
|
void |
setPendingOnly()
Set the action pending flag to true.
|
void |
setRetries(int retries) |
void |
setSignalValue(java.lang.String signalValue)
Set the signal value for the action.
|
void |
setSlaXml(java.lang.String slaXmlStr) |
void |
setSlaXmlBlob(StringBlob slaXml) |
void |
setStartData(java.lang.String externalId,
java.lang.String trackerUri,
java.lang.String consoleUrl)
Set a tracking information for an action, and set the action status to
Action.Status#DONE |
void |
setStartTime(java.util.Date startTime)
Set start time
|
void |
setStats(java.lang.String stats)
Set stats
|
void |
setStatsBlob(StringBlob stats) |
void |
setStatus(org.apache.oozie.client.WorkflowAction.Status val)
Set status of job
|
void |
setStatusStr(java.lang.String statusStr)
Set status
|
void |
setTrackerUri(java.lang.String trackerUri)
Set tracker uri
|
void |
setTransition(java.lang.String transition)
Set transition
|
void |
setType(java.lang.String type) |
void |
setUserRetryCount(int retryCount) |
void |
setUserRetryInterval(int retryInterval) |
void |
setUserRetryMax(int retryMax)
Set user retry max
|
static org.json.simple.JSONArray |
toJSONArray(java.util.List<WorkflowActionBean> nodes,
java.lang.String timeZoneId)
Convert a nodes list into a JSONArray.
|
org.json.simple.JSONObject |
toJSONObject()
Return the JSONObject for the bean with GMT time zone.
|
org.json.simple.JSONObject |
toJSONObject(java.lang.String timeZoneId)
Return the JSONObject for the bean with the given time zone.
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput dataOutput)
Serialize the action bean to a data output.
|
public WorkflowActionBean()
public void write(java.io.DataOutput dataOutput) throws java.io.IOException
write in interface org.apache.hadoop.io.WritabledataOutput - data output.java.io.IOException - thrown if the action bean could not be serialized.public void readFields(java.io.DataInput dataInput) throws java.io.IOException
readFields in interface org.apache.hadoop.io.WritabledataInput - data input.java.io.IOException - thrown if the action bean could not be deserialized.public boolean inTerminalState()
public boolean isExecutionComplete()
public boolean isRetryOrManual()
public boolean isUserRetry()
public boolean isComplete()
public boolean isTerminalWithFailure()
public void setPendingOnly()
public void setPending()
public void setPending(int i)
public void setPendingAge(java.util.Date pendingAge)
pendingAge - the time when the action will be pending.public java.util.Date getPendingAge()
null if the action is
not pending.public boolean isPending()
public void resetPending()
public void resetPendingOnly()
public void incRetries()
public void setStartData(java.lang.String externalId, java.lang.String trackerUri, java.lang.String consoleUrl)
Action.Status#DONEexternalId - external ID for the action.trackerUri - tracker URI for the action.consoleUrl - console URL for the action.public void setExecutionData(java.lang.String externalStatus, java.util.Properties actionData)
Action.Status#DONEexternalStatus - action external end status.actionData - action output data, null if there is no
action output data.public java.lang.String getExecutionStats()
public void setExecutionStats(java.lang.String jsonStats)
Json - representation of the stats.public java.lang.String getExternalChildIDs()
getExternalChildIDs in interface org.apache.oozie.client.WorkflowActionpublic void setExternalChildIDs(java.lang.String externalChildIDs)
externalChildIDs - as a string.public void setExternalChildIDsBlob(StringBlob externalChildIDs)
externalChildIds - public StringBlob getExternalChildIDsBlob()
public void setEndData(org.apache.oozie.client.WorkflowAction.Status status, java.lang.String signalValue)
status - action status, Action.Status#OK or
Action.Status#ERROR or Action.Status#KILLEDsignalValue - the signal value. In most cases, the value should be
OK or ERROR.public java.lang.String getJobId()
public java.lang.String getWfId()
public void setJobId(java.lang.String id)
id - jobId;public void setSlaXml(java.lang.String slaXmlStr)
public java.lang.String getSlaXml()
public void setSlaXmlBlob(StringBlob slaXml)
public StringBlob getSlaXmlBlob()
public void setStatus(org.apache.oozie.client.WorkflowAction.Status val)
val - public org.apache.oozie.client.WorkflowAction.Status getStatus()
getStatus in interface org.apache.oozie.client.WorkflowActionpublic void setStatusStr(java.lang.String statusStr)
statusStr - public java.lang.String getStatusStr()
public java.lang.String getExecutionPath()
public void setExecutionPath(java.lang.String executionPath)
executionPath - the node execution path.public java.lang.String getSignalValue()
public void setSignalValue(java.lang.String signalValue)
signalValue - the action signal value.public java.lang.String getLogToken()
public void setLogToken(java.lang.String logToken)
logToken - the job log token.public java.util.Date getLastCheckTime()
public java.sql.Timestamp getLastCheckTimestamp()
public java.sql.Timestamp getStartTimestamp()
public java.sql.Timestamp getEndTimestamp()
public java.sql.Timestamp getPendingAgeTimestamp()
public void setLastCheckTime(java.util.Date lastCheckTime)
lastCheckTime - the last check time to set.public int getPending()
public java.util.Date getStartTime()
getStartTime in interface org.apache.oozie.client.WorkflowActionpublic void setStartTime(java.util.Date startTime)
startTime - public java.util.Date getEndTime()
getEndTime in interface org.apache.oozie.client.WorkflowActionpublic void setEndTime(java.util.Date endTime)
endTime - public org.json.simple.JSONObject toJSONObject()
JsonBeantoJSONObject in interface JsonBeanpublic org.json.simple.JSONObject toJSONObject(java.lang.String timeZoneId)
JsonBeantoJSONObject in interface JsonBeantimeZoneId - the time zone to usepublic java.lang.String getId()
getId in interface org.apache.oozie.client.WorkflowActionpublic void setId(java.lang.String id)
public java.sql.Timestamp getCreatedTimestamp()
public java.util.Date getCreatedTime()
public void setCreatedTime(java.util.Date createdTime)
public java.lang.String getName()
getName in interface org.apache.oozie.client.WorkflowActionpublic void setName(java.lang.String name)
public java.lang.String getCred()
getCred in interface org.apache.oozie.client.WorkflowActionpublic void setCred(java.lang.String cred)
public java.lang.String getType()
getType in interface org.apache.oozie.client.WorkflowActionpublic void setType(java.lang.String type)
public java.lang.String getConf()
getConf in interface org.apache.oozie.client.WorkflowActionpublic void setConf(java.lang.String conf)
public void setConfBlob(StringBlob conf)
public StringBlob getConfBlob()
public int getRetries()
getRetries in interface org.apache.oozie.client.WorkflowActionpublic void setRetries(int retries)
public int getUserRetryCount()
getUserRetryCount in interface org.apache.oozie.client.WorkflowActionpublic void setUserRetryCount(int retryCount)
public void incrmentUserRetryCount()
public int getUserRetryMax()
getUserRetryMax in interface org.apache.oozie.client.WorkflowActionpublic void setUserRetryMax(int retryMax)
retryMax - public int getUserRetryInterval()
getUserRetryInterval in interface org.apache.oozie.client.WorkflowActionpublic void setUserRetryInterval(int retryInterval)
public java.lang.String getTransition()
getTransition in interface org.apache.oozie.client.WorkflowActionpublic void setTransition(java.lang.String transition)
transition - public java.lang.String getData()
getData in interface org.apache.oozie.client.WorkflowActionpublic void setData(java.lang.String data)
data - public void setDataBlob(StringBlob data)
public StringBlob getDataBlob()
public java.lang.String getStats()
getStats in interface org.apache.oozie.client.WorkflowActionpublic void setStats(java.lang.String stats)
stats - public void setStatsBlob(StringBlob stats)
public StringBlob getStatsBlob()
public java.lang.String getExternalId()
getExternalId in interface org.apache.oozie.client.WorkflowActionpublic void setExternalId(java.lang.String externalId)
externalId - public java.lang.String getExternalStatus()
getExternalStatus in interface org.apache.oozie.client.WorkflowActionpublic void setExternalStatus(java.lang.String externalStatus)
externalStatus - public java.lang.String getTrackerUri()
getTrackerUri in interface org.apache.oozie.client.WorkflowActionpublic void setTrackerUri(java.lang.String trackerUri)
trackerUri - public java.lang.String getConsoleUrl()
getConsoleUrl in interface org.apache.oozie.client.WorkflowActionpublic void setConsoleUrl(java.lang.String consoleUrl)
consoleUrl - public java.lang.String getErrorCode()
getErrorCode in interface org.apache.oozie.client.WorkflowActionpublic java.lang.String getErrorMessage()
getErrorMessage in interface org.apache.oozie.client.WorkflowActionpublic void setErrorInfo(java.lang.String errorCode, java.lang.String errorMessage)
errorCode - errorMessage - public java.lang.String toString()
toString in class java.lang.Objectpublic static org.json.simple.JSONArray toJSONArray(java.util.List<WorkflowActionBean> nodes, java.lang.String timeZoneId)
nodes - nodes list.timeZoneId - time zone to use for dates in the JSON array.Copyright © 2017 Apache Software Foundation. All Rights Reserved.