public virtual void ReleaseContainer(Resource res) { allocatedContainers.Decr(); allocatedMB = allocatedMB - res.GetMemory(); allocatedGB.Set((int)Math.Ceil(allocatedMB / 1024d)); availableMB = availableMB + res.GetMemory(); availableGB.Set((int)Math.Floor(availableMB / 1024d)); allocatedVCores.Decr(res.GetVirtualCores()); availableVCores.Incr(res.GetVirtualCores()); }
public virtual void SubmitAppAttempt(string user) { appsPending.Incr(); Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.QueueMetrics userMetrics = GetUserMetrics(user); if (userMetrics != null) { userMetrics.SubmitAppAttempt(user); } if (parent != null) { parent.SubmitAppAttempt(user); } }
public virtual void RunAppAttempt(ApplicationId appId, string user) { runBuckets.Add(appId, Runtime.CurrentTimeMillis()); appsRunning.Incr(); appsPending.Decr(); Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.QueueMetrics userMetrics = GetUserMetrics(user); if (userMetrics != null) { userMetrics.RunAppAttempt(appId, user); } if (parent != null) { parent.RunAppAttempt(appId, user); } }
public virtual void ActivateApp(string user) { activeApplications.Incr(); Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.QueueMetrics userMetrics = GetUserMetrics(user); if (userMetrics != null) { userMetrics.ActivateApp(user); } if (parent != null) { parent.ActivateApp(user); } }
public virtual void ReserveResource(string user, Resource res) { reservedContainers.Incr(); reservedMB.Incr(res.GetMemory()); reservedVCores.Incr(res.GetVirtualCores()); Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.QueueMetrics userMetrics = GetUserMetrics(user); if (userMetrics != null) { userMetrics.ReserveResource(user, res); } if (parent != null) { parent.ReserveResource(user, res); } }
public virtual void WaitingTask(Task task) { switch (task.GetType()) { case TaskType.Map: { mapsWaiting.Incr(); break; } case TaskType.Reduce: { reducesWaiting.Incr(); break; } } }
public virtual void AllocateResources(string user, int containers, Resource res, bool decrPending) { allocatedContainers.Incr(containers); aggregateContainersAllocated.Incr(containers); allocatedMB.Incr(res.GetMemory() * containers); allocatedVCores.Incr(res.GetVirtualCores() * containers); if (decrPending) { _decrPendingResources(containers, res); } Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.QueueMetrics userMetrics = GetUserMetrics(user); if (userMetrics != null) { userMetrics.AllocateResources(user, containers, res, decrPending); } if (parent != null) { parent.AllocateResources(user, containers, res, decrPending); } }
public virtual void IncrNumRebootedNMs() { numRebootedNMs.Incr(); }
public virtual void RunningJob(Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job) { jobsRunning.Incr(); }
public virtual void InitingContainer() { containersIniting.Incr(); }
public virtual void AddResource(Resource res) { availableMB = availableMB + res.GetMemory(); availableGB.Incr((int)Math.Floor(availableMB / 1024d)); availableVCores.Incr(res.GetVirtualCores()); }
private void _incrPendingResources(int containers, Resource res) { pendingContainers.Incr(containers); pendingMB.Incr(res.GetMemory() * containers); pendingVCores.Incr(res.GetVirtualCores() * containers); }
public virtual void RunningContainer() { containersRunning.Incr(); }
public virtual void IncrDecommisionedNMs() { numDecommissionedNMs.Incr(); }
public virtual void IncrNumActiveNodes() { numActiveNMs.Incr(); }
public virtual void IncrNumUnhealthyNMs() { numUnhealthyNMs.Incr(); }
public virtual void IncrNumLostNMs() { numLostNMs.Incr(); }
public virtual void IncrActiveUsers() { activeUsers.Incr(); }