@Override
  public PigJob create(PigJob object) {
    object.setStatus(PigJob.PIG_JOB_STATE_SUBMITTING);
    PigJob job = super.create(object);
    LOG.debug("Submitting job...");

    try {
      submitJob(object);
    } catch (RuntimeException e) {
      object.setStatus(PigJob.PIG_JOB_STATE_SUBMIT_FAILED);
      save(object);
      LOG.debug("Job submit FAILED");
      throw e;
    }
    LOG.debug("Job submit OK");
    object.setStatus(PigJob.PIG_JOB_STATE_SUBMITTED);
    save(object);
    return job;
  }
Constructor
@param context View Context instance
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/jobs/JobResourceManager.java