本文整理汇总了Java中org.apache.hadoop.mapred.JobStatus.getJobRunState方法的典型用法代码示例。如果您正苦于以下问题:Java JobStatus.getJobRunState方法的具体用法?Java JobStatus.getJobRunState怎么用?Java JobStatus.getJobRunState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.mapred.JobStatus
的用法示例。
在下文中一共展示了JobStatus.getJobRunState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import org.apache.hadoop.mapred.JobStatus; //导入方法依赖的package包/类
/**
* Only used for unit tests.
*/
@Private
public synchronized JobInfo parse(EventReader reader) throws IOException {
if (info != null) {
return info;
}
info = new JobInfo();
parse(reader, this);
if (info.getJobStatus() == null) {
info.jobStatus = JobStatus.getJobRunState(JobStatus.FAILED);
if (info.getErrorInfo() == null || info.getErrorInfo().equals("")) {
info.errorInfo = "Application failed due to failed ApplicationMaster.\n"
+ "Only partial information is available; some values may be "
+ "inaccurate.";
}
}
if (info.getFinishTime() == -1L) {
info.finishTime = info.getLaunchTime();
}
return info;
}
示例2: handleJobFinishedEvent
import org.apache.hadoop.mapred.JobStatus; //导入方法依赖的package包/类
private void handleJobFinishedEvent(JobFinishedEvent event) {
info.finishTime = event.getFinishTime();
info.finishedMaps = event.getFinishedMaps();
info.finishedReduces = event.getFinishedReduces();
info.failedMaps = event.getFailedMaps();
info.failedReduces = event.getFailedReduces();
info.totalCounters = event.getTotalCounters();
info.mapCounters = event.getMapCounters();
info.reduceCounters = event.getReduceCounters();
info.jobStatus = JobStatus.getJobRunState(JobStatus.SUCCEEDED);
}