You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "difin (via GitHub)" <gi...@apache.org> on 2025/10/21 22:06:27 UTC
[PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
difin opened a new pull request, #6147:
URL: https://github.com/apache/hive/pull/6147
…egrations with Gravitino and Polaris.
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
Docker-compose integration examples of Hive with Gravitino and Polaris REST Catalogs via Hive REST Catalog client.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
To provide an easy to use way to experiment with Hive+Gravitino and Hive+Polaris integrations for the Hive community.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
No
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
Using the proposed docker-compose examples.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470068463
##########
packaging/src/docker/thirdparties/gravitino/docker-compose.yml:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: "3.9"
Review Comment:
what is this version?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6147:
URL: https://github.com/apache/hive/pull/6147#issuecomment-3434140940
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6147) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6147&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6147&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6147&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6147&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6147&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6147)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470137988
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
sure, btw, we don't need to mention version support here, but on hive-site
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470034873
##########
packaging/src/docker/thirdparties/gravitino/gravitino/init.sh:
##########
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Copy Gravitino start script
+cp /tmp/gravitino/start-iceberg-rest-server.sh /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
+
+# Copy Gravitino config file
+cp /tmp/gravitino/gravitino-iceberg-rest-server.conf /root/gravitino-iceberg-rest-server/conf/gravitino-iceberg-rest-server.conf
+
+# Download H2 Driver to Gravitino libs folder
+mkdir -p /root/gravitino-iceberg-rest-server/libs
+curl -L -o /root/gravitino-iceberg-rest-server/libs/h2-2.2.220.jar https://repo1.maven.org/maven2/com/h2database/h2/2.2.220/h2-2.2.220.jar
+
+/bin/bash /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
Review Comment:
why do we call start-iceberg-rest-server.sh within the init.sh? should we call start directly from yaml to know what step failed?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470063465
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
sorry, I don't get it.
instructions are added in 4.2.0 release + i don't fully understand what should be done in case of 4.1.0:
i.e. build apache-hive-4.2.0-SNAPSHOT-bin.tar.gz and put to cache folder, is that useful?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2462654063
##########
packaging/src/docker/examples/polaris/README.md:
##########
@@ -0,0 +1,190 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Polaris: Docker-Compose Setup
Review Comment:
same
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470008902
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
why do we need to copy the jar?
we are not doing that manually in the root hive docker-compose. docker profile is creating the hive images that we use in docker-compose
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2469987834
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
Review Comment:
this package?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470063465
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
sorry, I don't get it.
instructions are added in 4.2.0 release + i don't fully understand what should be done in case of 4.1.0: build apache-hive-4.2.0-SNAPSHOT-bin.tar.gz and put to cache folder, is that useful?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2462653609
##########
packaging/src/docker/examples/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
Review Comment:
i think that should be part of Hive dev setup
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2467507278
##########
packaging/src/docker/examples/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
Review Comment:
I added that because the existing Hive docker-compose setup contains a README file:
https://github.com/apache/hive/blob/master/packaging/src/docker/README.md
So, just wanted to confirm: should we have these README files here for consistency, or only to add to the hive-site?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470137988
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
sure, btw, we don't need to mention version support here, but on hive-site.
same thing for polaris
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470106705
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This package contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
Review Comment:
where is the init container in case of gravitino?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin merged PR #6147:
URL: https://github.com/apache/hive/pull/6147
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470034873
##########
packaging/src/docker/thirdparties/gravitino/gravitino/init.sh:
##########
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Copy Gravitino start script
+cp /tmp/gravitino/start-iceberg-rest-server.sh /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
+
+# Copy Gravitino config file
+cp /tmp/gravitino/gravitino-iceberg-rest-server.conf /root/gravitino-iceberg-rest-server/conf/gravitino-iceberg-rest-server.conf
+
+# Download H2 Driver to Gravitino libs folder
+mkdir -p /root/gravitino-iceberg-rest-server/libs
+curl -L -o /root/gravitino-iceberg-rest-server/libs/h2-2.2.220.jar https://repo1.maven.org/maven2/com/h2database/h2/2.2.220/h2-2.2.220.jar
+
+/bin/bash /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
Review Comment:
why do we call start-iceberg-rest-server.sh from init?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2467507278
##########
packaging/src/docker/examples/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
Review Comment:
I added that because the existing Hive docker-compose setup contains a README file:
https://github.com/apache/hive/blob/master/packaging/src/docker/README.md
So, just wanted to confirm: do we want to have these README files on hive-site only or here also?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2462653609
##########
packaging/src/docker/examples/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
Review Comment:
i think that should be part of Hive dev setup: https://hive.apache.org/development/quickstart/
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2469930104
##########
packaging/src/docker/thirdparties/polaris/README.md:
##########
@@ -0,0 +1,190 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Polaris: Docker-Compose Setup
Review Comment:
Done
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2469794938
##########
packaging/src/docker/examples/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
Review Comment:
Hi @deniskuzZ,
I created a PR for adding the quickstarts to hive-site:
https://github.com/apache/hive-site/pull/68
Can you please review?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470034873
##########
packaging/src/docker/thirdparties/gravitino/gravitino/init.sh:
##########
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Copy Gravitino start script
+cp /tmp/gravitino/start-iceberg-rest-server.sh /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
+
+# Copy Gravitino config file
+cp /tmp/gravitino/gravitino-iceberg-rest-server.conf /root/gravitino-iceberg-rest-server/conf/gravitino-iceberg-rest-server.conf
+
+# Download H2 Driver to Gravitino libs folder
+mkdir -p /root/gravitino-iceberg-rest-server/libs
+curl -L -o /root/gravitino-iceberg-rest-server/libs/h2-2.2.220.jar https://repo1.maven.org/maven2/com/h2database/h2/2.2.220/h2-2.2.220.jar
+
+/bin/bash /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
Review Comment:
why do we call start-iceberg-rest-server.sh from init? should we invoke start independently to know what step failed?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470109679
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
4.1.0 release doesn't have the rest catalog client feature, so maybe we should mention that this is only for 4.2.0 and up and remove the suggestion to place the .tar.gz file manually into the cache folder?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470034873
##########
packaging/src/docker/thirdparties/gravitino/gravitino/init.sh:
##########
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Copy Gravitino start script
+cp /tmp/gravitino/start-iceberg-rest-server.sh /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
+
+# Copy Gravitino config file
+cp /tmp/gravitino/gravitino-iceberg-rest-server.conf /root/gravitino-iceberg-rest-server/conf/gravitino-iceberg-rest-server.conf
+
+# Download H2 Driver to Gravitino libs folder
+mkdir -p /root/gravitino-iceberg-rest-server/libs
+curl -L -o /root/gravitino-iceberg-rest-server/libs/h2-2.2.220.jar https://repo1.maven.org/maven2/com/h2database/h2/2.2.220/h2-2.2.220.jar
+
+/bin/bash /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
Review Comment:
why do we call start-iceberg-rest-server.sh from init? should we invoke start independently
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470034873
##########
packaging/src/docker/thirdparties/gravitino/gravitino/init.sh:
##########
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Copy Gravitino start script
+cp /tmp/gravitino/start-iceberg-rest-server.sh /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
+
+# Copy Gravitino config file
+cp /tmp/gravitino/gravitino-iceberg-rest-server.conf /root/gravitino-iceberg-rest-server/conf/gravitino-iceberg-rest-server.conf
+
+# Download H2 Driver to Gravitino libs folder
+mkdir -p /root/gravitino-iceberg-rest-server/libs
+curl -L -o /root/gravitino-iceberg-rest-server/libs/h2-2.2.220.jar https://repo1.maven.org/maven2/com/h2database/h2/2.2.220/h2-2.2.220.jar
+
+/bin/bash /root/gravitino-iceberg-rest-server/bin/start-iceberg-rest-server.sh
Review Comment:
why do we call start-iceberg-rest-server.sh within the init.sh? should we call start directly from yaml to know what step failed?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470088629
##########
packaging/src/docker/thirdparties/polaris/docker-compose.yml:
##########
@@ -0,0 +1,94 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: "3.9"
Review Comment:
version ?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470031604
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
We are not doing that manually in the root hive docker-compose because it downloads it from `"https://downloads.apache.org/hive/hive-$HIVE_VERSION/$HIVE_FILE_NAME"}`. But HiveRESTCatalogClient is not present in 4.1.0 release.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470032583
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
Review Comment:
Fixed.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470123973
##########
packaging/src/docker/thirdparties/polaris/docker-compose.yml:
##########
@@ -0,0 +1,94 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: "3.9"
Review Comment:
same
##########
packaging/src/docker/thirdparties/gravitino/docker-compose.yml:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: "3.9"
Review Comment:
> `version: '3.9'`
> at the top of a docker-compose.yml file refers to the Compose file format version, not the Docker or Docker Compose tool version itself.
>
> 🧩 What it actually means
> It tells Docker which syntax and features are supported in this Compose file.
>
> 3.9 is the latest version of the v3 schema, which is compatible with modern Docker Engine (19.03+).
The existing Hive docker-compose file also has 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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "difin (via GitHub)" <gi...@apache.org>.
difin commented on PR #6147:
URL: https://github.com/apache/hive/pull/6147#issuecomment-3457983375
Thanks, @deniskuzZ for code review!
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose setups for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470106705
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This package contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
Review Comment:
where is the init container in case of gravitino?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29285: Iceberg: Add docker-compose examples for REST Catalog int… [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6147:
URL: https://github.com/apache/hive/pull/6147#discussion_r2470008902
##########
packaging/src/docker/thirdparties/gravitino/README.md:
##########
@@ -0,0 +1,248 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# Hive + Gravitino + Keycloak: Docker-Compose Setup
+
+This repository contains a docker-compose-based setup integrating Apache Hive, Gravitino Iceberg REST server, and Keycloak for OAuth2 authentication. It allows Hive to use an Iceberg REST catalog secured via Keycloak.
+
+## Table of Contents
+- Architecture Overview
+- Prerequisites
+- Quickstart
+- Configuration
+ - Keycloak
+ - Gravitino
+ - Hive
+- Networking Notes
+
+## Architecture Overview
+This diagram illustrates the key docker-compose components and their interactions in this setup:
+
+```
+ oAuth2 (REST API)
+ +-------------------------------------------------------------------+
+ | |
+ | v
++--------+----------+ +-------------------+ +-----------------+
+| | RESTCatalog | | oauth2 | |
+| Hive | (REST API) | Gravitino | (REST API) | Keycloak |
+| (HiveServer2) +-------------->| Iceberg REST +----------->| OAuth2 Auth |
+| | | Server | | Server |
++--------+----------+ +---------+---------+ +-----------------+
+ | |
+ data | metadata files |
+ files +------------------------------------+
+ |
+ v
++-------------------+ +-------------------+
+| | creates dir | |
+| /warehouse |<--------------+ init |
+| (Docker volume) | sets | container |
+| | permissions | |
++-------------------+ +-------------------+
+```
+
+- Hive:
+ - Runs HiveServer2, connects to Gravitino via Iceberg REST catalog.
+ - Write Iceberg data files to the shared warehouse volume.
+- Gravitino:
+ - Exposes REST API for Iceberg catalog.
+ - Writes Iceberg metadata files to shared warehouse volume (.metadata.json).
+ - Doesn't supports serving as oauth2 provider, so this example uses an external OAuth2 provider (Keyclock).
+- Keycloak:
+ - OAuth2 server providing authentication and token issuance for Hive/Gravitino.
+- /warehouse:
+ - Shared Docker volume for Iceberg table data and metadata.
+- Init container:
+ - Creates shared /warehouse folder and sets filesystem permissions as a one time initialization step.
+
+## Prerequisites
+- Docker & Docker Compose
+- Java (for local Hive beeline client)
+- ```$HIVE_HOME``` environment variable pointing to Hive installation (for connecting to Beeline)
+
+## Quickstart
+### STEP 1: Build Hive Docker Image
+- Currently, only Hive 4.2.0-SNAPSHOT has the required Iceberg REST catalog client.
+- To build the Hive Docker image with Iceberg REST catalog client on your local machine, follow these steps:
+ - Build Hive using Docker profile.
+ - Copy ```apache-hive-4.2.0-SNAPSHOT-bin.tar.gz``` to ```packaging/cache``` folder.
Review Comment:
why do we need to copy the jar?
we are not doing that manually for the base hive docker-compose
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org