[
https://issues.apache.org/jira/browse/OOZIE-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purshotam Shah updated OOZIE-2422:
----------------------------------
Description:
{code}
@NamedQuery(name = "GET_COORD_ACTIONS_FOR_RECOVERY_OLDER_THAN", query =
"select a.id, a.jobId, a.statusStr, a.externalId, a.pending from
CoordinatorActionBean a where a.pending > 0 AND (a.statusStr = 'SUSPENDED' OR
a.statusStr = 'KILLED' OR a.statusStr = 'RUNNING') AND a.lastModifiedTimestamp
<= :lastModifiedTime"),
{code}
Recovery service use above sql to recover killed/suspended/running action and
in code it checks for external id. Checking of externalId can be done in sql
itself.
{code}
else if (caction.getStatus() == CoordinatorActionBean.Status.SUSPENDED) {
if (caction.getExternalId() != null &&
caction.getPending() > 1) {
queueCallable(new
SuspendXCommand(caction.getExternalId()));
log.debug("Recover a SUSPENDED coord action and
resubmit SuspendXCommand :"
+ caction.getId());
}
}
else if (caction.getStatus() ==
CoordinatorActionBean.Status.KILLED) {
if (caction.getExternalId() != null) {
queueCallable(new
KillXCommand(caction.getExternalId()));
log.debug("Recover a KILLED coord action and
resubmit KillXCommand :" + caction.getId());
}
}
else if (caction.getStatus() ==
CoordinatorActionBean.Status.RUNNING) {
if (caction.getExternalId() != null) {
queueCallable(new
ResumeXCommand(caction.getExternalId()));
log.debug("Recover a RUNNING coord action and
resubmit ResumeXCommand :" + caction.getId());
}
}
{code}
> Recovery service loads jobs which doesn't need recovery
> -------------------------------------------------------
>
> Key: OOZIE-2422
> URL: https://issues.apache.org/jira/browse/OOZIE-2422
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
>
> {code}
> @NamedQuery(name = "GET_COORD_ACTIONS_FOR_RECOVERY_OLDER_THAN", query
> = "select a.id, a.jobId, a.statusStr, a.externalId, a.pending from
> CoordinatorActionBean a where a.pending > 0 AND (a.statusStr = 'SUSPENDED' OR
> a.statusStr = 'KILLED' OR a.statusStr = 'RUNNING') AND
> a.lastModifiedTimestamp <= :lastModifiedTime"),
> {code}
> Recovery service use above sql to recover killed/suspended/running action and
> in code it checks for external id. Checking of externalId can be done in sql
> itself.
> {code}
> else if (caction.getStatus() == CoordinatorActionBean.Status.SUSPENDED) {
> if (caction.getExternalId() != null &&
> caction.getPending() > 1) {
> queueCallable(new
> SuspendXCommand(caction.getExternalId()));
> log.debug("Recover a SUSPENDED coord action
> and resubmit SuspendXCommand :"
> + caction.getId());
> }
> }
> else if (caction.getStatus() ==
> CoordinatorActionBean.Status.KILLED) {
> if (caction.getExternalId() != null) {
> queueCallable(new
> KillXCommand(caction.getExternalId()));
> log.debug("Recover a KILLED coord action and
> resubmit KillXCommand :" + caction.getId());
> }
> }
> else if (caction.getStatus() ==
> CoordinatorActionBean.Status.RUNNING) {
> if (caction.getExternalId() != null) {
> queueCallable(new
> ResumeXCommand(caction.getExternalId()));
> log.debug("Recover a RUNNING coord action and
> resubmit ResumeXCommand :" + caction.getId());
> }
> }
>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)