Search in sources :

Example 1 with ApplicationStateDataProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder in project hadoop by apache.

the class ApplicationStateDataPBImpl method getCallerContext.

@Override
public CallerContext getCallerContext() {
    ApplicationStateDataProtoOrBuilder p = viaProto ? proto : builder;
    RpcHeaderProtos.RPCCallerContextProto pbContext = p.getCallerContext();
    if (pbContext != null) {
        CallerContext context = new CallerContext.Builder(pbContext.getContext()).setSignature(pbContext.getSignature().toByteArray()).build();
        return context;
    }
    return null;
}
Also used : ApplicationStateDataProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder) CallerContext(org.apache.hadoop.ipc.CallerContext) ApplicationStateDataProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder) RpcHeaderProtos(org.apache.hadoop.ipc.protobuf.RpcHeaderProtos)

Example 2 with ApplicationStateDataProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder in project hadoop by apache.

the class ApplicationStateDataPBImpl method getApplicationSubmissionContext.

@Override
public ApplicationSubmissionContext getApplicationSubmissionContext() {
    ApplicationStateDataProtoOrBuilder p = viaProto ? proto : builder;
    if (applicationSubmissionContext != null) {
        return applicationSubmissionContext;
    }
    if (!p.hasApplicationSubmissionContext()) {
        return null;
    }
    applicationSubmissionContext = new ApplicationSubmissionContextPBImpl(p.getApplicationSubmissionContext());
    return applicationSubmissionContext;
}
Also used : ApplicationStateDataProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder) ApplicationSubmissionContextPBImpl(org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl)

Example 3 with ApplicationStateDataProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder in project hadoop by apache.

the class ApplicationStateDataPBImpl method initApplicationTimeout.

private void initApplicationTimeout() {
    if (this.applicationTimeouts != null) {
        return;
    }
    ApplicationStateDataProtoOrBuilder 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 : ApplicationStateDataProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder) ApplicationTimeoutType(org.apache.hadoop.yarn.api.records.ApplicationTimeoutType) ApplicationTimeoutMapProto(org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto)

Aggregations

ApplicationStateDataProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationStateDataProtoOrBuilder)3 CallerContext (org.apache.hadoop.ipc.CallerContext)1 RpcHeaderProtos (org.apache.hadoop.ipc.protobuf.RpcHeaderProtos)1 ApplicationTimeoutType (org.apache.hadoop.yarn.api.records.ApplicationTimeoutType)1 ApplicationSubmissionContextPBImpl (org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl)1 ApplicationTimeoutMapProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationTimeoutMapProto)1