Search in sources :

Example 6 with NodeHeartbeatResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method getNMTokenMasterKey.

@Override
public MasterKey getNMTokenMasterKey() {
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.nmTokenMasterKey != null) {
        return this.nmTokenMasterKey;
    }
    if (!p.hasNmTokenMasterKey()) {
        return null;
    }
    this.nmTokenMasterKey = convertFromProtoFormat(p.getNmTokenMasterKey());
    return this.nmTokenMasterKey;
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)

Example 7 with NodeHeartbeatResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method initSystemCredentials.

private void initSystemCredentials() {
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<SystemCredentialsForAppsProto> list = p.getSystemCredentialsForAppsList();
    this.systemCredentials = new HashMap<ApplicationId, ByteBuffer>();
    for (SystemCredentialsForAppsProto c : list) {
        ApplicationId appId = convertFromProtoFormat(c.getAppId());
        ByteBuffer byteBuffer = ProtoUtils.convertFromProtoFormat(c.getCredentialsForApp());
        this.systemCredentials.put(appId, byteBuffer);
    }
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder) SystemCredentialsForAppsProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto) ApplicationId(org.apache.hadoop.yarn.api.records.ApplicationId) ByteBuffer(java.nio.ByteBuffer)

Example 8 with NodeHeartbeatResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method getResource.

@Override
public Resource getResource() {
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.resource != null) {
        return this.resource;
    }
    if (!p.hasResource()) {
        return null;
    }
    this.resource = convertFromProtoFormat(p.getResource());
    return this.resource;
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)

Example 9 with NodeHeartbeatResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method initAppCollectorsMap.

private void initAppCollectorsMap() {
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<AppCollectorsMapProto> list = p.getAppCollectorsMapList();
    if (!list.isEmpty()) {
        this.appCollectorsMap = new HashMap<>();
        for (AppCollectorsMapProto c : list) {
            ApplicationId appId = convertFromProtoFormat(c.getAppId());
            this.appCollectorsMap.put(appId, c.getAppCollectorAddr());
        }
    }
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder) AppCollectorsMapProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto) ApplicationId(org.apache.hadoop.yarn.api.records.ApplicationId)

Example 10 with NodeHeartbeatResponseProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder in project hadoop by apache.

the class NodeHeartbeatResponsePBImpl method getContainerTokenMasterKey.

@Override
public MasterKey getContainerTokenMasterKey() {
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.containerTokenMasterKey != null) {
        return this.containerTokenMasterKey;
    }
    if (!p.hasContainerTokenMasterKey()) {
        return null;
    }
    this.containerTokenMasterKey = convertFromProtoFormat(p.getContainerTokenMasterKey());
    return this.containerTokenMasterKey;
}
Also used : NodeHeartbeatResponseProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)

Aggregations

NodeHeartbeatResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)11 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)3 ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)2 ContainerIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto)2 ByteBuffer (java.nio.ByteBuffer)1 SignalContainerRequest (org.apache.hadoop.yarn.api.protocolrecords.SignalContainerRequest)1 ApplicationIdProto (org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto)1 ContainerProto (org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto)1 AppCollectorsMapProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.AppCollectorsMapProto)1 SystemCredentialsForAppsProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto)1 SignalContainerRequestProto (org.apache.hadoop.yarn.proto.YarnServiceProtos.SignalContainerRequestProto)1