Пример #1
0
        /// <exception cref="System.IO.IOException"/>
        private void InitAndStartRecoveryStore(Configuration conf)
        {
            bool recoveryEnabled = conf.GetBoolean(YarnConfiguration.NmRecoveryEnabled, YarnConfiguration
                                                   .DefaultNmRecoveryEnabled);

            if (recoveryEnabled)
            {
                FileSystem recoveryFs      = FileSystem.GetLocal(conf);
                string     recoveryDirName = conf.Get(YarnConfiguration.NmRecoveryDir);
                if (recoveryDirName == null)
                {
                    throw new ArgumentException("Recovery is enabled but " + YarnConfiguration.NmRecoveryDir
                                                + " is not set.");
                }
                Path recoveryRoot = new Path(recoveryDirName);
                recoveryFs.Mkdirs(recoveryRoot, new FsPermission((short)0x1c0));
                nmStore = new NMLeveldbStateStoreService();
            }
            else
            {
                nmStore = new NMNullStateStoreService();
            }
            nmStore.Init(conf);
            nmStore.Start();
        }
 public NonAggregatingLogHandlerWithMockExecutor(TestNonAggregatingLogHandler _enclosing
                                                 , Dispatcher dispatcher, DeletionService delService, LocalDirsHandlerService dirsHandler
                                                 , NMStateStoreService stateStore)
     : base(dispatcher, delService, dirsHandler, stateStore)
 {
     this._enclosing = _enclosing;
 }
Пример #3
0
 internal LocalResourcesTrackerImpl(string user, ApplicationId appId, Dispatcher dispatcher
                                    , ConcurrentMap <LocalResourceRequest, LocalizedResource> localrsrc, bool useLocalCacheDirectoryManager
                                    , Configuration conf, NMStateStoreService stateStore)
 {
     /*
      * This flag controls whether this resource tracker uses hierarchical
      * directories or not. For PRIVATE and PUBLIC resource trackers it
      * will be set whereas for APPLICATION resource tracker it would
      * be false.
      */
     /*
      * It is used to keep track of resource into hierarchical directory
      * while it is getting downloaded. It is useful for reference counting
      * in case resource localization fails.
      */
     /*
      * starting with 10 to accommodate 0-9 directories created as a part of
      * LocalCacheDirectoryManager. So there will be one unique number generator
      * per APPLICATION, USER and PUBLIC cache.
      */
     this.appId      = appId;
     this.user       = user;
     this.dispatcher = dispatcher;
     this.localrsrc  = localrsrc;
     this.useLocalCacheDirectoryManager = useLocalCacheDirectoryManager;
     if (this.useLocalCacheDirectoryManager)
     {
         directoryManagers           = new ConcurrentHashMap <Path, LocalCacheDirectoryManager>();
         inProgressLocalResourcesMap = new ConcurrentHashMap <LocalResourceRequest, Path>();
     }
     this.conf       = conf;
     this.stateStore = stateStore;
 }
Пример #4
0
 public NMContainerTokenSecretManager(Configuration conf, NMStateStoreService stateStore
                                      )
     : base(conf)
 {
     recentlyStartedContainerTracker = new SortedDictionary <long, IList <ContainerId> >(
         );
     this.stateStore = stateStore;
 }
Пример #5
0
 public DeletionService(ContainerExecutor exec, NMStateStoreService stateStore)
     : base(typeof(Org.Apache.Hadoop.Yarn.Server.Nodemanager.DeletionService).FullName
            )
 {
     this.exec       = exec;
     this.debugDelay = 0;
     this.stateStore = stateStore;
 }
Пример #6
0
 public NonAggregatingLogHandler(Dispatcher dispatcher, DeletionService delService
                                 , LocalDirsHandlerService dirsHandler, NMStateStoreService stateStore)
     : base(typeof(Org.Apache.Hadoop.Yarn.Server.Nodemanager.Containermanager.Loghandler.NonAggregatingLogHandler
                   ).FullName)
 {
     this.dispatcher  = dispatcher;
     this.delService  = delService;
     this.dirsHandler = dirsHandler;
     this.stateStore  = stateStore;
     this.appOwners   = new ConcurrentHashMap <ApplicationId, string>();
 }
Пример #7
0
 public NMContext(NMContainerTokenSecretManager containerTokenSecretManager, NMTokenSecretManagerInNM
                  nmTokenSecretManager, LocalDirsHandlerService dirsHandler, ApplicationACLsManager
                  aclsManager, NMStateStoreService stateStore)
 {
     this.containerTokenSecretManager = containerTokenSecretManager;
     this.nmTokenSecretManager        = nmTokenSecretManager;
     this.dirsHandler = dirsHandler;
     this.aclsManager = aclsManager;
     this.nodeHealthStatus.SetIsNodeHealthy(true);
     this.nodeHealthStatus.SetHealthReport("Healthy");
     this.nodeHealthStatus.SetLastHealthReportTime(Runtime.CurrentTimeMillis());
     this.stateStore = stateStore;
 }
Пример #8
0
 protected internal virtual NodeManager.NMContext CreateNMContext(NMContainerTokenSecretManager
                                                                  containerTokenSecretManager, NMTokenSecretManagerInNM nmTokenSecretManager, NMStateStoreService
                                                                  stateStore)
 {
     return(new NodeManager.NMContext(containerTokenSecretManager, nmTokenSecretManager
                                      , dirsHandler, aclsManager, stateStore));
 }
Пример #9
0
 public _NMContext_108(NMContainerTokenSecretManager baseArg1, NMTokenSecretManagerInNM
                       baseArg2, LocalDirsHandlerService baseArg3, ApplicationACLsManager baseArg4, NMStateStoreService
                       baseArg5)
     : base(baseArg1, baseArg2, baseArg3, baseArg4, baseArg5)
 {
 }
 public NMTokenSecretManagerInNM(NMStateStoreService stateStore)
 {
     this.oldMasterKeys = new Dictionary <ApplicationAttemptId, MasterKeyData>();
     appToAppAttemptMap = new Dictionary <ApplicationId, IList <ApplicationAttemptId> >();
     this.stateStore    = stateStore;
 }
Пример #11
0
 public _ContainerImpl_214(Configuration baseArg1, Dispatcher baseArg2, NMStateStoreService
                           baseArg3, ContainerLaunchContext baseArg4, Credentials baseArg5, NodeManagerMetrics
                           baseArg6, ContainerTokenIdentifier baseArg7)
     : base(baseArg1, baseArg2, baseArg3, baseArg4, baseArg5, baseArg6, baseArg7)
 {
 }
Пример #12
0
 public LocalResourcesTrackerImpl(string user, ApplicationId appId, Dispatcher dispatcher
                                  , bool useLocalCacheDirectoryManager, Configuration conf, NMStateStoreService stateStore
                                  )
     : this(user, appId, dispatcher, new ConcurrentHashMap <LocalResourceRequest, LocalizedResource
                                                            >(), useLocalCacheDirectoryManager, conf, stateStore)
 {
 }