Search in sources :

Example 1 with ContainerProto

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

the class RegisterApplicationMasterResponsePBImpl method initContainersPreviousAttemptList.

private void initContainersPreviousAttemptList() {
    RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getContainersFromPreviousAttemptsList();
    containersFromPreviousAttempts = new ArrayList<Container>();
    for (ContainerProto c : list) {
        containersFromPreviousAttempts.add(convertFromProtoFormat(c));
    }
}
Also used : Container(org.apache.hadoop.yarn.api.records.Container) RegisterApplicationMasterResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.RegisterApplicationMasterResponseProtoOrBuilder) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)

Example 2 with ContainerProto

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

the class RegisterApplicationMasterResponsePBImpl method addContainersFromPreviousAttemptToProto.

private void addContainersFromPreviousAttemptToProto() {
    maybeInitBuilder();
    builder.clearContainersFromPreviousAttempts();
    List<ContainerProto> list = new ArrayList<ContainerProto>();
    for (Container c : containersFromPreviousAttempts) {
        list.add(convertToProtoFormat(c));
    }
    builder.addAllContainersFromPreviousAttempts(list);
}
Also used : Container(org.apache.hadoop.yarn.api.records.Container) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)

Example 3 with ContainerProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto 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 4 with ContainerProto

use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto 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 5 with ContainerProto

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

the class NodeHeartbeatResponsePBImpl method initContainersToDecrease.

private void initContainersToDecrease() {
    if (this.containersToDecrease != null) {
        return;
    }
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getContainersToDecreaseList();
    this.containersToDecrease = new ArrayList<>();
    for (ContainerProto c : list) {
        this.containersToDecrease.add(convertFromProtoFormat(c));
    }
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder) ContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)

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