KMSUtil (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, class: KMSUtil

Package org.apache.hadoop.util

# Class KMSUtil

java.lang.Object
org.apache.hadoop.util.KMSUtil

@Private public final class KMSUtil extends Object
Utils for KMS.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.slf4j.Logger`
  `LOG`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `checkNotEmpty(String s, String name)`
  `static <T> T`
  `checkNotNull(T o, String name)`
  `static KeyProvider`
  `createKeyProvider(Configuration conf, String configKeyName)`
  Creates a new KeyProvider from the given Configuration and configuration key name.
  `static KeyProvider`
  `createKeyProviderFromUri(Configuration conf, URI providerUri)`
  `static URI`
  `getKeyProviderUri(Configuration conf)`
  `static URI`
  `getKeyProviderUri(Configuration conf, String configKeyName)`
  `static KeyProviderCryptoExtension.EncryptedKeyVersion`
  `parseJSONEncKeyVersion(String keyName, Map valueMap)`
  `static List<KeyProviderCryptoExtension.EncryptedKeyVersion>`
  `parseJSONEncKeyVersions(String keyName, List valueList)`
  `static KeyProvider.KeyVersion`
  `parseJSONKeyVersion(Map valueMap)`
  `static KeyProvider.Metadata`
  `parseJSONMetadata(Map valueMap)`
  `static Map`
  `toJSON(KeyProvider.KeyVersion keyVersion)`
  `static Map`
  `toJSON(KeyProviderCryptoExtension.EncryptedKeyVersion encryptedKeyVersion)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOG

    public static final org.slf4j.Logger LOG

- ## Method Details

  - ### createKeyProvider

    public static KeyProvider createKeyProvider(Configuration conf, String configKeyName) throws IOException
    Creates a new KeyProvider from the given Configuration and configuration key name.
    Parameters:
      `conf` - Configuration
      `configKeyName` - The configuration key name
    Returns:
      new KeyProvider, or null if no provider was found.
    Throws:
      `IOException` - if the KeyProvider is improperly specified in the Configuration

  - ### getKeyProviderUri

    public static URI getKeyProviderUri(Configuration conf)

  - ### getKeyProviderUri

    public static URI getKeyProviderUri(Configuration conf, String configKeyName)

  - ### createKeyProviderFromUri

    public static KeyProvider createKeyProviderFromUri(Configuration conf, URI providerUri) throws IOException
    Throws:
      `IOException`

  - ### toJSON

    public static Map toJSON(KeyProvider.KeyVersion keyVersion)

  - ### toJSON

    public static Map toJSON(KeyProviderCryptoExtension.EncryptedKeyVersion encryptedKeyVersion)

  - ### checkNotNull

    public static <T> T checkNotNull(T o, String name) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

  - ### checkNotEmpty

    public static String checkNotEmpty(String s, String name) throws IllegalArgumentException
    Throws:
      `IllegalArgumentException`

  - ### parseJSONEncKeyVersions

    public static List<KeyProviderCryptoExtension.EncryptedKeyVersion> parseJSONEncKeyVersions(String keyName, List valueList)

  - ### parseJSONEncKeyVersion

    public static KeyProviderCryptoExtension.EncryptedKeyVersion parseJSONEncKeyVersion(String keyName, Map valueMap)

  - ### parseJSONKeyVersion

    public static KeyProvider.KeyVersion parseJSONKeyVersion(Map valueMap)

  - ### parseJSONMetadata

    public static KeyProvider.Metadata parseJSONMetadata(Map valueMap)