You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Satish Subhashrao Saley (JIRA)" <ji...@apache.org> on 2016/12/02 18:02:58 UTC
[jira] [Updated] (OOZIE-2422) Recovery service loads jobs which
doesn't need recovery
[ https://issues.apache.org/jira/browse/OOZIE-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Satish Subhashrao Saley updated OOZIE-2422:
-------------------------------------------
Attachment: OOZIE-2422-1.patch
> 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
> Assignee: Satish Subhashrao Saley
> Attachments: OOZIE-2422-1.patch
>
>
> {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)