Example #1
0
 public override QueueState GetQueueState()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasState())
     {
         return(null);
     }
     return(ConvertFromProtoFormat(p.GetState()));
 }
Example #2
0
 private void InitNodeLabels()
 {
     if (this.accessibleNodeLabels != null)
     {
         return;
     }
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     this.accessibleNodeLabels = new HashSet <string>();
     Sharpen.Collections.AddAll(this.accessibleNodeLabels, p.GetAccessibleNodeLabelsList
                                    ());
 }
Example #3
0
        private void InitLocalChildQueuesList()
        {
            if (this.childQueuesList != null)
            {
                return;
            }
            YarnProtos.QueueInfoProtoOrBuilder p    = viaProto ? proto : builder;
            IList <YarnProtos.QueueInfoProto>  list = p.GetChildQueuesList();

            childQueuesList = new AList <QueueInfo>();
            foreach (YarnProtos.QueueInfoProto a in list)
            {
                childQueuesList.AddItem(ConvertFromProtoFormat(a));
            }
        }
Example #4
0
        private void InitLocalApplicationsList()
        {
            if (this.applicationsList != null)
            {
                return;
            }
            YarnProtos.QueueInfoProtoOrBuilder        p    = viaProto ? proto : builder;
            IList <YarnProtos.ApplicationReportProto> list = p.GetApplicationsList();

            applicationsList = new AList <ApplicationReport>();
            foreach (YarnProtos.ApplicationReportProto a in list)
            {
                applicationsList.AddItem(ConvertFromProtoFormat(a));
            }
        }
Example #5
0
 public override string GetQueueName()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasQueueName()) ? p.GetQueueName() : null);
 }
Example #6
0
 public override float GetMaximumCapacity()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasMaximumCapacity()) ? p.GetMaximumCapacity() : -1);
 }
Example #7
0
 public override float GetCurrentCapacity()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasCurrentCapacity()) ? p.GetCurrentCapacity() : 0);
 }
Example #8
0
 public override string GetDefaultNodeLabelExpression()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasDefaultNodeLabelExpression()) ? p.GetDefaultNodeLabelExpression().Trim
                () : null);
 }