use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDataEncryptionKeyResponseProto in project hadoop by apache.
the class ClientNamenodeProtocolServerSideTranslatorPB method getDataEncryptionKey.
@Override
public GetDataEncryptionKeyResponseProto getDataEncryptionKey(RpcController controller, GetDataEncryptionKeyRequestProto request) throws ServiceException {
try {
GetDataEncryptionKeyResponseProto.Builder builder = GetDataEncryptionKeyResponseProto.newBuilder();
DataEncryptionKey encryptionKey = server.getDataEncryptionKey();
if (encryptionKey != null) {
builder.setDataEncryptionKey(PBHelperClient.convert(encryptionKey));
}
return builder.build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
Aggregations