[ https://issues.apache.org/jira/browse/OOZIE-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Purshotam Shah updated OOZIE-1980: ---------------------------------- Attachment: OOZIE-1980-V2.patch > Sql error should not fail coord job > ----------------------------------- > > Key: OOZIE-1980 > URL: https://issues.apache.org/jira/browse/OOZIE-1980 > Project: Oozie > Issue Type: Bug > Reporter: Purshotam Shah > Attachments: OOZIE-1980-V1.patch, OOZIE-1980-V2.patch > > > We know that sql error is transient, it should not fail the job. > We should ignore the SQL error, so that next materialization cycle can pick > the job. > {code} > protected void materialize() throws CommandException { > Instrumentation.Cron cron = new Instrumentation.Cron(); > cron.start(); > try { > materializeActions(false); > updateJobMaterializeInfo(coordJob); > } > catch (CommandException ex) { > LOG.warn("Exception occurred:" + ex.getMessage() + " Making the > job failed ", ex); > coordJob.setStatus(Job.Status.FAILED); > coordJob.resetPending(); > // remove any materialized actions and slaEvents > insertList.clear(); > } > catch (Exception e) { > LOG.error("Exception occurred:" + e.getMessage() + " Making the > job failed ", e); > coordJob.setStatus(Job.Status.FAILED); > try { > > CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQuery.UPDATE_COORD_JOB_MATERIALIZE, > coordJob); > } > catch (JPAExecutorException jex) { > throw new CommandException(ErrorCode.E1011, jex); > } > throw new CommandException(ErrorCode.E1012, e.getMessage(), e); > } finally { > cron.stop(); > instrumentation.addCron(INSTRUMENTATION_GROUP, getName() + > ".materialize", cron); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)