Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1980

Sql error should not fail coord job

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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.

      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);
              }
          }
      
      

        Attachments

        1. OOZIE-1980-V1.patch
          13 kB
          Purshotam Shah
        2. OOZIE-1980-V2.patch
          13 kB
          Purshotam Shah
        3. OOZIE-1980-V3.patch
          20 kB
          Purshotam Shah
        4. OOZIE-1980-V4.patch
          20 kB
          Purshotam Shah

          Issue Links

            Activity

              People

              • Assignee:
                puru Purshotam Shah
                Reporter:
                puru Purshotam Shah
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: