Search in sources :

Example 1 with PreemptionContractProtoOrBuilder

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

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

Aggregations

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