@Entity public class WorkflowActionBean extends Object implements org.apache.hadoop.io.Writable, WorkflowAction, JsonBean
WorkflowAction.Status
Constructor and Description |
---|
WorkflowActionBean()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getConf() |
StringBlob |
getConfBlob() |
String |
getConsoleUrl() |
Date |
getCreatedTime() |
Timestamp |
getCreatedTimestamp() |
String |
getCred() |
String |
getData() |
StringBlob |
getDataBlob() |
Date |
getEndTime() |
Timestamp |
getEndTimestamp()
Return the action last check time
|
String |
getErrorCode() |
String |
getErrorMessage() |
String |
getExecutionPath()
Return the node execution path.
|
String |
getExecutionStats()
Return the action statistics info.
|
String |
getExternalChildIDs()
Return the external child IDs.
|
StringBlob |
getExternalChildIDsBlob()
Get external ChildIds
|
String |
getExternalId() |
String |
getExternalStatus() |
String |
getId() |
String |
getJobId()
Return the job Id.
|
Date |
getLastCheckTime()
Return the action last check time
|
Timestamp |
getLastCheckTimestamp()
Return the action last check time
|
String |
getLogToken()
Return the job log token.
|
String |
getName() |
int |
getPending() |
Date |
getPendingAge()
Return the pending age of the action.
|
Timestamp |
getPendingAgeTimestamp()
Return the action last check time
|
int |
getRetries() |
String |
getSignalValue()
Return the signal value for the action.
|
String |
getSlaXml() |
StringBlob |
getSlaXmlBlob() |
Date |
getStartTime() |
Timestamp |
getStartTimestamp()
Return the action last check time
|
String |
getStats() |
StringBlob |
getStatsBlob() |
WorkflowAction.Status |
getStatus() |
String |
getStatusStr()
Get status
|
String |
getTrackerUri() |
String |
getTransition() |
String |
getType() |
int |
getUserRetryCount() |
int |
getUserRetryInterval() |
int |
getUserRetryMax() |
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(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(String conf) |
void |
setConfBlob(StringBlob conf) |
void |
setConsoleUrl(String consoleUrl)
Set console URL
|
void |
setCreatedTime(Date createdTime) |
void |
setCred(String cred) |
void |
setData(String data)
Set data
|
void |
setDataBlob(StringBlob data) |
void |
setEndData(WorkflowAction.Status status,
String signalValue)
Set the completion information for an action end.
|
void |
setEndTime(Date endTime)
Set end time
|
void |
setErrorInfo(String errorCode,
String errorMessage)
Set the error Info
|
void |
setExecutionData(String externalStatus,
Properties actionData)
Set the completion information for an action start.
|
void |
setExecutionPath(String executionPath)
Set the node execution path.
|
void |
setExecutionStats(String jsonStats)
Set the action statistics info for the workflow action.
|
void |
setExternalChildIDs(String externalChildIDs)
Set the external child IDs for the workflow action.
|
void |
setExternalChildIDsBlob(StringBlob externalChildIDs)
Set external child ids
|
void |
setExternalId(String externalId)
Set external Id
|
void |
setExternalStatus(String externalStatus)
Set external status
|
void |
setId(String id) |
void |
setJobId(String id)
Set the job id.
|
void |
setLastCheckTime(Date lastCheckTime)
Sets the action last check time
|
void |
setLogToken(String logToken)
Set the job log token.
|
void |
setName(String name) |
void |
setPending()
Set the action as pending and the current time as pending.
|
void |
setPending(int i)
Set pending flag
|
void |
setPendingAge(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(String signalValue)
Set the signal value for the action.
|
void |
setSlaXml(String slaXmlStr) |
void |
setSlaXmlBlob(StringBlob slaXml) |
void |
setStartData(String externalId,
String trackerUri,
String consoleUrl)
Set a tracking information for an action, and set the action status to
WorkflowAction.Status.DONE |
void |
setStartTime(Date startTime)
Set start time
|
void |
setStats(String stats)
Set stats
|
void |
setStatsBlob(StringBlob stats) |
void |
setStatus(WorkflowAction.Status val)
Set status of job
|
void |
setStatusStr(String statusStr)
Set status
|
void |
setTrackerUri(String trackerUri)
Set tracker uri
|
void |
setTransition(String transition)
Set transition
|
void |
setType(String type) |
void |
setUserRetryCount(int retryCount) |
void |
setUserRetryInterval(int retryInterval) |
void |
setUserRetryMax(int retryMax)
Set user retry max
|
static org.json.simple.JSONArray |
toJSONArray(List<WorkflowActionBean> nodes,
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(String timeZoneId)
Return the JSONObject for the bean with the given time zone.
|
String |
toString() |
void |
write(DataOutput dataOutput)
Serialize the action bean to a data output.
|
public WorkflowActionBean()
public void write(DataOutput dataOutput) throws IOException
write
in interface org.apache.hadoop.io.Writable
dataOutput
- data output.IOException
- thrown if the action bean could not be serialized.public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
dataInput
- data input.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)
i
- the flagpublic void setPendingAge(Date pendingAge)
pendingAge
- the time when the action will be pending.public Date getPendingAge()
null
if the action is
not pending.public boolean isPending()
public void resetPending()
public void resetPendingOnly()
public void incRetries()
public void setStartData(String externalId, String trackerUri, String consoleUrl)
WorkflowAction.Status.DONE
externalId
- external ID for the action.trackerUri
- tracker URI for the action.consoleUrl
- console URL for the action.public void setExecutionData(String externalStatus, Properties actionData)
WorkflowAction.Status.DONE
externalStatus
- action external end status.actionData
- action output data, null
if there is no
action output data.public String getExecutionStats()
public void setExecutionStats(String jsonStats)
jsonStats
- representation of the stats.public String getExternalChildIDs()
getExternalChildIDs
in interface WorkflowAction
public void setExternalChildIDs(String externalChildIDs)
externalChildIDs
- as a string.public void setExternalChildIDsBlob(StringBlob externalChildIDs)
externalChildIDs
- the external child idspublic StringBlob getExternalChildIDsBlob()
public void setEndData(WorkflowAction.Status status, String signalValue)
status
- action status, WorkflowAction.Status.OK
or
WorkflowAction.Status.ERROR
or
WorkflowAction.Status.KILLED
signalValue
- the signal value. In most cases, the value should be
OK or ERROR.public void setSlaXmlBlob(StringBlob slaXml)
public StringBlob getSlaXmlBlob()
public void setStatus(WorkflowAction.Status val)
val
- the statuspublic WorkflowAction.Status getStatus()
getStatus
in interface WorkflowAction
public void setStatusStr(String statusStr)
statusStr
- the statuspublic String getStatusStr()
public String getExecutionPath()
public void setExecutionPath(String executionPath)
executionPath
- the node execution path.public String getSignalValue()
For decision nodes it is the choosen transition, for actions it is OK or ERROR.
public void setSignalValue(String signalValue)
For decision nodes it is the choosen transition, for actions it is OK or ERROR.
signalValue
- the action signal value.public String getLogToken()
public void setLogToken(String logToken)
logToken
- the job log token.public Date getLastCheckTime()
public Timestamp getLastCheckTimestamp()
public Timestamp getStartTimestamp()
public Timestamp getEndTimestamp()
public Timestamp getPendingAgeTimestamp()
public void setLastCheckTime(Date lastCheckTime)
lastCheckTime
- the last check time to set.public int getPending()
public Date getStartTime()
getStartTime
in interface WorkflowAction
public void setStartTime(Date startTime)
startTime
- the start timepublic Date getEndTime()
getEndTime
in interface WorkflowAction
public void setEndTime(Date endTime)
endTime
- the end timepublic org.json.simple.JSONObject toJSONObject()
JsonBean
toJSONObject
in interface JsonBean
public org.json.simple.JSONObject toJSONObject(String timeZoneId)
JsonBean
toJSONObject
in interface JsonBean
timeZoneId
- the time zone to usepublic String getId()
getId
in interface WorkflowAction
public Timestamp getCreatedTimestamp()
public Date getCreatedTime()
public void setCreatedTime(Date createdTime)
public String getName()
getName
in interface WorkflowAction
public String getCred()
getCred
in interface WorkflowAction
public String getType()
getType
in interface WorkflowAction
public String getConf()
getConf
in interface WorkflowAction
public void setConfBlob(StringBlob conf)
public StringBlob getConfBlob()
public int getRetries()
getRetries
in interface WorkflowAction
public void setRetries(int retries)
public int getUserRetryCount()
getUserRetryCount
in interface WorkflowAction
public void setUserRetryCount(int retryCount)
public void incrmentUserRetryCount()
public int getUserRetryMax()
getUserRetryMax
in interface WorkflowAction
public void setUserRetryMax(int retryMax)
retryMax
- the maximum retry countpublic int getUserRetryInterval()
getUserRetryInterval
in interface WorkflowAction
public void setUserRetryInterval(int retryInterval)
public String getTransition()
getTransition
in interface WorkflowAction
public void setTransition(String transition)
transition
- the transitionpublic String getData()
getData
in interface WorkflowAction
public void setDataBlob(StringBlob data)
public StringBlob getDataBlob()
public String getStats()
getStats
in interface WorkflowAction
public void setStatsBlob(StringBlob stats)
public StringBlob getStatsBlob()
public String getExternalId()
getExternalId
in interface WorkflowAction
public void setExternalId(String externalId)
externalId
- the idpublic String getExternalStatus()
getExternalStatus
in interface WorkflowAction
public void setExternalStatus(String externalStatus)
externalStatus
- the external statuspublic String getTrackerUri()
getTrackerUri
in interface WorkflowAction
public void setTrackerUri(String trackerUri)
trackerUri
- the URIpublic String getConsoleUrl()
getConsoleUrl
in interface WorkflowAction
public void setConsoleUrl(String consoleUrl)
consoleUrl
- the URLpublic String getErrorCode()
getErrorCode
in interface WorkflowAction
public String getErrorMessage()
getErrorMessage
in interface WorkflowAction
public void setErrorInfo(String errorCode, String errorMessage)
errorCode
- the error codeerrorMessage
- the error messagepublic static org.json.simple.JSONArray toJSONArray(List<WorkflowActionBean> nodes, String timeZoneId)
nodes
- nodes list.timeZoneId
- time zone to use for dates in the JSON array.Copyright © 2018 Apache Software Foundation. All rights reserved.