Search in sources :

Example 6 with AllocateResponseProtoOrBuilder

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

the class AllocateResponsePBImpl method initLocalNewNodeReportList.

// Once this is called. updatedNodes will never be null - until a getProto is
// called.
private synchronized void initLocalNewNodeReportList() {
    if (this.updatedNodes != null) {
        return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<NodeReportProto> list = p.getUpdatedNodesList();
    updatedNodes = new ArrayList<NodeReport>(list.size());
    for (NodeReportProto n : list) {
        updatedNodes.add(convertFromProtoFormat(n));
    }
}
Also used : AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder) NodeReportProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto) NodeReport(org.apache.hadoop.yarn.api.records.NodeReport)

Example 7 with AllocateResponseProtoOrBuilder

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

the class AllocateResponsePBImpl method getApplicationPriority.

@Override
public synchronized Priority getApplicationPriority() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.appPriority != null) {
        return this.appPriority;
    }
    if (!p.hasApplicationPriority()) {
        return null;
    }
    this.appPriority = convertFromProtoFormat(p.getApplicationPriority());
    return this.appPriority;
}
Also used : AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)

Example 8 with AllocateResponseProtoOrBuilder

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

the class AllocateResponsePBImpl method getPreemptionMessage.

@Override
public synchronized PreemptionMessage getPreemptionMessage() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.preempt != null) {
        return this.preempt;
    }
    if (!p.hasPreempt()) {
        return null;
    }
    this.preempt = convertFromProtoFormat(p.getPreempt());
    return this.preempt;
}
Also used : AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)

Example 9 with AllocateResponseProtoOrBuilder

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

the class AllocateResponsePBImpl method initLocalUpdateErrorsList.

private synchronized void initLocalUpdateErrorsList() {
    if (updateErrors != null) {
        return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<YarnServiceProtos.UpdateContainerErrorProto> list = p.getUpdateErrorsList();
    this.updateErrors = new ArrayList<UpdateContainerError>();
    for (YarnServiceProtos.UpdateContainerErrorProto t : list) {
        updateErrors.add(ProtoUtils.convertFromProtoFormat(t));
    }
}
Also used : UpdateContainerError(org.apache.hadoop.yarn.api.records.UpdateContainerError) AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder) YarnServiceProtos(org.apache.hadoop.yarn.proto.YarnServiceProtos)

Example 10 with AllocateResponseProtoOrBuilder

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

the class AllocateResponsePBImpl method getAMRMToken.

@Override
public synchronized Token getAMRMToken() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (amrmToken != null) {
        return amrmToken;
    }
    if (!p.hasAmRmToken()) {
        return null;
    }
    this.amrmToken = convertFromProtoFormat(p.getAmRmToken());
    return amrmToken;
}
Also used : AllocateResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)

Aggregations

AllocateResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder)10 YarnServiceProtos (org.apache.hadoop.yarn.proto.YarnServiceProtos)2 Container (org.apache.hadoop.yarn.api.records.Container)1 ContainerStatus (org.apache.hadoop.yarn.api.records.ContainerStatus)1 NMToken (org.apache.hadoop.yarn.api.records.NMToken)1 NodeReport (org.apache.hadoop.yarn.api.records.NodeReport)1 UpdateContainerError (org.apache.hadoop.yarn.api.records.UpdateContainerError)1 UpdatedContainer (org.apache.hadoop.yarn.api.records.UpdatedContainer)1 ContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)1 ContainerStatusProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto)1 NodeReportProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeReportProto)1 NMTokenProto (org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto)1