This is an automated email from the ASF dual-hosted git repository.
critas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 12ddd33db6b recover the place of setting ON_HEAP_MEMORY and
OFF_HEAP_MEMORY to fix atmos (#15421)
12ddd33db6b is described below
commit 12ddd33db6b324cd3a87393690818b1aaa99fa17
Author: changxue2022 <[email protected]>
AuthorDate: Sun Apr 27 19:05:07 2025 +0800
recover the place of setting ON_HEAP_MEMORY and OFF_HEAP_MEMORY to fix
atmos (#15421)
* docker: support configuring JVM memory environment variables in
docker-compose file:IOTDB_JMX_OPTS for datanode,CONFIGNODE_JMX_OPTS for
confignode
* recover the place of setting ON_HEAP_MEMORY and OFF_HEAP_MEMORY to fix
atmos
---
scripts/conf/confignode-env.sh | 18 +++++++++---------
scripts/conf/datanode-env.sh | 17 ++++++++---------
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/scripts/conf/confignode-env.sh b/scripts/conf/confignode-env.sh
index aa19da4ebea..e251f3939c2 100644
--- a/scripts/conf/confignode-env.sh
+++ b/scripts/conf/confignode-env.sh
@@ -20,10 +20,6 @@
# You can set ConfigNode memory size, example '2G' or '2048M'
MEMORY_SIZE=
-# on heap memory size
-#ON_HEAP_MEMORY="2G"
-# off heap memory size
-#OFF_HEAP_MEMORY="512M"
# You can put your env variable here
# export JAVA_HOME=$JAVA_HOME
@@ -254,7 +250,15 @@ else
fi
-if [[ "$CONFIGNODE_JMX_OPTS" =~ -Xms ]];then
+calculate_memory_sizes
+
+# on heap memory size
+#ON_HEAP_MEMORY="2G"
+# off heap memory size
+#OFF_HEAP_MEMORY="512M"
+
+# configure JVM memory with setting environment variable of CONFIGNODE_JMX_OPTS
+if [[ "$CONFIGNODE_JMX_OPTS" =~ -Xmx ]];then
item_arr=(${CONFIGNODE_JMX_OPTS})
for item in ${item_arr[@]};do
if [[ -n "$item" ]]; then
@@ -265,10 +269,6 @@ if [[ "$CONFIGNODE_JMX_OPTS" =~ -Xms ]];then
fi
fi
done
-elif [[ -n "$ON_HEAP_MEMORY" ]]; then
- echo "ON_HEAP_MEMORY=$ON_HEAP_MEMORY"
-else
- calculate_memory_sizes
fi
diff --git a/scripts/conf/datanode-env.sh b/scripts/conf/datanode-env.sh
index b1e9e342485..be64cce712b 100755
--- a/scripts/conf/datanode-env.sh
+++ b/scripts/conf/datanode-env.sh
@@ -20,10 +20,6 @@
# You can set DataNode memory size, example '2G' or '2048M'
MEMORY_SIZE=
-# on heap memory size
-#ON_HEAP_MEMORY="2G"
-# off heap memory size
-#OFF_HEAP_MEMORY="512M"
# You can put your env variable here
@@ -265,8 +261,15 @@ else
illegal_access_params="$illegal_access_params
--add-opens=java.base/java.net=ALL-UNNAMED"
fi
+calculate_memory_sizes
+
+# on heap memory size
+#ON_HEAP_MEMORY="2G"
+# off heap memory size
+#OFF_HEAP_MEMORY="512M"
-if [[ "$IOTDB_JMX_OPTS" =~ -Xms ]];then
+# configure JVM memory with set environment variable of IOTDB_JMX_OPTS
+if [[ "$IOTDB_JMX_OPTS" =~ -Xmx ]];then
item_arr=(${IOTDB_JMX_OPTS})
for item in ${item_arr[@]};do
if [[ -n "$item" ]]; then
@@ -277,10 +280,6 @@ if [[ "$IOTDB_JMX_OPTS" =~ -Xms ]];then
fi
fi
done
-elif [[ -n "$ON_HEAP_MEMORY" ]]; then
- echo "ON_HEAP_MEMORY=$ON_HEAP_MEMORY"
-else
- calculate_memory_sizes
fi