public final class ProviderUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NO_PASSWORD_CONT |
|
static java.lang.String |
NO_PASSWORD_ERROR |
|
static java.lang.String |
NO_PASSWORD_INSTRUCTIONS_DOC |
|
static java.lang.String |
NO_PASSWORD_WARN |
| Modifier and Type | Method | Description |
|---|---|---|
static Configuration |
excludeIncompatibleCredentialProviders(Configuration config,
java.lang.Class<? extends FileSystem> fileSystemClass) |
There are certain integrations of the credential provider API in
which a recursive dependency between the provider and the hadoop
filesystem abstraction causes a problem.
|
static char[] |
locatePassword(java.lang.String envWithPass,
java.lang.String fileWithPass) |
The password is either found in the environment or in a file.
|
static java.net.URI |
nestURIForLocalJavaKeyStoreProvider(java.net.URI localFile) |
Mangle given local java keystore file URI to allow use as a
LocalJavaKeyStoreProvider.
|
static java.lang.String |
noPasswordError(java.lang.String envKey,
java.lang.String fileKey) |
|
static java.lang.String |
noPasswordWarning(java.lang.String envKey,
java.lang.String fileKey) |
|
static Path |
unnestUri(java.net.URI nestedUri) |
Convert a nested URI to decode the underlying path.
|
@VisibleForTesting public static final java.lang.String NO_PASSWORD_WARN
@VisibleForTesting public static final java.lang.String NO_PASSWORD_ERROR
@VisibleForTesting public static final java.lang.String NO_PASSWORD_CONT
@VisibleForTesting public static final java.lang.String NO_PASSWORD_INSTRUCTIONS_DOC
public static Path unnestUri(java.net.URI nestedUri)
nestedUri - the URI from the nested URIpublic static java.net.URI nestURIForLocalJavaKeyStoreProvider(java.net.URI localFile)
throws java.net.URISyntaxException
localFile - absolute URI with file scheme and no authority component.
i.e. return of File.toURI,
e.g. file:///home/larry/creds.jceksjava.lang.IllegalArgumentException - if localFile isn't not a file uri or if it
has an authority component.java.net.URISyntaxException - if the wrapping process violates RFC 2396public static Configuration excludeIncompatibleCredentialProviders(Configuration config, java.lang.Class<? extends FileSystem> fileSystemClass) throws java.io.IOException
config - the existing configuration with provider pathfileSystemClass - the class which providers must be compatiblejava.io.IOException - raised on errors performing I/O.public static char[] locatePassword(java.lang.String envWithPass,
java.lang.String fileWithPass)
throws java.io.IOException
envWithPass - The name of the environment variable that might
contain the password. Must not be null.fileWithPass - The name of a file that could contain the password.
Can be null.java.io.IOException - If fileWithPass is non-null and points to a
nonexistent file or a file that fails to open and be read properly.public static java.lang.String noPasswordWarning(java.lang.String envKey,
java.lang.String fileKey)
public static java.lang.String noPasswordError(java.lang.String envKey,
java.lang.String fileKey)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.