You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "diqiu50 (via GitHub)" <gi...@apache.org> on 2024/08/23 10:06:14 UTC

[PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

diqiu50 opened a new pull request, #4658:
URL: https://github.com/apache/gravitino/pull/4658

   
   ### What changes were proposed in this pull request?
   
   Add documentation for the Gravitino-Trino connector running on AWS S3. 
   The Hive catalog and Iceberg catalog support S3
   
   ### Why are the changes needed?
   
   Fix: #4657
   
   ### Does this PR introduce _any_ user-facing change?
   
   Update docs
   
   ### How was this patch tested?
   
   NO


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1740245128


##########
docs/trino-connector/catalog-iceberg.md:
##########
@@ -236,3 +236,52 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Iceberg catalog, users need to configure the Trino Iceberg connector's
+AWS S3-related properties in the catalog's properties. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+These configurations must use the `trino.bypass.` prefix in the Iceberg catalog's attributes to be effective.
+
+To create an Iceberg catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+    'gt_iceberg',
+    'lakehouse-iceberg',
+    map(
+        array['uri', 'catalog-backend', 'warehouse',
+          'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region',

Review Comment:
   The internal  connector  like Hive connector doesn't support it. I think we need to encrypt the sensitive data.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1737668203


##########
docs/trino-connector/catalog-hive.md:
##########
@@ -302,3 +302,47 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Hive catalog, users need to configure the Trino Hive connector's
+AWS S3-related properties in the catalog's properteis. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+
+To create a Hive catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+  'gt_hive',
+  'hive',
+  map(
+    array['metastore.uris',
+        'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region'
+    ],
+    array['thrift://hive:9083', '<aws-access-key>', '<aws-secret-key>', '<region>']
+  )
+);
+```
+
+- The settings for `trino.bypass.hive.s3.aws-access-key`, `trino.bypass.hive.s3.aws-secret-key` and `trino.bypass.hive.s3.region`

Review Comment:
   could trino support different catalogs with different secret keys?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#issuecomment-2406740079

   Generally LGTM, @FANNG1 , do you have any further comments?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#issuecomment-2337030089

   @yuqi1129 @FANNG1 Do you have any other suggestions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1734203302


##########
docs/trino-connector/catalog-hive.md:
##########
@@ -302,3 +302,47 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Hive catalog, users need to configure the Trino Hive connector's
+AWS S3-related properties in the catalog's properteis. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+
+To create a Hive catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+  'gt_hive',
+  'hive',
+  map(
+    array['metastore.uris',
+        'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region'
+    ],
+    array['thrift://hive:9083', 'XXXX', 'XXX', 'XXX']

Review Comment:
   Better to relace 'xxxx' to `aws-access-key-value` or something similar, then users can get the placeholder clearly.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1740244040


##########
docs/trino-connector/catalog-iceberg.md:
##########
@@ -236,3 +236,52 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Iceberg catalog, users need to configure the Trino Iceberg connector's
+AWS S3-related properties in the catalog's properties. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+These configurations must use the `trino.bypass.` prefix in the Iceberg catalog's attributes to be effective.
+
+To create an Iceberg catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+    'gt_iceberg',
+    'lakehouse-iceberg',
+    map(
+        array['uri', 'catalog-backend', 'warehouse',
+          'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region',

Review Comment:
   That's ok. If we use original s3, we don't need it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1740243536


##########
docs/trino-connector/catalog-hive.md:
##########
@@ -302,3 +302,47 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Hive catalog, users need to configure the Trino Hive connector's
+AWS S3-related properties in the catalog's properteis. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+
+To create a Hive catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+  'gt_hive',
+  'hive',
+  map(
+    array['metastore.uris',
+        'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region'
+    ],
+    array['thrift://hive:9083', '<aws-access-key>', '<aws-secret-key>', '<region>']
+  )
+);
+```
+
+- The settings for `trino.bypass.hive.s3.aws-access-key`, `trino.bypass.hive.s3.aws-secret-key` and `trino.bypass.hive.s3.region`

Review Comment:
   The Trino supported.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 merged PR #4658:
URL: https://github.com/apache/gravitino/pull/4658


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#issuecomment-2407360481

   > Generally LGTM, @FANNG1 , do you have any further comments?
   
   It's not proper to distribute AKSK in `trino.bypass`,  is there any other way?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1738085039


##########
docs/trino-connector/catalog-iceberg.md:
##########
@@ -236,3 +236,52 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Iceberg catalog, users need to configure the Trino Iceberg connector's
+AWS S3-related properties in the catalog's properties. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+These configurations must use the `trino.bypass.` prefix in the Iceberg catalog's attributes to be effective.
+
+To create an Iceberg catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+    'gt_iceberg',
+    'lakehouse-iceberg',
+    map(
+        array['uri', 'catalog-backend', 'warehouse',
+          'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region',

Review Comment:
   it's tricky to add `aws-access-key` and `trino.bypass.hive.s3.aws-access-key`, could you set the security key when do the query?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1736191442


##########
docs/trino-connector/catalog-iceberg.md:
##########
@@ -236,3 +236,52 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Iceberg catalog, users need to configure the Trino Iceberg connector's
+AWS S3-related properties in the catalog's properties. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+These configurations must use the `trino.bypass.` prefix in the Iceberg catalog's attributes to be effective.
+
+To create an Iceberg catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+    'gt_iceberg',
+    'lakehouse-iceberg',
+    map(
+        array['uri', 'catalog-backend', 'warehouse',
+          'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region',
+          's3-access-key-id', 's3-secret-access-key', 's3-region', 'io-impl'
+        ],
+        array['thrift://hive:9083', 'hive', 's3a://trino-test-ice/dw2',
+        '<aws-access-key>', '<aws-secret-key>', '<region>',
+        '<aws-access-key>', '<aws-secret-key>', '<region>', 'org.apache.iceberg.aws.s3.S3FileIO']

Review Comment:
   @FANNG1 
   Could you also assist in reviewing this section?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4657] Improvement (docs): Add documentation for the Gravitino-Trino connector running on AWS S3. [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #4658:
URL: https://github.com/apache/gravitino/pull/4658#discussion_r1737679659


##########
docs/trino-connector/catalog-iceberg.md:
##########
@@ -236,3 +236,52 @@ replacing hdfs_user with the appropriate username:
 ```text
 -DHADOOP_USER_NAME=hdfs_user
 ```
+
+## S3
+
+When using AWS S3 within the Iceberg catalog, users need to configure the Trino Iceberg connector's
+AWS S3-related properties in the catalog's properties. Please refer to the documentation
+of [Hive connector with Amazon S3](https://trino.io/docs/435/connector/hive-s3.html).
+These configurations must use the `trino.bypass.` prefix in the Iceberg catalog's attributes to be effective.
+
+To create an Iceberg catalog with AWS S3 configuration in the Trino CLI, use the following command:
+
+```sql
+call gravitino.system.create_catalog(
+    'gt_iceberg',
+    'lakehouse-iceberg',
+    map(
+        array['uri', 'catalog-backend', 'warehouse',
+          'trino.bypass.hive.s3.aws-access-key', 'trino.bypass.hive.s3.aws-secret-key', 'trino.bypass.hive.s3.region',

Review Comment:
   should we add  s3 endpoint?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org