Search in sources :

Example 1 with PreemptionResourceRequestProto

use of org.apache.hadoop.yarn.proto.YarnProtos.PreemptionResourceRequestProto 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

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