Ejemplo n.º 1
0
 public override QueueState GetQueueState()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasState())
     {
         return(null);
     }
     return(ConvertFromProtoFormat(p.GetState()));
 }
Ejemplo n.º 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
                                    ());
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 5
0
 public override string GetQueueName()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasQueueName()) ? p.GetQueueName() : null);
 }
Ejemplo n.º 6
0
 public override float GetMaximumCapacity()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasMaximumCapacity()) ? p.GetMaximumCapacity() : -1);
 }
Ejemplo n.º 7
0
 public override float GetCurrentCapacity()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasCurrentCapacity()) ? p.GetCurrentCapacity() : 0);
 }
Ejemplo n.º 8
0
 public override string GetDefaultNodeLabelExpression()
 {
     YarnProtos.QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasDefaultNodeLabelExpression()) ? p.GetDefaultNodeLabelExpression().Trim
                () : null);
 }