Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Iceberg]Support s3 as warehouse directory for hive file catalog #24328

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hantangwangd
Copy link
Member

@hantangwangd hantangwangd commented Jan 7, 2025

Description

This PR enable iceberg connector to use S3 location as warehouse dir for Hive file catalog.

By configuring the s3 properties described in https://prestodb.io/docs/current/connector/hive.html#amazon-s3-configuration, we can specify a S3 location as the warehouse dir of Hive file catalog. This way, both metadata and data
of iceberg tables will be maintained on S3 storage.

An example configuration includes:

    connector.name=iceberg
    iceberg.catalog.type=HIVE
    hive.metastore=file
    hive.metastore.catalog.dir=s3://iceberg_bucket/warehouse


    hive.s3.use-instance-credentials=false
    hive.s3.aws-access-key=accesskey
    hive.s3.aws-secret-key=secretkey
    hive.s3.endpoint=http://192.168.0.103:9878
    hive.s3.path-style-access=true

Motivation and Context

Support specifying a S3 location directly as warehouse dir for Iceberg with Hive file catalog

Impact

N/A

Test Plan

  • Manually confirmed in local environment (including Ozone and MinIO)
  • Make sure this change do not affect any existing test cases
  • Newly added test class to run test cases in IcebergDistributedTestBase on S3 storage provided by dockerized MinIO

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== RELEASE NOTES ==

Iceberg Connector Changes
* Enable iceberg connector to use S3 location as warehouse dir for ``Hive`` file catalog. :pr:`24328`

Copy link
Contributor

@steveburnett steveburnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the doc! Nit in the link formatting, everything else looks good.

@@ -265,6 +265,22 @@ Property Name Description
Otherwise, it will be ignored.
======================================================= ============================================================= ============

Configure the `Amazon S3 <https://prestodb.io/docs/current/connector/hive.html##amazon-s3-configuration>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configure the `Amazon S3 <https://prestodb.io/docs/current/connector/hive.html##amazon-s3-configuration>`_
Configure the `Amazon S3 <https://prestodb.io/docs/current/connector/hive.html#amazon-s3-configuration>`_

Link breaks because of ##.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, this draft PR depend on PR #24221, and the document change is introduced in PR #24221. I have fixed it in #24211, as well as in this PR, please take a look at both when convenient.

@hantangwangd hantangwangd force-pushed the support_s3_as_warehouse_dir_for_hive_catalog branch from 68edb1a to 9728632 Compare January 9, 2025 08:09
steveburnett
steveburnett previously approved these changes Jan 9, 2025
Copy link
Contributor

@steveburnett steveburnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (docs)

Pull updated branch, new local doc build, looks good. Thank you!

@hantangwangd hantangwangd force-pushed the support_s3_as_warehouse_dir_for_hive_catalog branch from 9728632 to 5718f9b Compare January 11, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants