Enable instance and custom credential provider for glue#1363
Enable instance and custom credential provider for glue#1363sopel39 merged 1 commit intotrinodb:masterfrom 51yu:enable-custom-aws-glue-credential-provider
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
|
I just submitted CLA to cla@prestosql.io |
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/HdfsEnvironment.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/HiveHdfsConfiguration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
GLUE_CREDENTIALS_PROVIDER config property is not set anywhere
There was a problem hiding this comment.
it's defined in hdfs config xml
There was a problem hiding this comment.
It's odd that we put Glue specific config in hdfs-config.xml.
I would rather pass the class name similar as:
public String getS3EncryptionMaterialsProvider()
{
return s3EncryptionMaterialsProvider;
}
@Config("hive.s3.encryption-materials-provider")
@ConfigDescription("Use a custom encryption materials provider for S3 data encryption")
public HiveS3Config setS3EncryptionMaterialsProvider(String s3EncryptionMaterialsProvider)
{
this.s3EncryptionMaterialsProvider = s3EncryptionMaterialsProvider;
return this;
}
from HiveS3Config
There was a problem hiding this comment.
I think you can set credential provider class name directly in GlueHiveMetastoreConfig. No need for passthrough via Configuration
There was a problem hiding this comment.
I am trying to follow the convention in document
This class must implement the AWSCredentialsProvider interface and provide a two-argument constructor that takes a java.net.URI and a Hadoop org.apache.hadoop.conf.Configuration as arguments.
https://prestosql.io/docs/current/connector/hive.html#amazon-s3-configuration
^^ see custom s3 credential provider.
shall we use the same pattern for glue ?
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
|
@Praveen2112 @sopel39 I resolved comments except hdfs configuration one |
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
It's odd that we put Glue specific config in hdfs-config.xml.
I would rather pass the class name similar as:
public String getS3EncryptionMaterialsProvider()
{
return s3EncryptionMaterialsProvider;
}
@Config("hive.s3.encryption-materials-provider")
@ConfigDescription("Use a custom encryption materials provider for S3 data encryption")
public HiveS3Config setS3EncryptionMaterialsProvider(String s3EncryptionMaterialsProvider)
{
this.s3EncryptionMaterialsProvider = s3EncryptionMaterialsProvider;
return this;
}
from HiveS3Config
|
@sopel39 ready for review. |
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
|
@sopel39 ready for review. |
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
Add two configs for glue credentials 1. Use instance credential hive.metastore.glue.use-instance-credentials=true 2. Use custom credentials provider hive.metastore.glue.aws-credentials-provider where value is fully qualified class name
|
For future:
|
Cherry-pick of trinodb/trino#1363, trinodb/trino#741 and trinodb/trino#3689 Add config hive.metastore.glue.aws-credentials-provider for glue credential provider. where value is fully qualified class name of custom aws credential provider implementation. Co-authored-by: Li Yu <li.yu.sh0211@gmail.com> Co-authored-by: Anoop Johnson <anoopj@amazon.com> Co-authored-by: Ashhar Hasan <hashhar_dev@outlook.com>
Cherry-pick of trinodb/trino#1363 Add a config for glue credential hive.metastore.glue.aws-credentials-provider where value is fully qualified class name. Co-authored-by: Li Yu <li.yu.sh0211@gmail.com>
Add two configs for glue credential provider
Use instance credential(glue configuration property)
hive.metastore.glue.use-instance-credentials=true
Use custom credential class(hdfs configuration)
presto.glue.credentials-provider
where value is fully qualified class name of
custom aws credential provider implementation