List of usage examples for org.apache.hadoop.mapred.jobcontrol Job getAssignedJobID
public JobID getAssignedJobID()
From source file:org.apache.pig.tools.pigstats.mapreduce.MRPigStatsUtil.java
License:Apache License
@Private public static void setBackendException(Job job, Exception e) { JobID jobId = job.getAssignedJobID(); if (jobId == null) { return;/*from www . j av a 2 s.c om*/ } PigStats.get().setBackendException(jobId.toString(), e); }
From source file:org.apache.pig.tools.pigstats.mapreduce.SimplePigStats.java
License:Apache License
MRJobStats addMRJobStats(Job job) { MapReduceOper mro = jobMroMap.get(job); if (mro == null) { LOG.warn("unable to get MR oper for job: " + job.toString()); return null; }/* w w w .ja v a2 s . c om*/ MRJobStats js = mroJobMap.get(mro); JobID jobId = job.getAssignedJobID(); js.setId(jobId); js.setAlias(mro); js.setConf(job.getJobConf()); return js; }
From source file:org.apache.pig.tools.pigstats.SimplePigStats.java
License:Apache License
@SuppressWarnings("deprecation") JobStats addJobStats(Job job) { MapReduceOper mro = jobMroMap.get(job); if (mro == null) { LOG.warn("unable to get MR oper for job: " + job.toString()); return null; }/*from w w w. j a v a2 s .co m*/ JobStats js = mroJobMap.get(mro); JobID jobId = job.getAssignedJobID(); js.setId(jobId); js.setAlias(mro); js.setConf(job.getJobConf()); return js; }
From source file:org.apache.pig.tools.pigstats.SimplePigStats.java
License:Apache License
void setBackendException(Job job, Exception e) { if (e instanceof PigException) { LOG.error("ERROR " + ((PigException) e).getErrorCode() + ": " + e.getLocalizedMessage()); } else if (e != null) { LOG.error("ERROR: " + e.getLocalizedMessage()); }/*from ww w. j av a 2 s. com*/ if (job.getAssignedJobID() == null || e == null) { LOG.debug("unable to set backend exception"); return; } String id = job.getAssignedJobID().toString(); Iterator<JobStats> iter = jobPlan.iterator(); while (iter.hasNext()) { JobStats js = iter.next(); if (id.equals(js.getJobId())) { js.setBackendException(e); break; } } }