org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdater Java Examples

The following examples show how to use org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdater. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MiniYARNClusterSplice.java    From spliceengine with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
protected NodeStatusUpdater createNodeStatusUpdater(Context context,
                                                    Dispatcher dispatcher, NodeHealthCheckerService healthChecker) {
    return new NodeStatusUpdaterImpl(context, dispatcher,
                                     healthChecker, metrics) {
        @Override
        protected ResourceTracker getRMClient() {
            final ResourceTrackerService rt =
                getResourceManager().getResourceTrackerService();
            final RecordFactory recordFactory =
                RecordFactoryProvider.getRecordFactory(null);

            // For in-process communication without RPC
            return Utils.getResourceTracker(rt);
        }

        @Override
        protected void stopRMProxy() { }
     };
}
 
Example #2
Source File: ContainerManagerImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public ContainerManagerImpl(Context context, ContainerExecutor exec,
    DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater,
    NodeManagerMetrics metrics, ApplicationACLsManager aclsManager,
    LocalDirsHandlerService dirsHandler) {
  super(ContainerManagerImpl.class.getName());
  this.context = context;
  this.dirsHandler = dirsHandler;

  // ContainerManager level dispatcher.
  dispatcher = new AsyncDispatcher();
  this.deletionService = deletionContext;
  this.metrics = metrics;

  rsrcLocalizationSrvc =
      createResourceLocalizationService(exec, deletionContext, context);
  addService(rsrcLocalizationSrvc);

  containersLauncher = createContainersLauncher(context, exec);
  addService(containersLauncher);

  this.nodeStatusUpdater = nodeStatusUpdater;
  this.aclsManager = aclsManager;

  // Start configurable services
  auxiliaryServices = new AuxServices();
  auxiliaryServices.registerServiceListener(this);
  addService(auxiliaryServices);

  this.containersMonitor =
      new ContainersMonitorImpl(exec, dispatcher, this.context);
  addService(this.containersMonitor);

  dispatcher.register(ContainerEventType.class,
      new ContainerEventDispatcher());
  dispatcher.register(ApplicationEventType.class,
      new ApplicationEventDispatcher());
  dispatcher.register(LocalizationEventType.class, rsrcLocalizationSrvc);
  dispatcher.register(AuxServicesEventType.class, auxiliaryServices);
  dispatcher.register(ContainersMonitorEventType.class, containersMonitor);
  dispatcher.register(ContainersLauncherEventType.class, containersLauncher);
  
  addService(dispatcher);

  ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
  this.readLock = lock.readLock();
  this.writeLock = lock.writeLock();
}
 
Example #3
Source File: ContainerManagerImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
public ContainerManagerImpl(Context context, ContainerExecutor exec,
    DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater,
    NodeManagerMetrics metrics, ApplicationACLsManager aclsManager,
    LocalDirsHandlerService dirsHandler) {
  super(ContainerManagerImpl.class.getName());
  this.context = context;
  this.dirsHandler = dirsHandler;

  // ContainerManager level dispatcher.
  dispatcher = new AsyncDispatcher();
  this.deletionService = deletionContext;
  this.metrics = metrics;

  rsrcLocalizationSrvc =
      createResourceLocalizationService(exec, deletionContext, context);
  addService(rsrcLocalizationSrvc);

  containersLauncher = createContainersLauncher(context, exec);
  addService(containersLauncher);

  this.nodeStatusUpdater = nodeStatusUpdater;
  this.aclsManager = aclsManager;

  // Start configurable services
  auxiliaryServices = new AuxServices();
  auxiliaryServices.registerServiceListener(this);
  addService(auxiliaryServices);

  this.containersMonitor =
      new ContainersMonitorImpl(exec, dispatcher, this.context);
  addService(this.containersMonitor);

  dispatcher.register(ContainerEventType.class,
      new ContainerEventDispatcher());
  dispatcher.register(ApplicationEventType.class,
      new ApplicationEventDispatcher());
  dispatcher.register(LocalizationEventType.class, rsrcLocalizationSrvc);
  dispatcher.register(AuxServicesEventType.class, auxiliaryServices);
  dispatcher.register(ContainersMonitorEventType.class, containersMonitor);
  dispatcher.register(ContainersLauncherEventType.class, containersLauncher);
  
  addService(dispatcher);

  ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
  this.readLock = lock.readLock();
  this.writeLock = lock.writeLock();
}