Search in sources :

Example 1 with NodeReportProto

use of org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto in project hadoop by apache.

the class GetClusterNodesResponsePBImpl method initLocalNodeManagerInfosList.

// Once this is called. containerList will never be null - until a getProto
// is called.
private void initLocalNodeManagerInfosList() {
    if (this.nodeManagerInfoList != null) {
        return;
    }
    GetClusterNodesResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<NodeReportProto> list = p.getNodeReportsList();
    nodeManagerInfoList = new ArrayList<NodeReport>();
    for (NodeReportProto a : list) {
        nodeManagerInfoList.add(convertFromProtoFormat(a));
    }
}
Also used : GetClusterNodesResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesResponseProtoOrBuilder) NodeReportProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto) NodeReport(org.apache.hadoop.yarn.api.records.NodeReport)

Example 2 with NodeReportProto

use of org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto in project hadoop by apache.

the class AllocateResponsePBImpl method initLocalNewNodeReportList.

// Once this is called. updatedNodes will never be null - until a getProto is
// called.
private synchronized void initLocalNewNodeReportList() {
    if (this.updatedNodes != null) {
        return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<NodeReportProto> list = p.getUpdatedNodesList();
    updatedNodes = new ArrayList<NodeReport>(list.size());
    for (NodeReportProto n : list) {
        updatedNodes.add(convertFromProtoFormat(n));
    }
}
Also used : AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder) NodeReportProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto) NodeReport(org.apache.hadoop.yarn.api.records.NodeReport)

Aggregations

NodeReport (org.apache.hadoop.yarn.api.records.NodeReport)2 NodeReportProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto)2 AllocateResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)1 GetClusterNodesResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesResponseProtoOrBuilder)1