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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to