Search in sources :

Example 1 with ReservationAllocationStateProtoOrBuilder

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

the class ReservationAllocationStatePBImpl method getReservationDefinition.

@Override
public ReservationDefinition getReservationDefinition() {
    ReservationAllocationStateProtoOrBuilder p = viaProto ? proto : builder;
    if (this.reservationDefinition != null) {
        return this.reservationDefinition;
    }
    this.reservationDefinition = convertFromProtoFormat(p.getReservationDefinition());
    return this.reservationDefinition;
}
Also used : ReservationAllocationStateProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProtoOrBuilder)

Example 2 with ReservationAllocationStateProtoOrBuilder

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

the class ReservationAllocationStatePBImpl method initResourceAllocations.

private void initResourceAllocations() {
    if (this.resourceAllocations != null) {
        return;
    }
    ReservationAllocationStateProtoOrBuilder p = viaProto ? proto : builder;
    List<ResourceAllocationRequestProto> resourceAllocationProtos = p.getAllocationRequestsList();
    resourceAllocations = new ArrayList<>();
    for (ResourceAllocationRequestProto r : resourceAllocationProtos) {
        resourceAllocations.add(convertFromProtoFormat(r));
    }
}
Also used : ReservationAllocationStateProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProtoOrBuilder) ResourceAllocationRequestProto(org.apache.hadoop.yarn.proto.YarnProtos.ResourceAllocationRequestProto)

Example 3 with ReservationAllocationStateProtoOrBuilder

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

the class ReservationAllocationStatePBImpl method getReservationId.

@Override
public ReservationId getReservationId() {
    ReservationAllocationStateProtoOrBuilder p = viaProto ? proto : builder;
    if (this.reservationId != null) {
        return this.reservationId;
    }
    this.reservationId = convertFromProtoFormat(p.getReservationId());
    return this.reservationId;
}
Also used : ReservationAllocationStateProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProtoOrBuilder)

Aggregations

ReservationAllocationStateProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProtoOrBuilder)3 ResourceAllocationRequestProto (org.apache.hadoop.yarn.proto.YarnProtos.ResourceAllocationRequestProto)1