Example #1
0
 public override NodeState GetNodeState()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasNodeState())
     {
         return(null);
     }
     return(ProtoUtils.ConvertFromProtoFormat(p.GetNodeState()));
 }
Example #2
0
 private void InitNodeLabels()
 {
     if (this.labels != null)
     {
         return;
     }
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     this.labels = new HashSet <string>();
     Sharpen.Collections.AddAll(this.labels, p.GetNodeLabelsList());
 }
Example #3
0
 public override Resource GetUsed()
 {
     if (this.used != null)
     {
         return(this.used);
     }
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasUsed())
     {
         return(null);
     }
     this.used = ConvertFromProtoFormat(p.GetUsed());
     return(this.used);
 }
Example #4
0
 public override Resource GetCapability()
 {
     if (this.capability != null)
     {
         return(this.capability);
     }
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasCapability())
     {
         return(null);
     }
     this.capability = ConvertFromProtoFormat(p.GetCapability());
     return(this.capability);
 }
Example #5
0
 public override NodeId GetNodeId()
 {
     if (this.nodeId != null)
     {
         return(this.nodeId);
     }
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.HasNodeId())
     {
         return(null);
     }
     this.nodeId = ConvertFromProtoFormat(p.GetNodeId());
     return(this.nodeId);
 }
Example #6
0
 public override string GetRackName()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasRackName()) ? p.GetRackName() : null);
 }
Example #7
0
 public override int GetNumContainers()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasNumContainers()) ? p.GetNumContainers() : 0);
 }
Example #8
0
 public override string GetHttpAddress()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     return((p.HasHttpAddress()) ? p.GetHttpAddress() : null);
 }
Example #9
0
 public override long GetLastHealthReportTime()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     return(p.GetLastHealthReportTime());
 }
Example #10
0
 public override string GetHealthReport()
 {
     YarnProtos.NodeReportProtoOrBuilder p = viaProto ? proto : builder;
     return(p.GetHealthReport());
 }