This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino-playground.git
The following commit(s) were added to refs/heads/main by this push:
new 6334479 [MINOR] Update gravitino version to 1.3.0 (#155)
6334479 is described below
commit 6334479c4298afc531011dabb142d62d66cfc65c
Author: geyanggang <[email protected]>
AuthorDate: Mon Jun 29 18:52:11 2026 +0800
[MINOR] Update gravitino version to 1.3.0 (#155)
### What changes were proposed in this pull request?
Update version to 1.3.0
### Why are the changes needed?
Update version to 1.3.0
Fix: #(issue)
### Does this PR introduce _any_ user-facing change?
No need.
### How was this patch tested?
No
---
.env | 8 ++--
docker-compose.yaml | 5 ++-
init/gravitino/init.sh | 57 ++++++++++++++++++----------
init/jupyter/gravitino-fileset-example.ipynb | 4 +-
init/jupyter/gravitino_llamaIndex_demo.ipynb | 2 +-
5 files changed, 48 insertions(+), 28 deletions(-)
diff --git a/.env b/.env
index ab8d150..1a45a14 100644
--- a/.env
+++ b/.env
@@ -1,8 +1,8 @@
# Image tags for the docker-compose file
HIVE_IMAGE_TAG=hive-0.1.15
RANGER_IMAGE_TAG=ranger-0.1.0
-GRAVITINO_IMAGE_TAG=1.2.0
-TRINO_IMAGE_TAG=trino-478-gravitino-1.2.0
+GRAVITINO_IMAGE_TAG=1.3.0
+TRINO_IMAGE_TAG=trino-478-gravitino-1.3.0
POSTGRESQL_IMAGE_TAG=13
MYSQL_IMAGE_TAG=8.0
SPARK_IMAGE_TAG=3.4.1-scala2.12-java11-ubuntu
@@ -11,6 +11,6 @@ PROMETHEUS_IMAGE_TAG=v2.55.0
GRAFANA_IMAGE_TAG=11.3.0-ubuntu
# Gravitino jars for containers
-SPARK_CONNECTOR_JAR=gravitino-spark-connector-runtime-3.4_2.12-1.2.0.jar
+SPARK_CONNECTOR_JAR=gravitino-spark-connector-runtime-3.4_2.12-1.3.0.jar
-GRAVITINO_VERSION=1.2.0
+GRAVITINO_VERSION=1.3.0
diff --git a/docker-compose.yaml b/docker-compose.yaml
index b57a6cc..4df8f7d 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -55,6 +55,7 @@ services:
gravitino:
image: apache/gravitino:${GRAVITINO_IMAGE_TAG}
+ user: root
entrypoint: /bin/bash /tmp/gravitino/init.sh
ports:
- "8090:8090"
@@ -70,13 +71,13 @@ services:
volumes:
- ./healthcheck:/tmp/healthcheck
- ./init/gravitino:/tmp/gravitino
- - ./data/gravitino/db:/root/gravitino/data
+ - ./data/gravitino/db:/opt/gravitino/data
healthcheck:
test: ["CMD", "/tmp/healthcheck/gravitino-healthcheck.sh"]
interval: 5s
timeout: 60s
retries: 5
- start_period: 20s
+ start_period: 60s
trino:
image: apache/gravitino-playground:${TRINO_IMAGE_TAG}
diff --git a/init/gravitino/init.sh b/init/gravitino/init.sh
index 9676205..0b9245a 100644
--- a/init/gravitino/init.sh
+++ b/init/gravitino/init.sh
@@ -16,42 +16,59 @@
# specific language governing permissions and limitations
# under the License.
#
-echo "Start to download the jar package of JDBC"
-cp /tmp/gravitino/packages/mysql-connector-java-8.0.27.jar
/root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar
-cp /tmp/gravitino/packages/postgresql-42.2.7.jar
/root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.2.7.jar
-cp /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.2.7.jar
/root/gravitino/catalogs/lakehouse-iceberg/libs
-cp /root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar
/root/gravitino/catalogs/lakehouse-iceberg/libs
-cp /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.2.7.jar
/root/gravitino/iceberg-rest-server/libs
-cp /root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar
/root/gravitino/iceberg-rest-server/libs
+# Detect Gravitino installation path (1.3+ uses /opt/gravitino, older uses
/root/gravitino)
+if [ -d "/opt/gravitino/bin" ]; then
+ GRAVITINO_HOME="/opt/gravitino"
+else
+ GRAVITINO_HOME="/root/gravitino"
+fi
+
+echo "Using GRAVITINO_HOME=${GRAVITINO_HOME}"
+
+echo "Start to copy JDBC driver jars"
+# Copy JDBC drivers to catalog libs (1.3 image already has them via entrypoint
symlinks,
+# but we ensure they exist for both old and new images)
+if [ -f /tmp/gravitino/packages/mysql-connector-java-8.0.27.jar ]; then
+ cp -f /tmp/gravitino/packages/mysql-connector-java-8.0.27.jar
${GRAVITINO_HOME}/catalogs/jdbc-mysql/libs/ 2>/dev/null || true
+fi
+if [ -f /tmp/gravitino/packages/postgresql-42.2.7.jar ]; then
+ cp -f /tmp/gravitino/packages/postgresql-42.2.7.jar
${GRAVITINO_HOME}/catalogs/jdbc-postgresql/libs/ 2>/dev/null || true
+fi
-cp /tmp/gravitino/gravitino.conf /root/gravitino/conf
+# Copy JDBC drivers to lakehouse-iceberg and iceberg-rest-server libs
+for target_dir in "${GRAVITINO_HOME}/catalogs/lakehouse-iceberg/libs"
"${GRAVITINO_HOME}/iceberg-rest-server/libs"; do
+ if [ -d "${target_dir}" ]; then
+ cp -f /tmp/gravitino/packages/mysql-connector-java-8.0.27.jar
"${target_dir}/" 2>/dev/null || true
+ cp -f /tmp/gravitino/packages/postgresql-42.2.7.jar "${target_dir}/"
2>/dev/null || true
+ fi
+done
+
+# Copy gravitino.conf
+cp /tmp/gravitino/gravitino.conf ${GRAVITINO_HOME}/conf/gravitino.conf
# If auth is enabled, remove the PassThroughAuthorizer configuration
if [ "${GRAVITINO_AUTH_ENABLE}" == "true" ]; then
echo "Auth is enabled, removing PassThroughAuthorizer configuration..."
- sed -i '/gravitino.authorization.impl =
org.apache.gravitino.server.authorization.PassThroughAuthorizer/d'
/root/gravitino/conf/gravitino.conf
+ sed -i '/gravitino.authorization.impl =
org.apache.gravitino.server.authorization.PassThroughAuthorizer/d'
${GRAVITINO_HOME}/conf/gravitino.conf
fi
-# Ensure jq is installed; install quietly if missing
+# Ensure jq is installed; needed by job scripts
if ! command -v jq >/dev/null 2>&1; then
- apt-get update -qq && apt-get install -y -qq jq || { echo "Failed to install
jq" >&2; exit 1; }
-fi
-
-# Ensure host command is installed; install quietly if missing
-if ! command -v host >/dev/null 2>&1; then
- apt-get update -qq && apt-get install -y -qq host || { echo "Failed to
install host package" >&2; exit 1; }
+ echo "Installing jq..."
+ timeout 60 apt-get update -qq 2>/dev/null && timeout 60 apt-get install -y
-qq jq 2>/dev/null || echo "WARN: Failed to install jq" >&2
fi
# Resolve hive hostname to IP address and add to /etc/hosts
-IP=$(host hive 2>/dev/null | awk '/has address/ {print $4; exit}')
+IP=$(getent hosts hive | awk '{print $1; exit}')
if [ -z "$IP" ]; then
echo "Failed to resolve hostname 'hive'" >&2
exit 1
fi
echo "$IP hive" >> /etc/hosts
-echo "Finish downloading"
+
+echo "Finish setup"
echo "Start the Gravitino Server"
-/bin/bash /root/gravitino/bin/gravitino.sh start &
+/bin/bash ${GRAVITINO_HOME}/bin/gravitino.sh start &
sleep 3
-tail -f /root/gravitino/logs/gravitino-server.log
\ No newline at end of file
+tail -f ${GRAVITINO_HOME}/logs/gravitino-server.log
\ No newline at end of file
diff --git a/init/jupyter/gravitino-fileset-example.ipynb
b/init/jupyter/gravitino-fileset-example.ipynb
index 55a8da1..fda93b9 100644
--- a/init/jupyter/gravitino-fileset-example.ipynb
+++ b/init/jupyter/gravitino-fileset-example.ipynb
@@ -35,7 +35,9 @@
"id": "fcfb73be-e369-4543-b78d-fb1cd061c9e1",
"metadata": {},
"outputs": [],
- "source": "pip install apache-gravitino==1.2.0"
+ "source": [
+ "pip install apache-gravitino==1.3.0"
+ ]
},
{
"cell_type": "code",
diff --git a/init/jupyter/gravitino_llamaIndex_demo.ipynb
b/init/jupyter/gravitino_llamaIndex_demo.ipynb
index 6400641..6b2826b 100644
--- a/init/jupyter/gravitino_llamaIndex_demo.ipynb
+++ b/init/jupyter/gravitino_llamaIndex_demo.ipynb
@@ -54,7 +54,7 @@
"%pip install llama-index-readers-wikipedia\n",
"%pip install llama-index-llms-openai\n",
"%pip install llama-index\n",
- "%pip install apache-gravitino==1.2.0\n",
+ "%pip install apache-gravitino==1.3.0\n",
"%pip install sqlalchemy-trino"
]
},