Class AwsV1BindingSupport

java.lang.Object
org.apache.hadoop.fs.s3a.adapter.AwsV1BindingSupport

public final class AwsV1BindingSupport extends Object
Binding support; the sole way which the rest of the code should instantiate v1 SDK libraries. Uses this class's Classloader for its analysis/loading.
  • Field Details

    • CREDENTIAL_PROVIDER_CLASSNAME

      public static final String CREDENTIAL_PROVIDER_CLASSNAME
      V1 credential provider classname: .
      See Also:
  • Method Details

    • isAwsV1SdkAvailable

      public static boolean isAwsV1SdkAvailable()
      Is the AWS v1 SDK available?
      Returns:
      true if it was found in the classloader
    • createAWSV1CredentialProvider

      public static software.amazon.awssdk.auth.credentials.AwsCredentialsProvider createAWSV1CredentialProvider(org.apache.hadoop.conf.Configuration conf, String className, @Nullable URI uri, String key) throws IOException
      Create an AWS credential provider from its class by using reflection. The class must implement one of the following means of construction, which are attempted in order:
      1. a public constructor accepting java.net.URI and org.apache.hadoop.conf.Configuration
      2. a public constructor accepting org.apache.hadoop.conf.Configuration
      3. a public static method named getInstance that accepts no arguments and returns an instance of com.amazonaws.auth.AWSCredentialsProvider, or
      4. a public default constructor.
      Parameters:
      conf - configuration
      className - credential classname
      uri - URI of the FS
      key - configuration key to use
      Returns:
      the instantiated class
      Throws:
      InstantiationIOException - on any instantiation failure, including v1 SDK not found
      IOException - anything else.