@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
Action.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.WritabledataOutput - 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.WritabledataInput - 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)
public 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)
Action.Status#DONEexternalId - external ID for the action.trackerUri - tracker URI for the action.consoleUrl - console URL for the action.public void setExecutionData(String externalStatus, Properties actionData)
Action.Status#DONEexternalStatus - action external end status.actionData - action output data, null if there is no
action output data.public String getExecutionStats()
public void setExecutionStats(String jsonStats)
Json - representation of the stats.public String getExternalChildIDs()
getExternalChildIDs in interface WorkflowActionpublic void setExternalChildIDs(String externalChildIDs)
externalChildIDs - as a string.public void setExternalChildIDsBlob(StringBlob externalChildIDs)
externalChildIds - public StringBlob getExternalChildIDsBlob()
public void setEndData(WorkflowAction.Status status, 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 void setSlaXmlBlob(StringBlob slaXml)
public StringBlob getSlaXmlBlob()
public void setStatus(WorkflowAction.Status val)
val - public WorkflowAction.Status getStatus()
getStatus in interface WorkflowActionpublic void setStatusStr(String statusStr)
statusStr - public String getStatusStr()
public String getExecutionPath()
public void setExecutionPath(String executionPath)
executionPath - the node execution path.public String getSignalValue()
public void setSignalValue(String signalValue)
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 WorkflowActionpublic void setStartTime(Date startTime)
startTime - public Date getEndTime()
getEndTime in interface WorkflowActionpublic void setEndTime(Date endTime)
endTime - public org.json.simple.JSONObject toJSONObject()
JsonBeantoJSONObject in interface JsonBeanpublic org.json.simple.JSONObject toJSONObject(String timeZoneId)
JsonBeantoJSONObject in interface JsonBeantimeZoneId - the time zone to usepublic String getId()
getId in interface WorkflowActionpublic Timestamp getCreatedTimestamp()
public Date getCreatedTime()
public void setCreatedTime(Date createdTime)
public String getName()
getName in interface WorkflowActionpublic String getCred()
getCred in interface WorkflowActionpublic String getType()
getType in interface WorkflowActionpublic String getConf()
getConf in interface WorkflowActionpublic void setConfBlob(StringBlob conf)
public StringBlob getConfBlob()
public int getRetries()
getRetries in interface WorkflowActionpublic void setRetries(int retries)
public int getUserRetryCount()
getUserRetryCount in interface WorkflowActionpublic void setUserRetryCount(int retryCount)
public void incrmentUserRetryCount()
public int getUserRetryMax()
getUserRetryMax in interface WorkflowActionpublic void setUserRetryMax(int retryMax)
retryMax - public int getUserRetryInterval()
getUserRetryInterval in interface WorkflowActionpublic void setUserRetryInterval(int retryInterval)
public String getTransition()
getTransition in interface WorkflowActionpublic void setTransition(String transition)
transition - public String getData()
getData in interface WorkflowActionpublic void setDataBlob(StringBlob data)
public StringBlob getDataBlob()
public String getStats()
getStats in interface WorkflowActionpublic void setStatsBlob(StringBlob stats)
public StringBlob getStatsBlob()
public String getExternalId()
getExternalId in interface WorkflowActionpublic void setExternalId(String externalId)
externalId - public String getExternalStatus()
getExternalStatus in interface WorkflowActionpublic void setExternalStatus(String externalStatus)
externalStatus - public String getTrackerUri()
getTrackerUri in interface WorkflowActionpublic void setTrackerUri(String trackerUri)
trackerUri - public String getConsoleUrl()
getConsoleUrl in interface WorkflowActionpublic void setConsoleUrl(String consoleUrl)
consoleUrl - public String getErrorCode()
getErrorCode in interface WorkflowActionpublic String getErrorMessage()
getErrorMessage in interface WorkflowActionpublic void setErrorInfo(String errorCode, String errorMessage)
errorCode - errorMessage - public 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 © 2015 Apache Software Foundation. All Rights Reserved.