public class ReflectionUtils
extends java.lang.Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static com.amazonaws.auth.AWSCredentialsProvider |
createAwsCredentialsProvider(java.lang.String credentialsProviderClassName,
org.apache.hadoop.conf.Configuration hadoopConf)
Create AWS credentials provider from given provider classname and
Configuration. |
public static com.amazonaws.auth.AWSCredentialsProvider createAwsCredentialsProvider(java.lang.String credentialsProviderClassName,
org.apache.hadoop.conf.Configuration hadoopConf)
throws java.lang.ReflectiveOperationException
Configuration.
It first check if AWS Credentials Provider class has constructor Hadoop configuration as parameter.
If yes - create instance of class using this constructor.
If no - create instance with empty parameters constructor.credentialsProviderClassName - Fully qualified name of the desired credentials provider class.hadoopConf - Hadoop configuration, used to create instance of AWS credentials
provider, if supported.AWSCredentialsProvider object, instantiated from the class @see {credentialsProviderClassName}java.lang.ReflectiveOperationException - When AWS credentials provider constrictor do not matched.
Means class has neither an constructor with no args as input
nor constructor with only Hadoop configuration as argument.