From 9fd8ab3c750c57dae3a6cf2608b9ee3e83e2614f Mon Sep 17 00:00:00 2001 From: wiquan Date: Mon, 29 Aug 2022 05:13:53 -0700 Subject: [PATCH] [Issue 10331] Fresh Docker install results in "Uh... I have no servers. Not assigning anything... (#12963) * add env var DRUID_SINGLE_NODE_CONF * no message * typo fix Co-authored-by: Wil Quan --- distribution/docker/druid.sh | 22 ++++++++++++++++++++++ distribution/docker/environment | 11 ++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/distribution/docker/druid.sh b/distribution/docker/druid.sh index ec6387c4773..82e7c8a001f 100755 --- a/distribution/docker/druid.sh +++ b/distribution/docker/druid.sh @@ -37,6 +37,7 @@ # # - DRUID_CONFIG_COMMON -- full path to a file for druid 'common' properties # - DRUID_CONFIG_${service} -- full path to a file for druid 'service' properties +# - DRUID_SINGLE_NODE_CONF -- config to use at runtime. Choose from: {large, medium, micro-quickstart, nano-quickstart, small, xlarge} set -e SERVICE="$1" @@ -50,6 +51,27 @@ test -d /tmp/conf/druid && rm -r /tmp/conf/druid cp -r /opt/druid/conf/druid /tmp/conf/druid getConfPath() { + if [ -n "$DRUID_SINGLE_NODE_CONF" ] + then + getSingleServerConfPath $1 + else + getClusterConfPath $1 + fi +} +getSingleServerConfPath() { + cluster_conf_base=/tmp/conf/druid/single-server + case "$1" in + _common) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/_common ;; + historical) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/historical ;; + middleManager) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/middleManager ;; +# indexer) echo $cluster_conf_base/data/indexer ;; + coordinator | overlord) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/coordinator-overlord ;; + broker) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/broker ;; + router) echo $cluster_conf_base/$DRUID_SINGLE_NODE_CONF/router ;; + *) echo $cluster_conf_base/misc/$1 ;; + esac +} +getClusterConfPath() { cluster_conf_base=/tmp/conf/druid/cluster case "$1" in _common) echo $cluster_conf_base/_common ;; diff --git a/distribution/docker/environment b/distribution/docker/environment index 7bb9214a701..99f54a33f2f 100644 --- a/distribution/docker/environment +++ b/distribution/docker/environment @@ -18,11 +18,12 @@ # # Java tuning -DRUID_XMX=1g -DRUID_XMS=1g -DRUID_MAXNEWSIZE=250m -DRUID_NEWSIZE=250m -DRUID_MAXDIRECTMEMORYSIZE=6172m +#DRUID_XMX=1g +#DRUID_XMS=1g +#DRUID_MAXNEWSIZE=250m +#DRUID_NEWSIZE=250m +#DRUID_MAXDIRECTMEMORYSIZE=6172m +DRUID_SINGLE_NODE_CONF=micro-quickstart druid_emitter_logging_logLevel=debug