y42 / clj-druid

Eclipse Public License 1.0
31 stars 10 forks source link

Wrong node-type in connect-with-zk docs #17

Closed slipset closed 7 years ago

slipset commented 7 years ago

Doc states:

(connect {:zk {:host "127.0.0.1:2181,my-other-zk-host:2181" ; can contain multiple hosts separated by commas
               :discovery-path "/druid/discovery"
               :node-type "broker"}})

At least in my environment, this should be

(connect {:zk {:host "127.0.0.1:2181,my-other-zk-host:2181" ; can contain multiple hosts separated by commas
               :discovery-path "/druid/discovery"
               :node-type "druid:broker"}})
msprunck commented 7 years ago

The :node-type is defined by each Druid node in the configuration file with the druid.service property (by default its value is druid/broker). The character / is replaced by :.

slipset commented 7 years ago

My problem was that in my environment trying to connect with

(connect {:zk {:host "127.0.0.1:2181,my-other-zk-host:2181" ; can contain multiple hosts separated by commas
               :discovery-path "/druid/discovery"
               :node-type "broker"}})

gave me an error indicating that druid could not be found. After digging around a bit, I found that zookeeper exposed this as druid:broker, hence the issue.

If this is just an artefact of our setup, please disregard this issue.

msprunck commented 7 years ago

The value druid:broker matches the default configuration of Druid. It is better to show an example with the default configuration.