From ac42737242f041bc8ecd4456afbb5b42a63c85d3 Mon Sep 17 00:00:00 2001 From: Sensor Date: Mon, 6 May 2024 22:12:11 +0800 Subject: [PATCH] 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 --------- Co-authored-by: Benedict Jin --- distribution/docker/druid.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribution/docker/druid.sh b/distribution/docker/druid.sh index 1f026882743..35f04c93566 100755 --- a/distribution/docker/druid.sh +++ b/distribution/docker/druid.sh @@ -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 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" ] then sed -ri 's/"info"/"'$DRUID_LOG_LEVEL'"/g' $COMMON_CONF_DIR/log4j2.xml