|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.store.Store org.apache.oozie.store.WorkflowStore
public class WorkflowStore
DB Implementation of Workflow Store
Field Summary | |
---|---|
static int |
LOCK_TIMEOUT
|
Constructor Summary | |
---|---|
WorkflowStore()
|
|
WorkflowStore(boolean selectForUpdate)
|
|
WorkflowStore(Connection connection,
boolean selectForUpdate)
|
|
WorkflowStore(Connection connection,
Store store,
boolean selectForUpdate)
|
|
WorkflowStore(Store store,
boolean selectForUpdate)
|
Method Summary | |
---|---|
void |
deleteAction(String id)
Delete the Action with given id. |
WorkflowActionBean |
getAction(String id,
boolean locking)
Load the action data and returns a bean. |
List<WorkflowActionBean> |
getActionsForWorkflow(String wfId,
boolean locking)
Loads all the actions for the given Workflow. |
List<WorkflowActionBean> |
getActionsSubsetForWorkflow(String wfId,
int start,
int len)
Loads given number of actions for the given Workflow. |
List<WorkflowActionBean> |
getPendingActions(long minimumPendingAgeSecs)
Load All the actions that are pending for more than given time. |
List<WorkflowActionBean> |
getRetryAndManualActions(String wfId)
Load All the actions that are START_RETRY or START_MANUAL or END_RETRY or END_MANUAL. |
List<WorkflowActionBean> |
getRunningActions(long checkAgeSecs)
Load All the actions that are running and were last checked after now - miminumCheckAgeSecs |
WorkflowJobBean |
getWorkflow(String id,
boolean locking)
Load the Workflow into a Bean and return it. |
int |
getWorkflowCountWithStatus(String status)
Get the number of Workflows with the given status. |
int |
getWorkflowCountWithStatusInLastNSeconds(String status,
int secs)
Get the number of Workflows with the given status which was modified in given time limit. |
String |
getWorkflowIdForExternalId(String externalId)
Get the Workflow ID with given external ID which will be assigned for the subworkflows. |
WorkflowJobBean |
getWorkflowInfo(String id)
Load the Workflow and all Action details and return a WorkflowJobBean. |
WorkflowJobBean |
getWorkflowInfoWithActionsSubset(String id,
int start,
int len)
Load the Workflow and subset Actions details and return a WorkflowJobBean. |
WorkflowsInfo |
getWorkflowsInfo(Map<String,List<String>> filter,
int start,
int len)
Loads all the jobs that are satisfying the given filter condition. |
void |
insertAction(WorkflowActionBean action)
Create a new Action record in the ACTIONS table with the given Bean. |
void |
insertWorkflow(WorkflowJobBean workflow)
Create a Workflow and return a WorkflowJobBean. |
void |
purge(long olderThanDays,
int limit)
Purge the Workflows Completed older than given days. |
void |
updateAction(WorkflowActionBean action)
Update the given action bean to DB. |
void |
updateWorkflow(WorkflowJobBean wfBean)
Update the data from Workflow Bean to DB along with the workflow instance data. |
Methods inherited from class org.apache.oozie.store.Store |
---|
beginTrx, closeTrx, commitTrx, contains, getConnection, getEntityManager, getFlushMode, isActive, isClosed, isDetached, rollbackTrx |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOCK_TIMEOUT
Constructor Detail |
---|
public WorkflowStore()
public WorkflowStore(Connection connection, boolean selectForUpdate) throws StoreException
StoreException
public WorkflowStore(Connection connection, Store store, boolean selectForUpdate) throws StoreException
StoreException
public WorkflowStore(boolean selectForUpdate) throws StoreException
StoreException
public WorkflowStore(Store store, boolean selectForUpdate) throws StoreException
StoreException
Method Detail |
---|
public void insertWorkflow(WorkflowJobBean workflow) throws StoreException
workflow
- workflow bean
StoreException
public WorkflowJobBean getWorkflow(String id, boolean locking) throws StoreException
id
- Workflow IDlocking
- true if Workflow is to be locked
StoreException
public int getWorkflowCountWithStatus(String status) throws StoreException
status
- Workflow Status.
StoreException
public int getWorkflowCountWithStatusInLastNSeconds(String status, int secs) throws StoreException
status
- Workflow Status.secs
- No. of seconds within which the workflow got modified.
StoreException
public void updateWorkflow(WorkflowJobBean wfBean) throws StoreException
wfBean
- Workflow Bean
StoreException
- If Workflow doesn't existpublic void insertAction(WorkflowActionBean action) throws StoreException
action
- WorkflowActionBean
StoreException
- If the action is already presentpublic WorkflowActionBean getAction(String id, boolean locking) throws StoreException
id
- Action Idlocking
- true if the action is to be locked
StoreException
- If action doesn't existpublic void updateAction(WorkflowActionBean action) throws StoreException
action
- Action Bean
StoreException
- if action doesn't existpublic void deleteAction(String id) throws StoreException
id
- Action ID
StoreException
- if Action doesn't existpublic List<WorkflowActionBean> getActionsForWorkflow(String wfId, boolean locking) throws StoreException
wfId
- Workflow IDlocking
- true if Actions are to be locked
StoreException
public List<WorkflowActionBean> getActionsSubsetForWorkflow(String wfId, int start, int len) throws StoreException
wfId
- Workflow IDstart
- offset for select statementlen
- number of Workflow Actions to be returnedlocking
- true if Actions are to be locked
StoreException
public List<WorkflowActionBean> getPendingActions(long minimumPendingAgeSecs) throws StoreException
minimumPendingAgeSecs
- Minimum Pending age in seconds
StoreException
public List<WorkflowActionBean> getRunningActions(long checkAgeSecs) throws StoreException
checkAgeSecs
- check age in seconds.
StoreException
public List<WorkflowActionBean> getRetryAndManualActions(String wfId) throws StoreException
wfId
- String
StoreException
public WorkflowsInfo getWorkflowsInfo(Map<String,List<String>> filter, int start, int len) throws StoreException
filter
- Filter conditionstart
- offset for select statementlen
- number of Workflows to be returned
StoreException
public WorkflowJobBean getWorkflowInfo(String id) throws StoreException
id
- Workflow Id
StoreException
- If Workflow doesn't existpublic WorkflowJobBean getWorkflowInfoWithActionsSubset(String id, int start, int len) throws StoreException
id
- Workflow Idstart
- offset for select statement for actionslen
- number of Workflow Actions to be returned
StoreException
- If Workflow doesn't existpublic String getWorkflowIdForExternalId(String externalId) throws StoreException
externalId
- external ID
StoreException
- if there is no job with external IDpublic void purge(long olderThanDays, int limit) throws StoreException
olderThanDays
- number of days for which to preserve the workflows
StoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |