예제 #1
0
 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());
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
 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);
     }
 }
예제 #6
0
        public virtual void WaitingTask(Task task)
        {
            switch (task.GetType())
            {
            case TaskType.Map:
            {
                mapsWaiting.Incr();
                break;
            }

            case TaskType.Reduce:
            {
                reducesWaiting.Incr();
                break;
            }
            }
        }
예제 #7
0
 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);
     }
 }
예제 #8
0
 public virtual void IncrNumRebootedNMs()
 {
     numRebootedNMs.Incr();
 }
예제 #9
0
 public virtual void RunningJob(Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job)
 {
     jobsRunning.Incr();
 }
예제 #10
0
 public virtual void InitingContainer()
 {
     containersIniting.Incr();
 }
예제 #11
0
 public virtual void AddResource(Resource res)
 {
     availableMB = availableMB + res.GetMemory();
     availableGB.Incr((int)Math.Floor(availableMB / 1024d));
     availableVCores.Incr(res.GetVirtualCores());
 }
예제 #12
0
 private void _incrPendingResources(int containers, Resource res)
 {
     pendingContainers.Incr(containers);
     pendingMB.Incr(res.GetMemory() * containers);
     pendingVCores.Incr(res.GetVirtualCores() * containers);
 }
예제 #13
0
 public virtual void RunningContainer()
 {
     containersRunning.Incr();
 }
예제 #14
0
 public virtual void IncrDecommisionedNMs()
 {
     numDecommissionedNMs.Incr();
 }
예제 #15
0
 public virtual void IncrNumActiveNodes()
 {
     numActiveNMs.Incr();
 }
예제 #16
0
 public virtual void IncrNumUnhealthyNMs()
 {
     numUnhealthyNMs.Incr();
 }
예제 #17
0
 public virtual void IncrNumLostNMs()
 {
     numLostNMs.Incr();
 }
예제 #18
0
 public virtual void IncrActiveUsers()
 {
     activeUsers.Incr();
 }