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

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new aa06fc743 [#4389]  fix(iceberg-rest-server): add conf directory to 
classpath if starting standalone Iceberg REST catalog server in Gravitino 
package (#4390)
aa06fc743 is described below

commit aa06fc74349a5a798a38bbc14988efa7d32b44ef
Author: FANNG <[email protected]>
AuthorDate: Tue Aug 6 19:13:47 2024 +0800

    [#4389]  fix(iceberg-rest-server): add conf directory to classpath if 
starting standalone Iceberg REST catalog server in Gravitino package (#4390)
    
    ### What changes were proposed in this pull request?
    add conf directory to classpath if starting standalone Iceberg REST
    catalog server in Gravitino package
    
    ### Why are the changes needed?
    
    Fix: #4389
    
    ### Does this PR introduce _any_ user-facing change?
    no
    
    ### How was this patch tested?
    start Iceberg REST server and check classpath
---
 bin/common.sh                        | 6 ++++++
 bin/gravitino-iceberg-rest-server.sh | 1 +
 2 files changed, 7 insertions(+)

diff --git a/bin/common.sh b/bin/common.sh
index 7aa3681af..f06775080 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 9236d5a50..d0b3349bb 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

Reply via email to