本文整理汇总了Java中org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java JobQueueChangeEvent类的具体用法?Java JobQueueChangeEvent怎么用?Java JobQueueChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobQueueChangeEvent类属于org.apache.hadoop.mapreduce.jobhistory包,在下文中一共展示了JobQueueChangeEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processJobQueueChangeEvent
import org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent; //导入依赖的package包/类
private void processJobQueueChangeEvent(JobQueueChangeEvent event) {
// set the queue name if existing
String queue = event.getJobQueueName();
if (queue != null) {
result.setQueue(queue);
}
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:JobBuilder.java
示例2: setQueueName
import org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent; //导入依赖的package包/类
@Override
public void setQueueName(String queueName) {
this.queueName = queueName;
JobQueueChangeEvent jqce = new JobQueueChangeEvent(oldJobId, queueName);
eventHandler.handle(new JobHistoryEvent(jobId, jqce));
}
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:JobImpl.java
示例3: process
import org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent; //导入依赖的package包/类
/**
* Process one {@link HistoryEvent}
*
* @param event
* The {@link HistoryEvent} to be processed.
*/
public void process(HistoryEvent event) {
if (finalized) {
throw new IllegalStateException(
"JobBuilder.process(HistoryEvent event) called after ParsedJob built");
}
// these are in lexicographical order by class name.
if (event instanceof AMStartedEvent) {
// ignore this event as Rumen currently doesnt need this event
//TODO Enhance Rumen to process this event and capture restarts
return;
} else if (event instanceof NormalizedResourceEvent) {
// Log an warn message as NormalizedResourceEvent shouldn't be written.
LOG.warn("NormalizedResourceEvent should be ignored in history server.");
} else if (event instanceof JobFinishedEvent) {
processJobFinishedEvent((JobFinishedEvent) event);
} else if (event instanceof JobInfoChangeEvent) {
processJobInfoChangeEvent((JobInfoChangeEvent) event);
} else if (event instanceof JobInitedEvent) {
processJobInitedEvent((JobInitedEvent) event);
} else if (event instanceof JobPriorityChangeEvent) {
processJobPriorityChangeEvent((JobPriorityChangeEvent) event);
} else if (event instanceof JobQueueChangeEvent) {
processJobQueueChangeEvent((JobQueueChangeEvent) event);
} else if (event instanceof JobStatusChangedEvent) {
processJobStatusChangedEvent((JobStatusChangedEvent) event);
} else if (event instanceof JobSubmittedEvent) {
processJobSubmittedEvent((JobSubmittedEvent) event);
} else if (event instanceof JobUnsuccessfulCompletionEvent) {
processJobUnsuccessfulCompletionEvent((JobUnsuccessfulCompletionEvent) event);
} else if (event instanceof MapAttemptFinishedEvent) {
processMapAttemptFinishedEvent((MapAttemptFinishedEvent) event);
} else if (event instanceof ReduceAttemptFinishedEvent) {
processReduceAttemptFinishedEvent((ReduceAttemptFinishedEvent) event);
} else if (event instanceof TaskAttemptFinishedEvent) {
processTaskAttemptFinishedEvent((TaskAttemptFinishedEvent) event);
} else if (event instanceof TaskAttemptStartedEvent) {
processTaskAttemptStartedEvent((TaskAttemptStartedEvent) event);
} else if (event instanceof TaskAttemptUnsuccessfulCompletionEvent) {
processTaskAttemptUnsuccessfulCompletionEvent((TaskAttemptUnsuccessfulCompletionEvent) event);
} else if (event instanceof TaskFailedEvent) {
processTaskFailedEvent((TaskFailedEvent) event);
} else if (event instanceof TaskFinishedEvent) {
processTaskFinishedEvent((TaskFinishedEvent) event);
} else if (event instanceof TaskStartedEvent) {
processTaskStartedEvent((TaskStartedEvent) event);
} else if (event instanceof TaskUpdatedEvent) {
processTaskUpdatedEvent((TaskUpdatedEvent) event);
} else
throw new IllegalArgumentException(
"JobBuilder.process(HistoryEvent): unknown event type:"
+ event.getEventType() + " for event:" + event);
}
开发者ID:naver,项目名称:hadoop,代码行数:60,代码来源:JobBuilder.java
注:本文中的org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论