@InterfaceAudience.Private public abstract class AbstractSessionCredentialsProvider extends AbstractAWSCredentialProvider
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractSessionCredentialsProvider.NoCredentials
A special set of null credentials which are not the anonymous class.
|
| Constructor and Description |
|---|
AbstractSessionCredentialsProvider(URI uri,
org.apache.hadoop.conf.Configuration conf)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract com.amazonaws.auth.AWSCredentials |
createCredentials(org.apache.hadoop.conf.Configuration config)
Implementation point: whatever the subclass must do to load credentials.
|
com.amazonaws.auth.AWSCredentials |
getCredentials()
Get the credentials.
|
IOException |
getInitializationException()
Get any IOE raised during initialization.
|
boolean |
hasCredentials() |
protected void |
init()
Initialize the credentials by calling
createCredentials(Configuration) with the current config. |
boolean |
isInitialized()
Has an attempt to initialize the credentials been attempted?
|
String |
toString() |
getConf, getUri, refresh@Retries.OnceTranslated protected void init() throws IOException
createCredentials(Configuration) with the current config.IOException - on any failure.public boolean isInitialized()
init() was called.protected abstract com.amazonaws.auth.AWSCredentials createCredentials(org.apache.hadoop.conf.Configuration config)
throws IOException
init() and then the credentials are cached,
along with any exception.config - the configurationIOException - on any failure.public com.amazonaws.auth.AWSCredentials getCredentials()
throws com.amazonaws.SdkBaseException
createCredentials(Configuration)
is thrown here before any attempt to return the credentials
is made.com.amazonaws.SdkBaseException - if one was raised during initCredentialInitializationException - on other failures.public final boolean hasCredentials()
public IOException getInitializationException()
init() hasn't been called, or it actually worked.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.