Search in sources :

Example 1 with AllocateRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder in project hadoop by apache.

the class AllocateRequestPBImpl method initReleases.

private void initReleases() {
    if (this.release != null) {
        return;
    }
    AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerIdProto> list = p.getReleaseList();
    this.release = new ArrayList<ContainerId>();
    for (ContainerIdProto c : list) {
        this.release.add(convertFromProtoFormat(c));
    }
}
Also used : AllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder) ContainerId(org.apache.hadoop.yarn.api.records.ContainerId) ContainerIdProto(org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)

Example 2 with AllocateRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder in project hadoop by apache.

the class AllocateRequestPBImpl method initUpdateRequests.

private void initUpdateRequests() {
    if (this.updateRequests != null) {
        return;
    }
    AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<UpdateContainerRequestProto> list = p.getUpdateRequestsList();
    this.updateRequests = new ArrayList<>();
    for (UpdateContainerRequestProto c : list) {
        this.updateRequests.add(convertFromProtoFormat(c));
    }
}
Also used : AllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder) UpdateContainerRequestProto(org.apache.hadoop.yarn.proto.YarnServiceProtos.UpdateContainerRequestProto)

Example 3 with AllocateRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder in project hadoop by apache.

the class AllocateRequestPBImpl method getResourceBlacklistRequest.

@Override
public ResourceBlacklistRequest getResourceBlacklistRequest() {
    AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    if (this.blacklistRequest != null) {
        return this.blacklistRequest;
    }
    if (!p.hasBlacklistRequest()) {
        return null;
    }
    this.blacklistRequest = convertFromProtoFormat(p.getBlacklistRequest());
    return this.blacklistRequest;
}
Also used : AllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder)

Example 4 with AllocateRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder in project hadoop by apache.

the class AllocateRequestPBImpl method initAsks.

private void initAsks() {
    if (this.ask != null) {
        return;
    }
    AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<ResourceRequestProto> list = p.getAskList();
    this.ask = new ArrayList<ResourceRequest>();
    for (ResourceRequestProto c : list) {
        this.ask.add(convertFromProtoFormat(c));
    }
}
Also used : AllocateRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder) ResourceRequest(org.apache.hadoop.yarn.api.records.ResourceRequest) ResourceRequestProto(org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProto)

Aggregations

AllocateRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateRequestProtoOrBuilder)4 ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)1 ResourceRequest (org.apache.hadoop.yarn.api.records.ResourceRequest)1 ContainerIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)1 ResourceRequestProto (org.apache.hadoop.yarn.proto.YarnProtos.ResourceRequestProto)1 UpdateContainerRequestProto (org.apache.hadoop.yarn.proto.YarnServiceProtos.UpdateContainerRequestProto)1