Search in sources :

Example 1 with UpdateApplicationTimeoutsRequestProtoOrBuilder

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

the class UpdateApplicationTimeoutsRequestPBImpl method getApplicationId.

@Override
public ApplicationId getApplicationId() {
    UpdateApplicationTimeoutsRequestProtoOrBuilder 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 : UpdateApplicationTimeoutsRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.UpdateApplicationTimeoutsRequestProtoOrBuilder)

Example 2 with UpdateApplicationTimeoutsRequestProtoOrBuilder

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

the class UpdateApplicationTimeoutsRequestPBImpl method initApplicationTimeout.

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

Aggregations

UpdateApplicationTimeoutsRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.UpdateApplicationTimeoutsRequestProtoOrBuilder)2 ApplicationTimeoutType (org.apache.hadoop.yarn.api.records.ApplicationTimeoutType)1 ApplicationUpdateTimeoutMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationUpdateTimeoutMapProto)1