当前位置: 首页>>代码示例>>Java>>正文


Java Pre21JobHistoryConstants.Values方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:11,代码来源:MockSimulatorEngine.java

示例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);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:16,代码来源:MockSimulatorEngine.java

示例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);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:14,代码来源:MockSimulatorEngine.java

示例4: getOutcome

import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
@Override
public Pre21JobHistoryConstants.Values getOutcome() {
  return job.getOutcome();
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:5,代码来源:SimulatorJobStory.java

示例5: getOutcome

import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants; //导入方法依赖的package包/类
@Override
public Pre21JobHistoryConstants.Values getOutcome() {
  return Pre21JobHistoryConstants.Values.SUCCESS;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:5,代码来源:TestSimulatorJobClient.java


注:本文中的org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants.Values方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。