public CommonNodeLabelsManager() : base(typeof(CommonNodeLabelsManager).FullName) { ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); readLock = Lock.ReadLock(); writeLock = Lock.WriteLock(); }
public QueueCapacities(bool isRoot) { ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); readLock = Lock.ReadLock(); writeLock = Lock.WriteLock(); capacitiesMap = new Dictionary <string, QueueCapacities.Capacities>(); this.isRoot = isRoot; }
public StatefulContainer(NMClientAsync client, ContainerId containerId) { this.nmClientAsync = client; this.containerId = containerId; stateMachine = stateMachineFactory.Make(this); ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); readLock = Lock.ReadLock(); writeLock = Lock.WriteLock(); }
public ResourceUsage() { // short for no-label :) ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); readLock = Lock.ReadLock(); writeLock = Lock.WriteLock(); usages = new Dictionary <string, ResourceUsage.UsageByLabel>(); usages[Nl] = new ResourceUsage.UsageByLabel(Nl); }
public RMAppAttemptMetrics(ApplicationAttemptId attemptId, RMContext rmContext) { // preemption info // application headroom //HM: Line below replaced by one above for issue wih array 2nd dim //new int[NodeType.values().length][NodeType.values().length]; this.attemptId = attemptId; ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); this.readLock = Lock.ReadLock(); this.writeLock = Lock.WriteLock(); this.rmContext = rmContext; }
/// <summary>Construct the service.</summary> /// <param name="name">service name</param> public AbstractYarnScheduler(string name) : base(name) { // Nodes in the cluster, indexed by NodeId // Whole capacity of the cluster /* * All schedulers which are inheriting AbstractYarnScheduler should use * concurrent version of 'applications' map. */ ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); this.maxAllocReadLock = Lock.ReadLock(); this.maxAllocWriteLock = Lock.WriteLock(); }
public ApplicationImpl(Dispatcher dispatcher, string user, ApplicationId appId, Credentials credentials, Context context) { this.dispatcher = dispatcher; this.user = user; this.appId = appId; this.credentials = credentials; this.aclsManager = context.GetApplicationACLsManager(); this.context = context; ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); readLock = Lock.ReadLock(); writeLock = Lock.WriteLock(); stateMachine = stateMachineFactory.Make(this); }
public RMContainerImpl(Container container, ApplicationAttemptId appAttemptId, NodeId nodeId, string user, RMContext rmContext, long creationTime) { // Transitions from NEW state // Transitions from RESERVED state // nothing to do // nothing to do // Transitions from ALLOCATED state // Transitions from ACQUIRED state // Transitions from RUNNING state // Transitions from COMPLETED state // Transitions from EXPIRED state // Transitions from RELEASED state // Transitions from KILLED state // create the topology tables this.stateMachine = stateMachineFactory.Make(this); this.containerId = container.GetId(); this.nodeId = nodeId; this.container = container; this.appAttemptId = appAttemptId; this.user = user; this.creationTime = creationTime; this.rmContext = rmContext; this.eventHandler = rmContext.GetDispatcher().GetEventHandler(); this.containerAllocationExpirer = rmContext.GetContainerAllocationExpirer(); this.isAMContainer = false; this.resourceRequests = null; ReentrantReadWriteLock Lock = new ReentrantReadWriteLock(); this.readLock = Lock.ReadLock(); this.writeLock = Lock.WriteLock(); saveNonAMContainerMetaInfo = rmContext.GetYarnConfiguration().GetBoolean(YarnConfiguration .ApplicationHistorySaveNonAmContainerMetaInfo, YarnConfiguration.DefaultApplicationHistorySaveNonAmContainerMetaInfo ); rmContext.GetRMApplicationHistoryWriter().ContainerStarted(this); // If saveNonAMContainerMetaInfo is true, store system metrics for all // containers. If false, and if this container is marked as the AM, metrics // will still be published for this container, but that calculation happens // later. if (saveNonAMContainerMetaInfo) { rmContext.GetSystemMetricsPublisher().ContainerCreated(this, this.creationTime); } }