public override QueueInfo GetQueueInfo(bool includeChildQueues, bool recursive) { lock (this) { QueueInfo queueInfo = GetQueueInfo(); IList <QueueInfo> childQueuesInfo = new AList <QueueInfo>(); if (includeChildQueues) { foreach (CSQueue child in childQueues) { // Get queue information recursively? childQueuesInfo.AddItem(child.GetQueueInfo(recursive, recursive)); } } queueInfo.SetChildQueues(childQueuesInfo); return(queueInfo); } }
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); }
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); }