/// <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();
 }
Esempio n. 2
0
        private void InitStore(string hostPort)
        {
            Optional <string> optHostPort = Optional.FromNullable(hostPort);
            RMContext         rmContext   = Org.Mockito.Mockito.Mock <RMContext>();

            conf = new YarnConfiguration();
            conf.Set(YarnConfiguration.RmZkAddress, optHostPort.Or(this.hostPort));
            conf.Set(YarnConfiguration.ZkRmStateStoreParentPath, workingZnode);
            store = new ZKRMStateStore();
            store.Init(conf);
            store.Start();
            Org.Mockito.Mockito.When(rmContext.GetStateStore()).ThenReturn(store);
            appTokenMgr = new AMRMTokenSecretManager(conf, rmContext);
            appTokenMgr.Start();
            clientToAMTokenMgr = new ClientToAMTokenSecretManagerInRM();
        }