Search in sources :

Example 1 with SystemCredentialsForAppsProto

use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto 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)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)1 NodeHeartbeatResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProtoOrBuilder)1 SystemCredentialsForAppsProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.SystemCredentialsForAppsProto)1