Пример #1
0
            public QueueInfo GetQueueInfo(bool includeChildQueues, bool recursive)
            {
                QueueInfo queueInfo = Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Fifo.FifoScheduler
                                      .recordFactory.NewRecordInstance <QueueInfo>();

                queueInfo.SetQueueName(this._enclosing.DefaultQueue.GetQueueName());
                queueInfo.SetCapacity(1.0f);
                if (this._enclosing.clusterResource.GetMemory() == 0)
                {
                    queueInfo.SetCurrentCapacity(0.0f);
                }
                else
                {
                    queueInfo.SetCurrentCapacity((float)this._enclosing.usedResource.GetMemory() / this
                                                 ._enclosing.clusterResource.GetMemory());
                }
                queueInfo.SetMaximumCapacity(1.0f);
                queueInfo.SetChildQueues(new AList <QueueInfo>());
                queueInfo.SetQueueState(QueueState.Running);
                return(queueInfo);
            }
Пример #2
0
        public virtual QueueInfo GetQueueInfo(bool includeChildQueues, bool recursive)
        {
            QueueInfo queueInfo = recordFactory.NewRecordInstance <QueueInfo>();

            queueInfo.SetQueueName(GetQueueName());
            if (scheduler.GetClusterResource().GetMemory() == 0)
            {
                queueInfo.SetCapacity(0.0f);
            }
            else
            {
                queueInfo.SetCapacity((float)GetFairShare().GetMemory() / scheduler.GetClusterResource
                                          ().GetMemory());
            }
            if (GetFairShare().GetMemory() == 0)
            {
                queueInfo.SetCurrentCapacity(0.0f);
            }
            else
            {
                queueInfo.SetCurrentCapacity((float)GetResourceUsage().GetMemory() / GetFairShare
                                                 ().GetMemory());
            }
            AList <QueueInfo> childQueueInfos = new AList <QueueInfo>();

            if (includeChildQueues)
            {
                ICollection <Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Fair.FSQueue>
                childQueues = GetChildQueues();
                foreach (Org.Apache.Hadoop.Yarn.Server.Resourcemanager.Scheduler.Fair.FSQueue child
                         in childQueues)
                {
                    childQueueInfos.AddItem(child.GetQueueInfo(recursive, recursive));
                }
            }
            queueInfo.SetChildQueues(childQueueInfos);
            queueInfo.SetQueueState(QueueState.Running);
            return(queueInfo);
        }
Пример #3
0
        protected internal virtual QueueInfo GetQueueInfo()
        {
            QueueInfo queueInfo = recordFactory.NewRecordInstance <QueueInfo>();

            queueInfo.SetQueueName(queueName);
            queueInfo.SetAccessibleNodeLabels(accessibleLabels);
            queueInfo.SetCapacity(queueCapacities.GetCapacity());
            queueInfo.SetMaximumCapacity(queueCapacities.GetMaximumCapacity());
            queueInfo.SetQueueState(state);
            queueInfo.SetDefaultNodeLabelExpression(defaultLabelExpression);
            queueInfo.SetCurrentCapacity(GetUsedCapacity());
            return(queueInfo);
        }