use of org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder in project hadoop by apache.
the class PreemptionContractPBImpl method initPreemptionContainers.
private void initPreemptionContainers() {
if (containers != null) {
return;
}
PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
List<PreemptionContainerProto> list = p.getContainerList();
containers = new HashSet<PreemptionContainer>();
for (PreemptionContainerProto c : list) {
containers.add(convertFromProtoFormat(c));
}
}
use of org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder in project hadoop by apache.
the class PreemptionContractPBImpl method initPreemptionResourceRequests.
private void initPreemptionResourceRequests() {
if (resources != null) {
return;
}
PreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
List<PreemptionResourceRequestProto> list = p.getResourceList();
resources = new ArrayList<PreemptionResourceRequest>();
for (PreemptionResourceRequestProto rr : list) {
resources.add(convertFromProtoFormat(rr));
}
}
Aggregations