Search in sources :

Example 1 with NMContainerStatusProto

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProto in project hadoop by apache.

the class RegisterNodeManagerRequestPBImpl method addNMContainerStatusesToProto.

private synchronized void addNMContainerStatusesToProto() {
    maybeInitBuilder();
    builder.clearContainerStatuses();
    List<NMContainerStatusProto> list = new ArrayList<NMContainerStatusProto>();
    for (NMContainerStatus status : this.containerStatuses) {
        list.add(convertToProtoFormat(status));
    }
    builder.addAllContainerStatuses(list);
}
Also used : NMContainerStatus(org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus) ArrayList(java.util.ArrayList) NMContainerStatusProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProto)

Example 2 with NMContainerStatusProto

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProto in project hadoop by apache.

the class RegisterNodeManagerRequestPBImpl method initContainerRecoveryReports.

private synchronized void initContainerRecoveryReports() {
    if (this.containerStatuses != null) {
        return;
    }
    RegisterNodeManagerRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<NMContainerStatusProto> list = p.getContainerStatusesList();
    this.containerStatuses = new ArrayList<NMContainerStatus>();
    for (NMContainerStatusProto c : list) {
        this.containerStatuses.add(convertFromProtoFormat(c));
    }
}
Also used : NMContainerStatus(org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus) RegisterNodeManagerRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.RegisterNodeManagerRequestProtoOrBuilder) NMContainerStatusProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProto)

Aggregations

NMContainerStatusProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProto)2 NMContainerStatus (org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus)2 ArrayList (java.util.ArrayList)1 RegisterNodeManagerRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.RegisterNodeManagerRequestProtoOrBuilder)1