Search in sources :

Example 1 with ApplicationSubmissionContextProtoOrBuilder

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

the class ApplicationSubmissionContextPBImpl method getAMContainerResourceRequest.

@Override
public ResourceRequest getAMContainerResourceRequest() {
    ApplicationSubmissionContextProtoOrBuilder p = viaProto ? proto : builder;
    if (this.amResourceRequest != null) {
        return amResourceRequest;
    }
    // Else via proto
    if (!p.hasAmContainerResourceRequest()) {
        return null;
    }
    amResourceRequest = convertFromProtoFormat(p.getAmContainerResourceRequest());
    return amResourceRequest;
}
Also used : ApplicationSubmissionContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProtoOrBuilder)

Example 2 with ApplicationSubmissionContextProtoOrBuilder

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

the class ApplicationSubmissionContextPBImpl method getReservationID.

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

Example 3 with ApplicationSubmissionContextProtoOrBuilder

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

the class ApplicationSubmissionContextPBImpl method getApplicationId.

@Override
public ApplicationId getApplicationId() {
    ApplicationSubmissionContextProtoOrBuilder p = viaProto ? proto : builder;
    if (this.applicationId != null) {
        return applicationId;
    }
    // Else via proto
    if (!p.hasApplicationId()) {
        return null;
    }
    applicationId = convertFromProtoFormat(p.getApplicationId());
    return applicationId;
}
Also used : ApplicationSubmissionContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProtoOrBuilder)

Example 4 with ApplicationSubmissionContextProtoOrBuilder

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

the class ApplicationSubmissionContextPBImpl method initApplicationTimeout.

private void initApplicationTimeout() {
    if (this.applicationTimeouts != null) {
        return;
    }
    ApplicationSubmissionContextProtoOrBuilder p = viaProto ? proto : builder;
    List<ApplicationTimeoutMapProto> lists = p.getApplicationTimeoutsList();
    this.applicationTimeouts = new HashMap<ApplicationTimeoutType, Long>(lists.size());
    for (ApplicationTimeoutMapProto timeoutProto : lists) {
        this.applicationTimeouts.put(ProtoUtils.convertFromProtoFormat(timeoutProto.getApplicationTimeoutType()), timeoutProto.getTimeout());
    }
}
Also used : ApplicationTimeoutType(org.apache.hadoop.yarn.api.records.ApplicationTimeoutType) ApplicationTimeoutMapProto(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto) ApplicationSubmissionContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProtoOrBuilder)

Example 5 with ApplicationSubmissionContextProtoOrBuilder

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

the class ApplicationSubmissionContextPBImpl method getLogAggregationContext.

@Override
public LogAggregationContext getLogAggregationContext() {
    ApplicationSubmissionContextProtoOrBuilder p = viaProto ? proto : builder;
    if (this.logAggregationContext != null) {
        return this.logAggregationContext;
    }
    // Else via proto
    if (!p.hasLogAggregationContext()) {
        return null;
    }
    logAggregationContext = convertFromProtoFormat(p.getLogAggregationContext());
    return logAggregationContext;
}
Also used : ApplicationSubmissionContextProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProtoOrBuilder)

Aggregations

ApplicationSubmissionContextProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationSubmissionContextProtoOrBuilder)9 ApplicationTimeoutType (org.apache.hadoop.yarn.api.records.ApplicationTimeoutType)1 ApplicationTimeoutMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto)1