public Map<String, String> getInfo() { if (job != null) { Map<String, String> status = new HashMap<String, String>(); if (null != job.getJobID()) { status.put(ExecutableConstants.MR_JOB_ID, job.getJobID().toString()); } if (null != job.getTrackingURL()) { status.put(ExecutableConstants.YARN_APP_URL, job.getTrackingURL().toString()); } return status; } else { return Collections.emptyMap(); } }
public Map<String, String> getInfo() throws JobException { if (job != null) { Map<String, String> status = new HashMap<String, String>(); if (null != job.getJobID()) { status.put(JobInstance.MR_JOB_ID, job.getJobID().toString()); } if (null != job.getTrackingURL()) { status.put(JobInstance.YARN_APP_URL, job.getTrackingURL().toString()); } return status; } else { throw new JobException("Job is null"); } }
private void submitAndWait(Job job) throws ClassNotFoundException, IOException, InterruptedException { job.submit(); MRCompactor.addRunningHadoopJob(this.dataset, job); LOG.info(String.format("MR job submitted for dataset %s, input %s, url: %s", this.dataset, getInputPaths(), job.getTrackingURL())); while (!job.isComplete()) { if (this.policy == Policy.ABORT_ASAP) { LOG.info(String.format( "MR job for dataset %s, input %s killed due to input data incompleteness." + " Will try again later", this.dataset, getInputPaths())); job.killJob(); return; } Thread.sleep(MR_JOB_CHECK_COMPLETE_INTERVAL_MS); } if (!job.isSuccessful()) { throw new RuntimeException(String.format("MR job failed for topic %s, input %s, url: %s", this.dataset, getInputPaths(), job.getTrackingURL())); } }
@Override public void run() { try { Job job = createJob(); if (job == null) { log.info("No MR job created. Skipping."); this.workingState = WorkUnitState.WorkingState.SUCCESSFUL; this.eventSubmitter.submit(Events.MR_JOB_SKIPPED); onSkippedMRJob(); return; } job.submit(); log.info("MR tracking URL {} for job {}", job.getTrackingURL(), job.getJobName()); this.eventSubmitter.submit(Events.MR_JOB_STARTED_EVENT, Events.JOB_URL, job.getTrackingURL()); job.waitForCompletion(false); this.mrJob = job; if (job.isSuccessful()) { this.eventSubmitter.submit(Events.MR_JOB_SUCCESSFUL, Events.JOB_URL, job.getTrackingURL()); this.onMRTaskComplete(true, null); } else { this.eventSubmitter.submit(Events.MR_JOB_FAILED, Events.JOB_URL, job.getTrackingURL()); this.onMRTaskComplete (false, new IOException(String.format("MR Job:%s is not successful", job.getTrackingURL()))); } } catch (Throwable t) { log.error("Failed to run MR job.", t); this.eventSubmitter.submit(Events.MR_JOB_FAILED, Events.FAILURE_CONTEXT, t.getMessage()); this.onMRTaskComplete (false, t); } }
log.info("Job %s submitted, status available at %s", job.getJobName(), job.getTrackingURL());
try { job.submit(); log.info("Job %s submitted, status available at %s", job.getJobName(), job.getTrackingURL()); final boolean success = job.waitForCompletion(true); if (!success) {
log.info("Job %s submitted, status available at: %s", groupByJob.getJobName(), groupByJob.getTrackingURL()); "Job %s submitted, status available at: %s", dimSelectionJob.getJobName(), dimSelectionJob.getTrackingURL() );
log.info("Job %s submitted, status available at: %s", groupByJob.getJobName(), groupByJob.getTrackingURL());
jobState.setProp(ConfigurationKeys.JOB_TRACKING_URL_KEY, this.job.getTrackingURL());
public Map<String, String> getInfo() { if (job != null) { Map<String, String> status = new HashMap<String, String>(); if (null != job.getJobID()) { status.put(ExecutableConstants.MR_JOB_ID, job.getJobID().toString()); } if (null != job.getTrackingURL()) { status.put(ExecutableConstants.YARN_APP_URL, job.getTrackingURL().toString()); } return status; } else { return Collections.emptyMap(); } }
protected void submitMrJob() throws IOException, InterruptedException, ClassNotFoundException { job.submit(); runningJobs.add(job); log.info("job running for: " + job.getJobName() + ", url: " + job.getTrackingURL()); job.waitForCompletion(false); if (!job.isSuccessful()) { throw new RuntimeException("hadoop job failed."); } }
public Map<String, String> getInfo() throws JobException { if (job != null) { Map<String, String> status = new HashMap<String, String>(); if (null != job.getJobID()) { status.put(JobInstance.MR_JOB_ID, job.getJobID().toString()); } if (null != job.getTrackingURL()) { status.put(JobInstance.YARN_APP_URL, job.getTrackingURL().toString()); } return status; } else { throw new JobException("Job is null"); } }
@Override protected void submitMrJob() throws IOException, InterruptedException, ClassNotFoundException { job.submit(); runningJobs.add(job); CamusSingleFolderSweeper.this.metrics.recordMrStartRunningTimeByTopic(this.topicAndHour, System.currentTimeMillis()); LOG.info("job running for: " + props.getProperty(TOPIC_AND_HOUR) + ", url: " + job.getTrackingURL()); job.waitForCompletion(false); CamusSingleFolderSweeper.this.metrics.recordMrFinishTimeByTopic(this.topicAndHour, System.currentTimeMillis()); if (!job.isSuccessful()) { throw new RuntimeException("hadoop job failed."); } } }
/** * A URL where the job's status can be seen */ public String getTrackingURL() { return job.getTrackingURL(); }
/** * A URL where the job's status can be seen */ public String getTrackingURL() { return job.getTrackingURL(); }
/** * A URL where the job's status can be seen */ public String getTrackingURL() { return job.getTrackingURL(); }
/** * A URL where the job's status can be seen */ public String getTrackingURL() { return job.getTrackingURL(); }
/** * @deprecated see {@link #getProcessStatusURL()} */ @Deprecated public String getStatusURL() { Job runningJob = getJob( getJobStatusClient() ); if( runningJob == null ) return null; return runningJob.getTrackingURL(); }
/** * @deprecated see {@link #getProcessStatusURL()} */ @Deprecated public String getStatusURL() { Job runningJob = getJob( getJobStatusClient() ); if( runningJob == null ) return null; return runningJob.getTrackingURL(); }
@Override protected synchronized void submit() { super.submit(); if (this.state == State.RUNNING) { log.info("Running job \"" + getJobName() + "\""); log.info("Job status available at: " + job.getTrackingURL()); } else { log.info("Error occurred starting job \"" + getJobName() + "\":"); log.info(getMessage()); } } }