use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto in project hadoop by apache.
the class AllocateResponsePBImpl method initLocalFinishedContainerList.
// Once this is called. containerList will never be null - until a getProto
// is called.
private synchronized void initLocalFinishedContainerList() {
if (this.completedContainersStatuses != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerStatusProto> list = p.getCompletedContainerStatusesList();
completedContainersStatuses = new ArrayList<ContainerStatus>();
for (ContainerStatusProto c : list) {
completedContainersStatuses.add(convertFromProtoFormat(c));
}
}
use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto in project hadoop by apache.
the class GetContainerStatusesResponsePBImpl method addLocalContainerStatusesToProto.
private void addLocalContainerStatusesToProto() {
maybeInitBuilder();
builder.clearStatus();
if (this.containerStatuses == null)
return;
List<ContainerStatusProto> protoList = new ArrayList<ContainerStatusProto>();
for (ContainerStatus status : containerStatuses) {
protoList.add(convertToProtoFormat(status));
}
builder.addAllStatus(protoList);
}
use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto in project hadoop by apache.
the class GetContainerStatusesResponsePBImpl method initLocalContainerStatuses.
private void initLocalContainerStatuses() {
if (this.containerStatuses != null) {
return;
}
GetContainerStatusesResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerStatusProto> statuses = p.getStatusList();
this.containerStatuses = new ArrayList<ContainerStatus>();
for (ContainerStatusProto status : statuses) {
this.containerStatuses.add(convertFromProtoFormat(status));
}
}
use of org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto in project hadoop by apache.
the class NodeStatusPBImpl method initContainers.
private synchronized void initContainers() {
if (this.containers != null) {
return;
}
NodeStatusProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerStatusProto> list = p.getContainersStatusesList();
this.containers = new ArrayList<ContainerStatus>();
for (ContainerStatusProto c : list) {
this.containers.add(convertFromProtoFormat(c));
}
}
Aggregations