Search in sources :

Example 1 with DistributedSchedulingAllocateRequestProtoOrBuilder

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

the class DistributedSchedulingAllocateRequestPBImpl method initAllocatedContainers.

private void initAllocatedContainers() {
    DistributedSchedulingAllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getAllocatedContainersList();
    this.containers = new ArrayList<Container>();
    for (ContainerProto c : list) {
        this.containers.add(convertFromProtoFormat(c));
    }
}
Also used : Container(org.apache.hadoop.yarn.api.records.Container) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto) DistributedSchedulingAllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.DistributedSchedulingAllocateRequestProtoOrBuilder)

Example 2 with DistributedSchedulingAllocateRequestProtoOrBuilder

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

the class DistributedSchedulingAllocateRequestPBImpl method getAllocateRequest.

@Override
public AllocateRequest getAllocateRequest() {
    DistributedSchedulingAllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    if (this.allocateRequest != null) {
        return this.allocateRequest;
    }
    if (!p.hasAllocateRequest()) {
        return null;
    }
    this.allocateRequest = convertFromProtoFormat(p.getAllocateRequest());
    return this.allocateRequest;
}
Also used : DistributedSchedulingAllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.DistributedSchedulingAllocateRequestProtoOrBuilder)

Aggregations

DistributedSchedulingAllocateRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.DistributedSchedulingAllocateRequestProtoOrBuilder)2 Container (org.apache.hadoop.yarn.api.records.Container)1 ContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)1