Search in sources :

Example 6 with ContainerProto

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

the class AllocateResponsePBImpl method initLocalNewContainerList.

// Once this is called. containerList will never be null - until a getProto
// is called.
private synchronized void initLocalNewContainerList() {
    if (this.allocatedContainers != null) {
        return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getAllocatedContainersList();
    allocatedContainers = new ArrayList<Container>();
    for (ContainerProto c : list) {
        allocatedContainers.add(convertFromProtoFormat(c));
    }
}
Also used : UpdatedContainer(org.apache.hadoop.yarn.api.records.UpdatedContainer) Container(org.apache.hadoop.yarn.api.records.Container) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto) AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)

Aggregations

ContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)6 Container (org.apache.hadoop.yarn.api.records.Container)4 UpdatedContainer (org.apache.hadoop.yarn.api.records.UpdatedContainer)1 NodeStatusProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonProtos.NodeStatusProtoOrBuilder)1 DistributedSchedulingAllocateRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.DistributedSchedulingAllocateRequestProtoOrBuilder)1 NodeHeartbeatResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)1 AllocateResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)1 RegisterApplicationMasterResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.RegisterApplicationMasterResponseProtoOrBuilder)1