Example usage for org.apache.hadoop.crypto CryptoProtocolVersion getDescription

List of usage examples for org.apache.hadoop.crypto CryptoProtocolVersion getDescription

Introduction

In this page you can find the example usage for org.apache.hadoop.crypto CryptoProtocolVersion getDescription.

Prototype

public String getDescription() 

Source Link

Usage

From source file:com.mellanox.r4h.DFSClient.java

License:Apache License

/**
 * Obtain the crypto protocol version from the provided FileEncryptionInfo,
 * checking to see if this version is supported by.
 * /*from w  w w  .jav a 2s  .  c  om*/
 * @param feInfo
 *            FileEncryptionInfo
 * @return CryptoProtocolVersion from the feInfo
 * @throws IOException
 *             if the protocol version is unsupported.
 */
private static CryptoProtocolVersion getCryptoProtocolVersion(FileEncryptionInfo feInfo) throws IOException {
    final CryptoProtocolVersion version = feInfo.getCryptoProtocolVersion();
    if (!CryptoProtocolVersion.supports(version)) {
        throw new IOException("Client does not support specified " + "CryptoProtocolVersion "
                + version.getDescription() + " version " + "number" + version.getVersion());
    }
    return version;
}