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

spricoder pushed a commit to branch object_type_tiff
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/object_type_tiff by this push:
     new 2b0a51c3a7c 修改启动代码
2b0a51c3a7c is described below

commit 2b0a51c3a7ca8ca862d07bfe914758820060b27f
Author: spricoder <[email protected]>
AuthorDate: Sat Aug 16 16:43:45 2025 +0800

    修改启动代码
---
 scripts/sbin/start-datanode.sh | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/scripts/sbin/start-datanode.sh b/scripts/sbin/start-datanode.sh
index 0b0e958ba91..468061f2dca 100755
--- a/scripts/sbin/start-datanode.sh
+++ b/scripts/sbin/start-datanode.sh
@@ -26,8 +26,6 @@ foreground="yes"
 
 IOTDB_HEAP_DUMP_COMMAND=""
 
-CLASSPATH=""
-
 if [ $# -ne 0 ]; then
   echo "All parameters are $*"
 fi
@@ -72,6 +70,15 @@ while true; do
             IOTDB_JVM_OPTS="$IOTDB_JVM_OPTS -XX:$2"
             shift 2
         ;;
+
+        -l)
+            IOTDB_LIBRARY_PATH="$2"
+            shift 2
+        ;;
+        -t)
+            GDAL_CLASSPATH="$2"
+            shift 2
+        ;;
         -h)
             echo "Usage: $0 [-v] [-f] [-d] [-h] [-p pidfile] [-c configFolder] 
[-H HeapDumpPath] [-E JvmErrorFile] [printgc]"
             exit 0
@@ -80,14 +87,6 @@ while true; do
             SHOW_VERSION="yes"
             break
         ;;
-        -l)
-            LIBRARY_PATH="$2"
-            shift 2
-        ;;
-        -t)
-            CLASSPATH="$2"
-            shift 2
-        ;;
         --)
             shift
             #all others are args to the program
@@ -118,9 +117,11 @@ checkAllVariables
 #checkDataNodePortUsages is in iotdb-common.sh
 checkDataNodePortUsages
 
+CLASSPATH=""
 for f in "${IOTDB_HOME}"/lib/*.jar; do
   CLASSPATH=${CLASSPATH}":"$f
 done
+CLASSPATH=${CLASSPATH}":"${GDAL_CLASSPATH}
 
 classname=org.apache.iotdb.db.service.DataNode
 
@@ -173,7 +174,7 @@ launch_service()
        iotdb_parms="$iotdb_parms -Dname=iotdb\.IoTDB"
        iotdb_parms="$iotdb_parms -DIOTDB_LOG_DIR=${IOTDB_LOG_DIR}"
        iotdb_parms="$iotdb_parms -DOFF_HEAP_MEMORY=${OFF_HEAP_MEMORY}"
-       iotdb_parms="$iotdb_parms -Djava.library.path=${LIBRARY_PATH}"
+       iotdb_parms="$iotdb_parms -Djava.library.path=${IOTDB_LIBRARY_PATH}"
 
          if [ "x$pidfile" != "x" ]; then
        iotdb_parms="$iotdb_parms -Diotdb-pidfile=$pidfile"

Reply via email to