List of usage examples for org.apache.hadoop.mapred JobContext getJobID
public JobID getJobID();
From source file:com.asakusafw.runtime.stage.output.LegacyBridgeOutputCommitter.java
License:Apache License
private org.apache.hadoop.mapreduce.TaskAttemptContext toTaskAttemptContext(JobContext jobContext) { assert jobContext != null; // NOTE: Only in Hadoop 2.x, JobContext can be instance of TaskAttemptContext. if (TaskAttemptContext.class.isInstance(jobContext)) { return TaskAttemptContext.class.cast(jobContext); }//from w w w.jav a2 s .com Progressable progressable = jobContext.getProgressible(); if (progressable == null) { LOG.warn(MessageFormat.format("JobContext has no progressable object: {0}", jobContext.getClass().getName())); } if (LOG.isDebugEnabled()) { LOG.debug(MessageFormat.format("Progressable object is found (jobId={0}, object={1})", //$NON-NLS-1$ jobContext.getJobID(), progressable)); } TaskAttemptID id = JobCompatibility.newTaskAttemptId(JobCompatibility.newTaskId(jobContext.getJobID())); return JobCompatibility.newTaskAttemptContext(jobContext.getConfiguration(), id, progressable); }
From source file:com.asakusafw.runtime.stage.output.LegacyBridgeOutputCommitter.java
License:Apache License
private void logJob(JobContext jobContext) { if (LOG.isInfoEnabled()) { LOG.info(MessageFormat.format("Old-style output committer is used in the job: {0} ({1})", jobContext.getJobName(), jobContext.getJobID())); }/* w w w . j a v a2s .c om*/ }
From source file:org.apache.hive.hcatalog.mapreduce.HCatMapRedUtil.java
License:Apache License
public static org.apache.hadoop.mapred.JobContext createJobContext( org.apache.hadoop.mapreduce.JobContext context) { return createJobContext((JobConf) context.getConfiguration(), context.getJobID(), Reporter.NULL); }