Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#4389] fix(iceberg-rest-server): add conf directory to classpath if starting standalone Iceberg REST catalog server in Gravitino package (#4390)

FANNGaa06fc74349a
diff --git a/bin/common.sh b/bin/common.sh
index 7aa3681afa..f067750800 100644
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -90,6 +90,12 @@ function addJarInDir(){
fi
}
+function addDirToClasspath(){
+ if [[ -d "${1}" ]]; then
+ GRAVITINO_CLASSPATH="${1}:${GRAVITINO_CLASSPATH}"
+ fi
+}
+
if [[ -z "${GRAVITINO_MEM}" ]]; then
export GRAVITINO_MEM="-Xmx1024m"
fi
diff --git a/bin/gravitino-iceberg-rest-server.sh b/bin/gravitino-iceberg-rest-server.sh
index 9236d5a504..d0b3349bb5 100755
--- a/bin/gravitino-iceberg-rest-server.sh
+++ b/bin/gravitino-iceberg-rest-server.sh
@@ -180,6 +180,7 @@ fi
if [ -d "${GRAVITINO_HOME}/iceberg-rest-server/libs" ]; then
addJarInDir "${GRAVITINO_HOME}/iceberg-rest-server/libs"
+ addDirToClasspath "${GRAVITINO_HOME}/iceberg-rest-server/conf"
else
addJarInDir "${GRAVITINO_HOME}/libs"
fi