本文整理汇总了Java中org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants.Values方法的典型用法代码示例。如果您正苦于以下问题:Java Pre21JobHistoryConstants.Values方法的具体用法?Java Pre21JobHistoryConstants.Values怎么用?Java Pre21JobHistoryConstants.Values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants
的用法示例。
在下文中一共展示了Pre21JobHistoryConstants.Values方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertState
import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
private Pre21JobHistoryConstants.Values convertState (JobStatus status) {
int runState = status.getRunState();
if (runState == JobStatus.FAILED) {
return Pre21JobHistoryConstants.Values.FAILED;
} else if (runState == JobStatus.SUCCEEDED) {
return Pre21JobHistoryConstants.Values.SUCCESS;
} else {
throw new IllegalArgumentException("unknown status " + status);
}
}
示例2: validateJobComplete
import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
private void validateJobComplete(JobCompleteEvent completeEvent) {
JobID jobId = completeEvent.getJobStatus().getJobID();
JobStatus finalStatus = completeEvent.getJobStatus();
Assert.assertTrue("Job completed was not submitted:"+jobId,
submittedJobs.contains(jobId));
Assert.assertFalse("Job completed more than once:" + jobId,
completedJobs.contains(jobId));
completedJobs.add(jobId);
Pre21JobHistoryConstants.Values finalValue = jobs.get(jobId).getOutcome();
Pre21JobHistoryConstants.Values obtainedStatus = convertState(finalStatus);
Assert.assertEquals("Job completion final status mismatch", obtainedStatus,
finalValue);
}
示例3: validateJobSubmission
import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
private void validateJobSubmission(JobSubmissionEvent submissionEvent) {
JobID jobId = submissionEvent.getJob().getJobID();
LOG.info("Job being submitted: " + jobId);
Assert.assertFalse("Job " + jobId + " is already submitted", submittedJobs
.contains(jobId));
LOG.info("Adding to submitted Jobs " + jobId);
submittedJobs.add(jobId);
jobs.put(jobId, submissionEvent.getJob());
Pre21JobHistoryConstants.Values finalValue = submissionEvent.getJob().getOutcome();
Assert.assertTrue("Job has final state neither SUCCESS nor FAILED",
finalValue == Pre21JobHistoryConstants.Values.FAILED
|| finalValue == Pre21JobHistoryConstants.Values.SUCCESS);
}
示例4: getOutcome
import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
@Override
public Pre21JobHistoryConstants.Values getOutcome() {
return job.getOutcome();
}
示例5: getOutcome
import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
@Override
public Pre21JobHistoryConstants.Values getOutcome() {
return Pre21JobHistoryConstants.Values.SUCCESS;
}