Expected Replicants[2] on docker-druid


docker-druid is a single-node cluster, right?

Why does it have replicants set to 2, or why does this message seem to mean that, or where can I change this?

io.druid.server.coordinator.rules.LoadRule - Not enough [_default_tier] servers or node capacity to assign segment[wikipedia_2013-08-01T00:00:00.000Z_2013-08-02T00:00:00.000Z_2013-08-08T21:22:48.989Z]! Expected Replicants[2]



Logged as https://github.com/druid-io/docker-druid/issues/10

Druid by default tries to replicate every segment twice. The docker build only creates a single historical node, so not all segments are replicated.

Is there a way to set replicants to one (for docker)?

Any way to remove this check/warning?


You can set # of replicants to 1 in the coordinator console.

Although I strongly suggest you actually use https://hub.docker.com/r/imply/imply/ for a docker distribution as folks actively maintain that one.

Thanks Fangjin, We are already using the imply container and still getting this warning in the logs.
We are looking for a way to set number of replicants to one as part of deployment (ideal would have been a config file). Is there an existing way?

I believe the change from console is the manual, not easy to automate.



Hey Ashish,

Everything you can do in the console can also be done with an API (it is just calling the APIs from your browser – you can see this using your browser’s developer tools).

The number of replicants is part of the load rules, which you can edit through the “Rules” APIs described here: http://druid.io/docs/latest/design/coordinator.html

The format of the rules is documented here: http://druid.io/docs/latest/operations/rule-configuration.html

Thanks for the confirmation Gian.

A file-based config that can be bundled with deployment package would have been ideal.
We’re now a doing curl in a script after first startup of coordinator to do this. Build-time config files are easier…


For anyone facing this issue, here is the curl:

curl -H “Content-Type: application/json” -X POST -d ‘[{“tieredReplicants”:{"_default_tier":1},“type”:“loadForever”}]’ http://${HOST_IP}:8081/druid/coordinator/v1/rules/_default

This was useful to me just now, thank you!