Beispiel #1
0
        public virtual void SetUp()
        {
            Configuration conf = new Configuration();

            // Dispatcher that processes events inline
            dispatcher = new InlineDispatcher();
            dispatcher.Register(typeof(RMNodeEventType), new TestNMReconnect.TestRMNodeEventDispatcher
                                    (this));
            context = new RMContextImpl(dispatcher, null, null, null, null, null, null, null,
                                        null, null);
            dispatcher.Register(typeof(SchedulerEventType), new InlineDispatcher.EmptyEventHandler
                                    ());
            dispatcher.Register(typeof(RMNodeEventType), new ResourceManager.NodeEventDispatcher
                                    (context));
            NMLivelinessMonitor nmLivelinessMonitor = new NMLivelinessMonitor(dispatcher);

            nmLivelinessMonitor.Init(conf);
            nmLivelinessMonitor.Start();
            NodesListManager nodesListManager = new NodesListManager(context);

            nodesListManager.Init(conf);
            RMContainerTokenSecretManager containerTokenSecretManager = new RMContainerTokenSecretManager
                                                                            (conf);

            containerTokenSecretManager.Start();
            NMTokenSecretManagerInRM nmTokenSecretManager = new NMTokenSecretManagerInRM(conf
                                                                                         );

            nmTokenSecretManager.Start();
            resourceTrackerService = new ResourceTrackerService(context, nodesListManager, nmLivelinessMonitor
                                                                , containerTokenSecretManager, nmTokenSecretManager);
            resourceTrackerService.Init(conf);
            resourceTrackerService.Start();
        }
 /// <exception cref="System.Exception"/>
 protected override void ServiceStart()
 {
     amRmTokenSecretManager.Start();
     containerTokenSecretManager.Start();
     nmTokenSecretManager.Start();
     try
     {
         rmDTSecretManager.StartThreads();
     }
     catch (IOException ie)
     {
         throw new YarnRuntimeException("Failed to start secret manager threads", ie);
     }
     base.ServiceStart();
 }