org.apache.hadoop.yarn.event.AsyncDispatcher.getEventHandler()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.hadoop.yarn.event.AsyncDispatcher.getEventHandler()方法的一些代码示例,展示了AsyncDispatcher.getEventHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncDispatcher.getEventHandler()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.event.AsyncDispatcher
类名称:AsyncDispatcher
方法名:getEventHandler

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());
 }
}

相关文章