|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oozie.store.Store
org.apache.oozie.store.CoordinatorStore
public class CoordinatorStore
DB Implementation of Coord Store
Field Summary | |
---|---|
static int |
LOCK_TIMEOUT
|
Constructor Summary | |
---|---|
CoordinatorStore(boolean selectForUpdate)
|
|
CoordinatorStore(Store store,
boolean selectForUpdate)
|
Method Summary | |
---|---|
void |
close()
|
void |
commit()
|
CoordinatorActionBean |
getAction(String id,
boolean b)
|
List<CoordinatorActionBean> |
getActionsForCoordinatorJob(String jobId,
boolean locking)
Loads all actions for the given Coordinator job. |
List<CoordinatorActionBean> |
getActionsSubsetForCoordinatorJob(String jobId,
int start,
int len)
Loads given number of actions for the given Coordinator job. |
protected CoordinatorActionBean |
getBeanForRunningCoordAction(CoordinatorActionBean a)
|
CoordinatorActionBean |
getCoordActionForNominalTime(String jobId,
Date nominalTime)
Get coordinator action bean for given date |
List<CoordinatorActionBean> |
getCoordActionsForDates(String jobId,
Date startDate,
Date endDate)
Get coordinator action beans for given start date and end date |
CoordinatorActionBean |
getCoordinatorAction(String id,
boolean locking)
Load the CoordinatorAction into a Bean and return it. |
CoordinatorActionBean |
getCoordinatorActionForExternalId(String externalId)
|
List<CoordinatorActionBean> |
getCoordinatorActionsForJob(String id,
int numResults,
String executionOrder)
Return CoordinatorActions for a jobID. |
CoordinatorJobInfo |
getCoordinatorInfo(Map<String,List<String>> filter,
int start,
int len)
|
CoordinatorJobBean |
getCoordinatorJob(String id,
boolean locking)
Load the CoordinatorJob into a Bean and return it. |
CoordinatorJobBean |
getCoordinatorJobs(String id)
|
List<CoordinatorJobBean> |
getCoordinatorJobsOlderThanStatus(long checkAgeSecs,
String status,
int limit,
boolean locking)
A list of Coordinator Jobs that are matched with the status and have last materialized time' older than checkAgeSecs will be returned. |
List<CoordinatorJobBean> |
getCoordinatorJobsToBeMaterialized(Date d,
int limit)
Get a list of Coordinator Jobs that should be materialized. |
int |
getCoordinatorRunningActionsCount(String id)
Return CoordinatorActions for a jobID. |
List<String> |
getRecoveryActionsGroupByJobId(long checkAgeSecs)
|
List<CoordinatorActionBean> |
getRecoveryActionsOlderThan(long checkAgeSecs,
boolean locking)
|
List<CoordinatorActionBean> |
getRunningActionsForCoordinatorJob(String jobId,
boolean locking)
|
List<CoordinatorActionBean> |
getRunningActionsOlderThan(long checkAgeSecs,
boolean locking)
|
void |
insertCoordinatorAction(CoordinatorActionBean action)
Create a new Action record in the ACTIONS table with the given Bean. |
void |
insertCoordinatorJob(CoordinatorJobBean coordinatorJob)
Create a CoordJobBean. |
int |
purgeActions(long olderThanDays,
long limit)
|
int |
purgeJobs(long olderThanDays,
long limit)
|
void |
updateCoordActionMin(CoordinatorActionBean action)
Update the given action bean to DB. |
void |
updateCoordinatorAction(CoordinatorActionBean action)
Update the given action bean to DB. |
void |
updateCoordinatorJob(CoordinatorJobBean job)
Update the given coordinator job bean to DB. |
void |
updateCoordinatorJobStatus(CoordinatorJobBean job)
|
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 CoordinatorStore(boolean selectForUpdate) throws StoreException
StoreException
public CoordinatorStore(Store store, boolean selectForUpdate) throws StoreException
StoreException
Method Detail |
---|
public void insertCoordinatorJob(CoordinatorJobBean coordinatorJob) throws StoreException
workflow
- workflow bean
StoreException
public CoordinatorJobBean getCoordinatorJob(String id, boolean locking) throws StoreException
id
- Job IDlocking
- Flag for Table Lock
StoreException
public List<CoordinatorJobBean> getCoordinatorJobsToBeMaterialized(Date d, int limit) throws StoreException
d
- Date
StoreException
public List<CoordinatorJobBean> getCoordinatorJobsOlderThanStatus(long checkAgeSecs, String status, int limit, boolean locking) throws StoreException
checkAgeSecs
- Job age in Secondsstatus
- Coordinator Job Statuslimit
- Number of results to returnlocking
- Flag for Table Lock
StoreException
public CoordinatorActionBean getCoordinatorAction(String id, boolean locking) throws StoreException
id
- action ID
StoreException
public List<CoordinatorActionBean> getCoordinatorActionsForJob(String id, int numResults, String executionOrder) throws StoreException
id
- job IDnumResults
- number of results to returnexecutionOrder
- execution for this job - FIFO, LIFO, LAST_ONLY
StoreException
public int getCoordinatorRunningActionsCount(String id) throws StoreException
id
- job ID
StoreException
public void insertCoordinatorAction(CoordinatorActionBean action) throws StoreException
action
- WorkflowActionBean
StoreException
- If the action is already presentpublic void updateCoordinatorAction(CoordinatorActionBean action) throws StoreException
action
- Action Bean
StoreException
- if action doesn't existpublic void updateCoordActionMin(CoordinatorActionBean action) throws StoreException
action
- Action Bean
StoreException
- if action doesn't existpublic void updateCoordinatorJob(CoordinatorJobBean job) throws StoreException
jobbean
- Coordinator Job Bean
StoreException
- if action doesn't existpublic void updateCoordinatorJobStatus(CoordinatorJobBean job) throws StoreException
StoreException
public int purgeActions(long olderThanDays, long limit) throws StoreException
StoreException
public int purgeJobs(long olderThanDays, long limit) throws StoreException
StoreException
public void commit() throws StoreException
StoreException
public void close() throws StoreException
StoreException
public CoordinatorJobBean getCoordinatorJobs(String id)
public CoordinatorJobInfo getCoordinatorInfo(Map<String,List<String>> filter, int start, int len) throws StoreException
StoreException
public List<CoordinatorActionBean> getActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
jobId
- coordinator job idlocking
- true if Actions are to be locked
StoreException
public List<CoordinatorActionBean> getActionsSubsetForCoordinatorJob(String jobId, int start, int len) throws StoreException
jobId
- coordinator job idstart
- offset for select statementlen
- number of Workflow Actions to be returned
StoreException
protected CoordinatorActionBean getBeanForRunningCoordAction(CoordinatorActionBean a)
public CoordinatorActionBean getAction(String id, boolean b)
public CoordinatorActionBean getCoordinatorActionForExternalId(String externalId) throws StoreException
StoreException
public List<CoordinatorActionBean> getRunningActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getRunningActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getRecoveryActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getCoordActionsForDates(String jobId, Date startDate, Date endDate) throws StoreException
startDate
- endDate
-
StoreException
public CoordinatorActionBean getCoordActionForNominalTime(String jobId, Date nominalTime) throws StoreException
nominalTime
-
StoreException
public List<String> getRecoveryActionsGroupByJobId(long checkAgeSecs) throws StoreException
StoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |