[
https://issues.apache.org/jira/browse/HADOOP-17372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17229521#comment-17229521
]
Steve Loughran commented on HADOOP-17372:
-----------------------------------------
Probable cause
* cluster fs = s3a
* FileSystem.get of default fs is using the HiveConf config (loaded in
isolation, with its classloader referenced)
* S3A FS init creates a new Configuration object, but it copies the classloader
ref of the hive conf
list of classes to load is effectively
{code}
conf.getClasses("fs.s3a.aws.credentials.provider",
"org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider,
org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider,
com.amazonaws.auth.EnvironmentVariableCredentialsProvider,
org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider
{code}
the spark isolated CL for hive passes the o.a.h. classes through fine, but
com.amazon one is being loaded in the hive CL, and so the
EnvironmentVariableCredentialsProvider really isn't a valid provider
workaround: subclass that provider into org.a.h.fs.s3a.auth
but: all other s3a extension points (signer, delegation token provider) need to
reference implementation classes in org.apache.hadoop, or there is a risk that
spark can't load them through hive -at least if s3a is made the cluster FS.
> S3A AWS Credential provider loading gets confused with isolated classloaders
> ----------------------------------------------------------------------------
>
> Key: HADOOP-17372
> URL: https://issues.apache.org/jira/browse/HADOOP-17372
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.4.0
> Reporter: Steve Loughran
> Priority: Major
>
> Problem: exception in loading S3A credentials for an FS, "Class class
> com.amazonaws.auth.EnvironmentVariableCredentialsProvider does not implement
> AWSCredentialsProvider"
> Location: S3A + Spark dataframes test
> Hypothesised cause:
> Configuration.getClasses() uses the context classloader, and with the spark
> isolated CL that's different from the one the s3a FS uses, so it can't load
> AWS credential providers.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]