This is an automated email from the ASF dual-hosted git repository.

yihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 731bd8a04029 feat: adding support for trino in notebooks (#14242)
731bd8a04029 is described below

commit 731bd8a04029559b3f2ceca2aaf9a36de8efb045
Author: deepakpanda93 <[email protected]>
AuthorDate: Mon Nov 24 12:34:59 2025 +0530

    feat: adding support for trino in notebooks (#14242)
---
 hudi-notebooks/Dockerfile.trino                   | 20 ++++++++++++++++++
 hudi-notebooks/build.sh                           | 10 +++++++++
 hudi-notebooks/conf/trino/catalog/hive.properties | 18 ++++++++++++++++
 hudi-notebooks/conf/trino/catalog/hudi.properties | 25 +++++++++++++++++++++++
 hudi-notebooks/docker-compose.yml                 | 11 ++++++++++
 5 files changed, 84 insertions(+)

diff --git a/hudi-notebooks/Dockerfile.trino b/hudi-notebooks/Dockerfile.trino
new file mode 100644
index 000000000000..7643b7bab067
--- /dev/null
+++ b/hudi-notebooks/Dockerfile.trino
@@ -0,0 +1,20 @@
+#  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.
+
+ARG TRINO_VERSION=${TRINO_VERSION:-477}
+
+FROM trinodb/trino:${TRINO_VERSION}
+COPY conf/trino /etc/trino
diff --git a/hudi-notebooks/build.sh b/hudi-notebooks/build.sh
index 56c266487066..683dc4141901 100644
--- a/hudi-notebooks/build.sh
+++ b/hudi-notebooks/build.sh
@@ -22,6 +22,8 @@ export HUDI_VERSION_TAG=${HUDI_VERSION}
 export SPARK_VERSION=3.5.7
 export HIVE_VERSION=3.1.3
 export HIVE_VERSION_TAG=${HIVE_VERSION}
+export TRINO_VERSION=477
+export TRINO_VERSION_TAG=${TRINO_VERSION}
 
 SCRIPT_DIR=$(cd $(dirname $0); pwd)
 
@@ -43,3 +45,11 @@ docker build \
     -t apachehudi/hive:latest \
     -t apachehudi/hive:"$HIVE_VERSION_TAG" \
     -f "$SCRIPT_DIR"/Dockerfile.hive .
+
+echo "Building Trino Docker image using Trino version: $TRINO_VERSION"
+
+docker build \
+    --build-arg TRINO_VERSION="$TRINO_VERSION" \
+    -t apachehudi/trino:latest \
+    -t apachehudi/trino:"$TRINO_VERSION_TAG" \
+    -f "$SCRIPT_DIR"/Dockerfile.trino .
diff --git a/hudi-notebooks/conf/trino/catalog/hive.properties 
b/hudi-notebooks/conf/trino/catalog/hive.properties
new file mode 100644
index 000000000000..4a985fc17aff
--- /dev/null
+++ b/hudi-notebooks/conf/trino/catalog/hive.properties
@@ -0,0 +1,18 @@
+#  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.
+
+connector.name=hive
+hive.metastore.uri=thrift://hive-metastore:9083
diff --git a/hudi-notebooks/conf/trino/catalog/hudi.properties 
b/hudi-notebooks/conf/trino/catalog/hudi.properties
new file mode 100644
index 000000000000..318191282750
--- /dev/null
+++ b/hudi-notebooks/conf/trino/catalog/hudi.properties
@@ -0,0 +1,25 @@
+#  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.
+
+connector.name=hudi
+hive.metastore.uri=thrift://hive-metastore:9083
+# S3 / MinIO configuration
+fs.native-s3.enabled=true
+s3.aws-access-key=admin
+s3.aws-secret-key=password
+s3.endpoint=http://minio:9000
+s3.path-style-access=true
+s3.region=us-east-1
diff --git a/hudi-notebooks/docker-compose.yml 
b/hudi-notebooks/docker-compose.yml
index 8ec48d1de25e..d6c66be21f17 100644
--- a/hudi-notebooks/docker-compose.yml
+++ b/hudi-notebooks/docker-compose.yml
@@ -90,6 +90,17 @@ services:
     networks:
       - hudi-datalake
 
+  trino:
+    image: apachehudi/trino:latest
+    container_name: trino
+    depends_on:
+      - hive-metastore
+      - minio
+    ports:
+      - "8085:8080"   # Trino Web UI
+    networks:
+      - hudi-datalake
+
 networks:
   hudi-datalake:
     name: hudi-datalake

Reply via email to