Java 类org.apache.hadoop.mapred.SimulatorEvent 实例源码

项目:hadoop-EAR    文件:SimulatorEngine.java   
/**
 * The main loop of the simulation. First call init() to get objects ready,
 * then go into the main loop, where {@link SimulatorEvent}s are handled removed from
 * the {@link SimulatorEventQueue}, and new {@link SimulatorEvent}s are created and inserted
 * into the {@link SimulatorEventQueue}.
 * @throws IOException
 * @throws InterruptedException
 */
void run() throws IOException, InterruptedException {
  init();

  for (SimulatorEvent next = queue.get(); next != null
      && next.getTimeStamp() < terminateTime && !shutdown; next = queue.get()) {
    currentTime = next.getTimeStamp();
    assert(currentTime == queue.getCurrentTime());
    SimulatorEventListener listener = next.getListener();
    List<SimulatorEvent> response = listener.accept(next);
    queue.addAll(response);
  }

  summary(System.out);
}
项目:RDFS    文件:SimulatorEngine.java   
/**
 * The main loop of the simulation. First call init() to get objects ready,
 * then go into the main loop, where {@link SimulatorEvent}s are handled removed from
 * the {@link SimulatorEventQueue}, and new {@link SimulatorEvent}s are created and inserted
 * into the {@link SimulatorEventQueue}.
 * @throws IOException
 * @throws InterruptedException
 */
void run() throws IOException, InterruptedException {
  init();

  for (SimulatorEvent next = queue.get(); next != null
      && next.getTimeStamp() < terminateTime && !shutdown; next = queue.get()) {
    currentTime = next.getTimeStamp();
    assert(currentTime == queue.getCurrentTime());
    SimulatorEventListener listener = next.getListener();
    List<SimulatorEvent> response = listener.accept(next);
    queue.addAll(response);
  }

  summary(System.out);
}
项目:mapreduce-fork    文件:SimulatorEngine.java   
/**
 * The main loop of the simulation. First call init() to get objects ready,
 * then go into the main loop, where {@link SimulatorEvent}s are handled removed from
 * the {@link SimulatorEventQueue}, and new {@link SimulatorEvent}s are created and inserted
 * into the {@link SimulatorEventQueue}.
 * @throws IOException
 * @throws InterruptedException
 */
void run() throws IOException, InterruptedException {
  init();

  for (SimulatorEvent next = queue.get(); next != null
      && next.getTimeStamp() < terminateTime && !shutdown; next = queue.get()) {
    currentTime = next.getTimeStamp();
    assert(currentTime == queue.getCurrentTime());
    SimulatorEventListener listener = next.getListener();
    List<SimulatorEvent> response = listener.accept(next);
    queue.addAll(response);
  }

  summary(System.out);
}