本文整理汇总了Java中org.apache.hadoop.tools.rumen.JobStory.getSubmissionTime方法的典型用法代码示例。如果您正苦于以下问题:Java JobStory.getSubmissionTime方法的具体用法?Java JobStory.getSubmissionTime怎么用?Java JobStory.getSubmissionTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.tools.rumen.JobStory
的用法示例。
在下文中一共展示了JobStory.getSubmissionTime方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildDistCacheFilesList
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
/**
* Create the list of unique distributed cache files needed for all the
* simulated jobs and write the list to a special file.
* @param jsp job story producer for the trace
* @return exit code
* @throws IOException
*/
private int buildDistCacheFilesList(JobStoryProducer jsp) throws IOException {
// Read all the jobs from the trace file and build the list of unique
// distributed cache files.
JobStory jobStory;
while ((jobStory = jsp.getNextJob()) != null) {
if (jobStory.getOutcome() == Pre21JobHistoryConstants.Values.SUCCESS &&
jobStory.getSubmissionTime() >= 0) {
updateHDFSDistCacheFilesList(jobStory);
}
}
jsp.close();
return writeDistCacheFilesList();
}
示例2: verifyWordCountJobStory
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
/**
* Verifies that the given {@code JobStory} corresponds to the checked-in
* WordCount {@code JobStory}. The verification is effected via JUnit
* assertions.
*
* @param js the candidate JobStory.
*/
private void verifyWordCountJobStory(JobStory js) {
assertNotNull("Null JobStory", js);
String expectedJobStory = "WordCount:johndoe:default:1285322645148:3:1";
String actualJobStory = js.getName() + ":" + js.getUser() + ":"
+ js.getQueueName() + ":" + js.getSubmissionTime() + ":"
+ js.getNumberMaps() + ":" + js.getNumberReduces();
assertEquals("Unexpected JobStory", expectedJobStory, actualJobStory);
}
示例3: getNextJobFiltered
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
protected JobStory getNextJobFiltered() throws IOException {
JobStory job;
do {
job = jobProducer.getNextJob();
} while (job != null
&& (job.getOutcome() != Pre21JobHistoryConstants.Values.SUCCESS ||
job.getSubmissionTime() < 0));
return null == job ? null : new FilterJobStory(job) {
@Override
public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
return new MinTaskInfo(this.job.getTaskInfo(taskType, taskNumber));
}
};
}
示例4: init
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
@Override
public List<SimulatorEvent> init(long when) throws IOException {
JobStory job = jobStoryProducer.getNextJob();
if (job.getSubmissionTime() != when) {
throw new IOException("Inconsistent submission time for the first job: "
+ when + " != " + job.getSubmissionTime()+".");
}
JobSubmissionEvent event = new JobSubmissionEvent(this, when, job);
return Collections.<SimulatorEvent> singletonList(event);
}
示例5: getNextJob
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
@Override
public JobStory getNextJob() throws IOException {
JobStory job = getNextJobFiltered();
if (job == null)
return null;
if (firstJob) {
firstJob = false;
relativeTime = job.getSubmissionTime() - firstJobStartTime;
}
return new SimulatorJobStory(job, job.getSubmissionTime() - relativeTime);
}
示例6: getNextJobFiltered
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
private JobStory getNextJobFiltered() throws IOException {
JobStory job;
do {
job = jobProducer.getNextJob();
} while (job != null
&& (job.getOutcome() != Pre21JobHistoryConstants.Values.SUCCESS ||
job.getSubmissionTime() < 0));
return null == job ? null : new FilterJobStory(job) {
@Override
public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
return new MinTaskInfo(this.job.getTaskInfo(taskType, taskNumber));
}
};
}
示例7: getNextJobFiltered
import org.apache.hadoop.tools.rumen.JobStory; //导入方法依赖的package包/类
protected JobStory getNextJobFiltered() throws IOException {
JobStory job = getNextJobFromTrace();
// filter out the following jobs
// - unsuccessful jobs
// - jobs with missing submit-time
// - reduce only jobs
// These jobs are not yet supported in Gridmix
while (job != null &&
(job.getOutcome() != Pre21JobHistoryConstants.Values.SUCCESS ||
job.getSubmissionTime() < 0 || job.getNumberMaps() == 0)) {
if (LOG.isDebugEnabled()) {
List<String> reason = new ArrayList<String>();
if (job.getOutcome() != Pre21JobHistoryConstants.Values.SUCCESS) {
reason.add("STATE (" + job.getOutcome().name() + ")");
}
if (job.getSubmissionTime() < 0) {
reason.add("SUBMISSION-TIME (" + job.getSubmissionTime() + ")");
}
if (job.getNumberMaps() == 0) {
reason.add("ZERO-MAPS-JOB");
}
// TODO This should never happen. Probably we missed something!
if (reason.size() == 0) {
reason.add("N/A");
}
LOG.debug("Ignoring job " + job.getJobID() + " from the input trace."
+ " Reason: " + StringUtils.join(reason, ","));
}
job = getNextJobFromTrace();
}
return null == job ? null : new FilterJobStory(job) {
@Override
public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
TaskInfo info = this.job.getTaskInfo(taskType, taskNumber);
if (info != null) {
info = new MinTaskInfo(info);
} else {
info = new MinTaskInfo(new TaskInfo(0, 0, 0, 0, 0));
}
return info;
}
};
}