@Override protected void serviceInit(Configuration conf) throws Exception { dispatcher.register(TaskManagerEvent.EventType.class, this); super.serviceInit(conf); }
@SuppressWarnings("unchecked") /** * This method is called to notify the application that * new application is stored or updated in state store * @param event App event containing the app id and event type */ private void notifyApplication(RMAppEvent event) { rmDispatcher.getEventHandler().handle(event); }
@SuppressWarnings("unchecked") /** * This method is called to notify the application that * new application is stored or updated in state store * @param event App event containing the app id and event type */ private void notifyApplication(RMAppEvent event) { rmDispatcher.getEventHandler().handle(event); }
@Override protected void serviceInit(Configuration conf) throws Exception { dispatcher.register(TaskManagerEvent.EventType.class, this); super.serviceInit(conf); }
@SuppressWarnings("unchecked") /** * This method is called to notify the application attempt * that new attempt is stored or updated in state store * @param event App attempt event containing the app attempt * id and event type */ private void notifyApplicationAttempt(RMAppAttemptEvent event) { rmDispatcher.getEventHandler().handle(event); }
/** * Register the handlers for alwaysOn services */ private Dispatcher setupDispatcher() { Dispatcher dispatcher = createDispatcher(); dispatcher.register(RMFatalEventType.class, new ResourceManager.RMFatalEventDispatcher()); return dispatcher; }
@SuppressWarnings("unchecked") /** * This method is called to notify the application that * new application is stored or updated in state store * @param event App event containing the app id and event type */ private void notifyApplication(RMAppEvent event) { rmDispatcher.getEventHandler().handle(event); }
/** * Register the handlers for alwaysOn services */ private Dispatcher setupDispatcher() { Dispatcher dispatcher = createDispatcher(); dispatcher.register(RMFatalEventType.class, new ResourceManager.RMFatalEventDispatcher()); return dispatcher; }
@SuppressWarnings("unchecked") /** * This method is called to notify the application attempt * that new attempt is stored or updated in state store * @param event App attempt event containing the app attempt * id and event type */ private void notifyApplicationAttempt(RMAppAttemptEvent event) { rmDispatcher.getEventHandler().handle(event); }
@Override protected void serviceInit(Configuration conf) throws Exception { this.tajoConf = TUtil.checkTypeAndGet(conf, TajoConf.class); this.totalResource = createWorkerResource(tajoConf); this.availableResource = NodeResources.clone(totalResource); this.dispatcher.register(NodeResourceEvent.EventType.class, this); validateConf(tajoConf); this.enableTest = conf.get(TajoConstants.TEST_KEY, Boolean.FALSE.toString()) .equalsIgnoreCase(Boolean.TRUE.toString()); super.serviceInit(conf); LOG.info("Initialized NodeResourceManager for " + totalResource); }
@Override public void transition(ApplicationImpl app, ApplicationEvent event) { LOG.warn("Log Aggregation service failed to initialize, there will " + "be no logs for this application"); app.dispatcher.getEventHandler().handle( new ApplicationLocalizationEvent( LocalizationEventType.INIT_APPLICATION_RESOURCES, app)); } }
@Override protected void serviceInit(Configuration conf) throws Exception { super.serviceInit(conf); getDispatcher().register(SystemMetricsEventType.class, new TimelineV2EventHandler()); publishContainerEvents = getConfig().getBoolean( YarnConfiguration.RM_PUBLISH_CONTAINER_EVENTS_ENABLED, YarnConfiguration.DEFAULT_RM_PUBLISH_CONTAINER_EVENTS_ENABLED); }
@Override public void transition(ApplicationImpl app, ApplicationEvent event) { LOG.warn("Log Aggregation service failed to initialize, there will " + "be no logs for this application"); app.dispatcher.getEventHandler().handle( new ApplicationLocalizationEvent( LocalizationEventType.INIT_APPLICATION_RESOURCES, app)); } }
@Override protected void serviceInit(Configuration conf) throws Exception { client = TimelineClient.createTimelineClient(); addIfService(client); super.serviceInit(conf); getDispatcher().register(SystemMetricsEventType.class, new TimelineV1EventHandler()); }
@Override public void transition(ApplicationImpl app, ApplicationEvent event) { LOG.warn("Log Aggregation service failed to initialize, there will " + "be no logs for this application"); app.dispatcher.getEventHandler().handle( new ApplicationLocalizationEvent( LocalizationEventType.INIT_APPLICATION_RESOURCES, app)); } }
@Override public void serviceInit(Configuration conf) throws Exception { this.systemConf = TUtil.checkTypeAndGet(conf, TajoConf.class); this.rpcParams = RpcParameterFactory.get(this.systemConf); this.heartBeatRequestQueue = Queues.newLinkedBlockingQueue(); this.serviceTracker = ServiceTrackerFactory.get(systemConf); this.workerContext.getNodeResourceManager().getDispatcher().register(NodeStatusEvent.EventType.class, this); this.heartBeatInterval = systemConf.getIntVar(TajoConf.ConfVars.WORKER_HEARTBEAT_IDLE_INTERVAL); this.updaterThread = new StatusUpdaterThread(); this.updaterThread.setName("NodeStatusUpdater"); super.serviceInit(conf); }
@SuppressWarnings("unchecked") // dispatcher not typed @Override public void sendKillEvent(int exitStatus, String description) { this.isMarkeForKilling = true; dispatcher.getEventHandler().handle( new ContainerKillEvent(containerId, exitStatus, description)); }
@SuppressWarnings("unchecked") // dispatcher not typed @Override public void sendPauseEvent(String description) { dispatcher.getEventHandler().handle( new ContainerPauseEvent(containerId, description)); }
@SuppressWarnings("unchecked") // dispatcher not typed private void sendRelaunchEvent() { ContainersLauncherEventType launcherEvent = ContainersLauncherEventType.RELAUNCH_CONTAINER; dispatcher.getEventHandler().handle( new ContainersLauncherEvent(this, launcherEvent)); }
@Override public void transition(ContainerImpl container, ContainerEvent event) { // Container was PAUSED so tell the scheduler container.dispatcher.getEventHandler().handle( new ContainerSchedulerEvent(container, ContainerSchedulerEventType.CONTAINER_PAUSED)); } }