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));
}
}
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);
}
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));
}
}
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;
}
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));
}
}
Aggregations