Package org.apache.hadoop.crypto.key
Class KeyProviderFactory
java.lang.Object
org.apache.hadoop.crypto.key.KeyProviderFactory
A factory to create a list of KeyProvider based on the path given in a
Configuration. It uses a service loader interface to find the available
KeyProviders and create them based on the list of URIs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract KeyProvidercreateProvider(URI providerName, Configuration conf) static KeyProviderget(URI uri, Configuration conf) Create a KeyProvider based on a provided URI.static List<KeyProvider>getProviders(Configuration conf)
-
Field Details
-
KEY_PROVIDER_PATH
- See Also:
-
-
Constructor Details
-
KeyProviderFactory
public KeyProviderFactory()
-
-
Method Details
-
createProvider
- Throws:
IOException
-
getProviders
- Throws:
IOException
-
get
Create a KeyProvider based on a provided URI.- Parameters:
uri- key provider URIconf- configuration to initialize the key provider- Returns:
- the key provider for the specified URI, or
NULLif a provider for the specified URI scheme could not be found. - Throws:
IOException- thrown if the provider failed to initialize.
-