本文整理了Java中org.apache.hadoop.yarn.event.AsyncDispatcher.getEventHandler()
方法的一些代码示例,展示了AsyncDispatcher.getEventHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncDispatcher.getEventHandler()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.event.AsyncDispatcher
类名称:AsyncDispatcher
方法名:getEventHandler
暂无
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@SuppressWarnings("rawtypes")
protected EventHandler getRMStateStoreEventHandler() {
return dispatcher.getEventHandler();
}
}
代码示例来源:origin: apache/tajo
public synchronized EventHandler getEventHandler() {
if(eventHandler == null) {
eventHandler = dispatcher.getEventHandler();
}
return eventHandler;
}
代码示例来源:origin: org.apache.tajo/tajo-core
public synchronized EventHandler getEventHandler() {
if(eventHandler == null) {
eventHandler = dispatcher.getEventHandler();
}
return eventHandler;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
@Override
public void handle(Event event) {
// Use hashCode (of ApplicationId) to dispatch the event to the child
// dispatcher, such that all the writing events of one application will
// be handled by one thread, the scheduled order of the these events
// will be preserved
int index = (event.hashCode() & Integer.MAX_VALUE) % dispatchers.size();
dispatchers.get(index).getEventHandler().handle(event);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
@Override
public EventHandler<Event> getEventHandler() {
return dispatcher.getEventHandler();
}
代码示例来源:origin: org.apache.tajo/tajo-core
@Override
public void handle(Event event) {
dispatcher.getEventHandler().handle(event);
}
代码示例来源:origin: apache/tajo
@Override
public void handle(Event event) {
dispatcher.getEventHandler().handle(event);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@SuppressWarnings("unchecked")
public void updateApplicationAttemptState(
ApplicationAttemptStateData attemptState) {
dispatcher.getEventHandler().handle(
new RMStateUpdateAppAttemptEvent(attemptState));
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
@SuppressWarnings("unchecked")
public void updateApplicationAttemptState(
ApplicationAttemptStateData attemptState) {
dispatcher.getEventHandler().handle(
new RMStateUpdateAppAttemptEvent(attemptState));
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
@SuppressWarnings("unchecked")
public void updateApplicationState(
ApplicationStateData appState) {
dispatcher.getEventHandler().handle(new RMStateUpdateAppEvent(appState));
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
@SuppressWarnings("unchecked")
public void updateApplicationState(
ApplicationStateData appState) {
dispatcher.getEventHandler().handle(new RMStateUpdateAppEvent(appState));
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
@Override
public void handleCredentialUpdate() {
Set<ApplicationId> invalidApps = logHandler.getInvalidTokenApps();
if (!invalidApps.isEmpty()) {
dispatcher.getEventHandler().handle(new LogHandlerTokenUpdatedEvent());
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
void addAttempt() {
TaskAttempt taskAttempt
= new MyTaskAttemptImpl(taskID, attempts.size(), clock);
TaskAttemptId taskAttemptID = taskAttempt.getID();
attempts.put(taskAttemptID, taskAttempt);
System.out.println("TLTRE.MyTaskImpl.addAttempt " + getID());
SpeculatorEvent event = new SpeculatorEvent(taskID, +1);
dispatcher.getEventHandler().handle(event);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
void startUp() {
startMockTime = clock.getTime();
overridingState = null;
slotsInUse.addAndGet(taskTypeSlots(myAttemptID.getTaskId().getTaskType()));
System.out.println("TLTRE.MyTaskAttemptImpl.startUp starting " + getID());
SpeculatorEvent event = new SpeculatorEvent(getID().getTaskId(), -1);
dispatcher.getEventHandler().handle(event);
}
代码示例来源:origin: apache/tajo
@Test(timeout = 20000)
public void testFlushResourceReport() throws Exception {
CountDownLatch barrier = new CountDownLatch(2);
statusUpdater = new MockNodeStatusUpdater(barrier, workerContext);
statusUpdater.init(conf);
statusUpdater.start();
assertEquals(0, statusUpdater.getQueueSize());
dispatcher.getEventHandler().handle(new NodeStatusEvent(NodeStatusEvent.EventType.FLUSH_REPORTS));
barrier.await();
assertEquals(0, statusUpdater.getQueueSize());
}
}
内容来源于网络,如有侵权,请联系作者删除!