You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/08/24 20:52:31 UTC

[GitHub] [druid] wiquan opened a new pull request, #12963: [Issue 10331] Fresh Docker install results in "Uh... I have no servers. Not assigning anything...

wiquan opened a new pull request, #12963:
URL: https://github.com/apache/druid/pull/12963

   ## Fixes #10331 -  Fresh Docker install results in "Uh... I have no servers. Not assigning anything..."
   
   ### Description
   The docker-compose.yml file uses hardcoded 'conf/druid/single-server' configurations. 
   This results in OOM killed broker as described in [Issue#10331](https://github.com/apache/druid/issues/10331). 
   
   The suggestion was:
   > Maybe we should update the docker-compose settings to use either the "nano" or "micro" settings from https://druid.apache.org/docs/latest/operations/single-server.html. (Or have two docker-compose config bundles, one for "nano" and one for "micro".) That would probably help. A PR to do that would be great.
   
   This was the goal of this PR.
   
   The change was to include a new env var **DRUID_SINGLE_NODE_CONF** that takes a value from the list:
   - large 
   - medium
   - micro-quickstart
   - nano-quickstart 
   - small
   - xlarge
   
   This would get injected into the container via docker-compose env vars.
   Since I use this on my Mac M1, I have modified environment file to specify 'DRUID_SINGLE_NODE_CONF=micro-quickstart' .
   
   An example modified environment file is part of this PR.
   
   
   #### Fixed the bug 
   Since docker-compose files are typically for local development it made sense to use the smaller memory profiles. 
   
   I also create a multi-arch Docker image with buildx for my Mac M1 with support for:
   - linux/amd64
   - linux/arm64
   
   This can be provided if needed.
   
   
   ##### Key changed/added classes in this PR
    * `druid.sh` new shell functions for conf path resolution
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added documentation for new or modified features or behaviors.
   - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 commented on pull request #12963: [Issue 10331] Fresh Docker install results in "Uh... I have no servers. Not assigning anything...

Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 commented on PR #12963:
URL: https://github.com/apache/druid/pull/12963#issuecomment-1230204546

   Thank you for your contribution @wiquan. I have merged your PR since my comment was more of a nit. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 merged pull request #12963: [Issue 10331] Fresh Docker install results in "Uh... I have no servers. Not assigning anything...

Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 merged PR #12963:
URL: https://github.com/apache/druid/pull/12963


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 commented on a diff in pull request #12963: [Issue 10331] Fresh Docker install results in "Uh... I have no servers. Not assigning anything...

Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 commented on code in PR #12963:
URL: https://github.com/apache/druid/pull/12963#discussion_r955789625


##########
distribution/docker/druid.sh:
##########
@@ -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 ;;

Review Comment:
   nit:
   ```suggestion
       single_node_conf_base=/tmp/conf/druid/single-server/$DRUID_SINGLE_NODE_CONF
       case "$1" in
       _common) echo $single_node_conf_base/_common ;;
       historical) echo $single_node_conf_base/historical ;;
       middleManager) echo $single_node_conf_base/middleManager ;;
       coordinator | overlord) echo $single_node_conf_base/coordinator-overlord ;;
       broker) echo $single_node_conf_base/broker ;;
       router) echo $single_node_conf_base/router ;;
       *) echo $single_node_conf_base/misc/$1 ;;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org