Search in sources :

Example 1 with NodeStatusProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder in project hadoop by apache.

the class NodeStatusPBImpl method getIncreasedContainers.

@Override
public synchronized List<Container> getIncreasedContainers() {
    if (increasedContainers != null) {
        return increasedContainers;
    }
    NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getIncreasedContainersList();
    this.increasedContainers = new ArrayList<>();
    for (ContainerProto c : list) {
        this.increasedContainers.add(convertFromProtoFormat(c));
    }
    return this.increasedContainers;
}
Also used : NodeStatusProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)

Example 2 with NodeStatusProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder in project hadoop by apache.

the class NodeStatusPBImpl method getNodeHealthStatus.

@Override
public synchronized NodeHealthStatus getNodeHealthStatus() {
    NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
    if (nodeHealthStatus != null) {
        return nodeHealthStatus;
    }
    if (!p.hasNodeHealthStatus()) {
        return null;
    }
    nodeHealthStatus = convertFromProtoFormat(p.getNodeHealthStatus());
    return nodeHealthStatus;
}
Also used : NodeStatusProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder)

Example 3 with NodeStatusProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder in project hadoop by apache.

the class NodeStatusPBImpl method getNodeId.

@Override
public synchronized NodeId getNodeId() {
    NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
    if (this.nodeId != null) {
        return this.nodeId;
    }
    if (!p.hasNodeId()) {
        return null;
    }
    this.nodeId = convertFromProtoFormat(p.getNodeId());
    return this.nodeId;
}
Also used : NodeStatusProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder)

Example 4 with NodeStatusProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder in project hadoop by apache.

the class NodeStatusPBImpl method initContainers.

private synchronized void initContainers() {
    if (this.containers != null) {
        return;
    }
    NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerStatusProto> list = p.getContainersStatusesList();
    this.containers = new ArrayList<ContainerStatus>();
    for (ContainerStatusProto c : list) {
        this.containers.add(convertFromProtoFormat(c));
    }
}
Also used : ContainerStatusProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto) ContainerStatus(org.apache.hadoop.yarn.api.records.ContainerStatus) NodeStatusProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder)

Example 5 with NodeStatusProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder in project hadoop by apache.

the class NodeStatusPBImpl method initKeepAliveApplications.

private synchronized void initKeepAliveApplications() {
    if (this.keepAliveApplications != null) {
        return;
    }
    NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
    List<ApplicationIdProto> list = p.getKeepAliveApplicationsList();
    this.keepAliveApplications = new ArrayList<ApplicationId>();
    for (ApplicationIdProto c : list) {
        this.keepAliveApplications.add(convertFromProtoFormat(c));
    }
}
Also used : NodeStatusProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder) ApplicationIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto) ApplicationId(org.apache.hadoop.yarn.api.records.ApplicationId)

Aggregations

NodeStatusProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder)5 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)1 ContainerStatus (org.apache.hadoop.yarn.api.records.ContainerStatus)1 ApplicationIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto)1 ContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)1 ContainerStatusProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto)1