Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions distribution/src/assembly/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,21 @@
<excludes>
<exclude>ainode-env.*</exclude>
<exclude>**/ainode-env.*</exclude>
<exclude>iotdb-common.sh</exclude>
<exclude>**/iotdb-locale.*</exclude>
</excludes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<includes>
<include>iotdb-common.sh</include>
<include>windows/iotdb-locale.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<outputDirectory>sbin</outputDirectory>
<directory>${project.basedir}/../scripts/sbin</directory>
Expand Down
11 changes: 10 additions & 1 deletion distribution/src/assembly/confignode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,21 @@
<directory>${project.basedir}/../scripts/conf</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>iotdb-common.*</include>
<include>confignode-env.*</include>
<include>**/confignode-env.*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../scripts/conf</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>iotdb-common.sh</include>
<include>windows/iotdb-locale.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../scripts/sbin</directory>
<outputDirectory>sbin</outputDirectory>
Expand Down
14 changes: 14 additions & 0 deletions integration-test/src/assembly/mpp-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<excludes>
<exclude>iotdb-common.sh</exclude>
<exclude>**/iotdb-locale.*</exclude>
</excludes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${project.basedir}/../scripts/conf</directory>
<includes>
<include>iotdb-common.sh</include>
<include>windows/iotdb-locale.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
Expand Down
10 changes: 10 additions & 0 deletions iotdb-core/confignode/src/assembly/confignode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../scripts/conf</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>windows/iotdb-locale.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../scripts/sbin</directory>
<outputDirectory>sbin</outputDirectory>
Expand Down Expand Up @@ -72,6 +81,7 @@
<file>
<source>${project.basedir}/../../scripts/conf/iotdb-common.sh</source>
<destName>conf/iotdb-common.sh</destName>
<filtered>true</filtered>
</file>
</files>
</assembly>
12 changes: 11 additions & 1 deletion iotdb-core/datanode/src/assembly/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../scripts/conf</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>windows/iotdb-locale.bat</include>
</includes>
<filtered>true</filtered>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../scripts/sbin</directory>
<outputDirectory>sbin</outputDirectory>
Expand All @@ -70,10 +79,11 @@
<source>${project.basedir}/../node-commons/src/assembly/resources/conf/iotdb-system.properties</source>
<destName>conf/iotdb-system.properties</destName>
</file>
<!-- copy iotdb-common.sh to different script folders-->
<!-- copy iotdb-common.sh to different script folders (filtered for tsfile.locale.opt) -->
<file>
<source>${project.basedir}/../../scripts/conf/iotdb-common.sh</source>
<destName>conf/iotdb-common.sh</destName>
<filtered>true</filtered>
</file>
</files>
</assembly>
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<zstd-jni.version>1.5.6-3</zstd-jni.version>
<tsfile.version>2.3.0-260422-SNAPSHOT</tsfile.version>
<i18n.locale>en</i18n.locale>
<tsfile.locale.opt></tsfile.locale.opt>
</properties>
<!--
if we claim dependencies in dependencyManagement, then we do not claim
Expand Down Expand Up @@ -2026,6 +2027,7 @@
<id>with-zh-locale</id>
<properties>
<i18n.locale>zh</i18n.locale>
<tsfile.locale.opt>-Dtsfile.locale=zh</tsfile.locale.opt>
</properties>
</profile>
</profiles>
Expand Down
7 changes: 7 additions & 0 deletions scripts/conf/confignode-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ if [[ ! "$CONFIGNODE_JMX_OPTS" =~ -XX:MaxDirectMemorySize ]]; then CONFIGNODE_JM
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -Djdk.nio.maxCachedBufferSize=${MAX_CACHED_BUFFER_SIZE}"
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -XX:+CrashOnOutOfMemoryError"
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"

# Append tsfile locale option populated by Maven at package time
# (see conf/iotdb-common.sh; empty in default build, "-Dtsfile.locale=zh" under with-zh-locale).
if [ -n "$TSFILE_LOCALE_JVM_OPT" ]; then
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS $TSFILE_LOCALE_JVM_OPT"
fi

# if you want to dump the heap memory while OOM happening, you can use the following command, remember to replace ${heap_dump_dir}/confignode_heapdump.hprof with your own file path and the folder where this file is located needs to be created in advance
#CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${heap_dump_dir}/confignode_heapdump.hprof"

Expand Down
6 changes: 6 additions & 0 deletions scripts/conf/datanode-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:SafepointTimeoutDelay=1000"
IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+SafepointTimeout"
IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"

# Append tsfile locale option populated by Maven at package time
# (see conf/iotdb-common.sh; empty in default build, "-Dtsfile.locale=zh" under with-zh-locale).
if [ -n "$TSFILE_LOCALE_JVM_OPT" ]; then
IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS $TSFILE_LOCALE_JVM_OPT"
fi

# option below tries to optimize safepoint stw time for large counted loop.
# NOTE: it may have an impact on JIT's black-box optimization.
# IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+UseCountedLoopSafepoints"
Expand Down
6 changes: 6 additions & 0 deletions scripts/conf/iotdb-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
# under the License.
#

# JVM option for selecting tsfile's runtime locale (log/exception messages).
# Filtered by Maven at package time:
# - Default build: empty (English).
# - `with-zh-locale` profile: "-Dtsfile.locale=zh".
TSFILE_LOCALE_JVM_OPT="@tsfile.locale.opt@"


# this function is for parsing the variables like "A=B" in `start-server.sh -D A=B`
# The command just parse IOTDB-prefixed variables and ignore all other variables
Expand Down
9 changes: 9 additions & 0 deletions scripts/conf/windows/confignode-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,14 @@ IF "%JAVA_VERSION%" == "8" (
--add-opens=java.base/java.net=ALL-UNNAMED
)

@REM Apply tsfile locale option populated by Maven at package time
@REM (see conf\windows\iotdb-locale.bat; empty in default build, -Dtsfile.locale=zh under with-zh-locale).
IF EXIST "%CONFIGNODE_CONF%\windows\iotdb-locale.bat" (
CALL "%CONFIGNODE_CONF%\windows\iotdb-locale.bat"
IF NOT "%TSFILE_LOCALE_JVM_OPT%"=="" (
set CONFIGNODE_JMX_OPTS=%CONFIGNODE_JMX_OPTS% %TSFILE_LOCALE_JVM_OPT%
)
)

echo ConfigNode on heap memory size = %ON_HEAP_MEMORY%B, off heap memory size = %OFF_HEAP_MEMORY%B
echo If you want to change this configuration, please check conf/windows/confignode-env.bat.
9 changes: 9 additions & 0 deletions scripts/conf/windows/datanode-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,14 @@ IF "%JAVA_VERSION%" == "8" (
--add-opens=java.base/java.net=ALL-UNNAMED
)

@REM Apply tsfile locale option populated by Maven at package time
@REM (see conf\windows\iotdb-locale.bat; empty in default build, -Dtsfile.locale=zh under with-zh-locale).
IF EXIST "%IOTDB_CONF%\windows\iotdb-locale.bat" (
CALL "%IOTDB_CONF%\windows\iotdb-locale.bat"
IF NOT "%TSFILE_LOCALE_JVM_OPT%"=="" (
set IOTDB_JMX_OPTS=%IOTDB_JMX_OPTS% %TSFILE_LOCALE_JVM_OPT%
)
)

echo DataNode on heap memory size = %ON_HEAP_MEMORY%B, off heap memory size = %OFF_HEAP_MEMORY%B
echo If you want to change this configuration, please check conf/windows/datanode-env.bat.
24 changes: 24 additions & 0 deletions scripts/conf/windows/iotdb-locale.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM

@REM JVM option for selecting tsfile's runtime locale (log/exception messages).
@REM This file is filtered by Maven at package time:
@REM - Default build: TSFILE_LOCALE_JVM_OPT is empty (English).
@REM - `with-zh-locale` profile: TSFILE_LOCALE_JVM_OPT=-Dtsfile.locale=zh.
set TSFILE_LOCALE_JVM_OPT=@tsfile.locale.opt@
Loading