Specify node type so that the log filename can get resolved (#16282)

* specify node type so that the log filename can get resolved

* Update distribution/docker/druid.sh

Co-authored-by: Benedict Jin <asdf2014@apache.org>

---------

Co-authored-by: Benedict Jin <asdf2014@apache.org>
This commit is contained in:
Sensor 2024-05-06 22:12:11 +08:00 committed by GitHub
parent a2223ce821
commit ac42737242
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -172,6 +172,9 @@ if [ -n "$DRUID_MAXDIRECTMEMORYSIZE" ]; then setJavaKey ${SERVICE} -XX:MaxDirect
# However this behavior is not part of the spec and is thus implementation specific # However this behavior is not part of the spec and is thus implementation specific
JAVA_OPTS="$(cat $SERVICE_CONF_DIR/jvm.config | xargs) $JAVA_OPTS" JAVA_OPTS="$(cat $SERVICE_CONF_DIR/jvm.config | xargs) $JAVA_OPTS"
# Specify node type used for log4j2.xml
JAVA_OPTS="-Ddruid.node.type=$SERVICE $JAVA_OPTS"
if [ -n "$DRUID_LOG_LEVEL" ] if [ -n "$DRUID_LOG_LEVEL" ]
then then
sed -ri 's/"info"/"'$DRUID_LOG_LEVEL'"/g' $COMMON_CONF_DIR/log4j2.xml sed -ri 's/"info"/"'$DRUID_LOG_LEVEL'"/g' $COMMON_CONF_DIR/log4j2.xml