Search in sources :

Example 1 with PreemptionContainerProto

use of org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto 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));
    }
}
Also used : PreemptionContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto) PreemptionContractProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder) PreemptionContainer(org.apache.hadoop.yarn.api.records.PreemptionContainer)

Example 2 with PreemptionContainerProto

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

the class StrictPreemptionContractPBImpl method initIds.

private void initIds() {
    if (containers != null) {
        return;
    }
    StrictPreemptionContractProtoOrBuilder p = viaProto ? proto : builder;
    List<PreemptionContainerProto> list = p.getContainerList();
    containers = new HashSet<PreemptionContainer>();
    for (PreemptionContainerProto c : list) {
        containers.add(convertFromProtoFormat(c));
    }
}
Also used : PreemptionContainerProto(org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto) StrictPreemptionContractProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProtoOrBuilder) PreemptionContainer(org.apache.hadoop.yarn.api.records.PreemptionContainer)

Aggregations

PreemptionContainer (org.apache.hadoop.yarn.api.records.PreemptionContainer)2 PreemptionContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContainerProto)2 PreemptionContractProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnProtos.PreemptionContractProtoOrBuilder)1 StrictPreemptionContractProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnProtos.StrictPreemptionContractProtoOrBuilder)1