use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method initLocalUpdatedContainerList.
private synchronized void initLocalUpdatedContainerList() {
if (this.updatedContainers != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<YarnServiceProtos.UpdatedContainerProto> list = p.getUpdatedContainersList();
updatedContainers = new ArrayList<>();
for (YarnServiceProtos.UpdatedContainerProto c : list) {
updatedContainers.add(convertFromProtoFormat(c));
}
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder 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.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method getAvailableResources.
@Override
public synchronized Resource getAvailableResources() {
if (this.limit != null) {
return this.limit;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
if (!p.hasLimit()) {
return null;
}
this.limit = convertFromProtoFormat(p.getLimit());
return this.limit;
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder in project hadoop by apache.
the class AllocateResponsePBImpl method initLocalNewNMTokenList.
private synchronized void initLocalNewNMTokenList() {
if (nmTokens != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<NMTokenProto> list = p.getNmTokensList();
nmTokens = new ArrayList<NMToken>();
for (NMTokenProto t : list) {
nmTokens.add(convertFromProtoFormat(t));
}
}
use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder 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));
}
}
Aggregations