diff --git a/resources/attributes/default.rb b/resources/attributes/default.rb index 62dd466f..6477e968 100644 --- a/resources/attributes/default.rb +++ b/resources/attributes/default.rb @@ -211,5 +211,7 @@ default["redborder"]["druid"]["historical"]["tier"] = "default" default["redborder"]["druid"]["historical"]["maxsize"] = -1 +# Realtime +default["redborder"]["druid"]["realtime"]["partition_num"] = 0 default["redborder"]["pending_changes"]=0 diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index 7f118d36..68d46547 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -136,6 +136,8 @@ druid_realtime "Configure Druid Realtime" do name node["hostname"] ipaddress node["ipaddress_sync"] + zookeeper_hosts node["redborder"]["zookeeper"]["zk_hosts"] + partition_num node["redborder"]["druid"]["realtime"]["partition_num"] memory_kb node["redborder"]["memory_services"]["druid-realtime"]["memory"] action (manager_services["druid-realtime"] ? [:add, :register] : [:remove, :deregister]) end diff --git a/resources/recipes/prepare_system.rb b/resources/recipes/prepare_system.rb index 02cbda1c..3a8eac8e 100644 --- a/resources/recipes/prepare_system.rb +++ b/resources/recipes/prepare_system.rb @@ -108,6 +108,11 @@ node.default["redborder"]["kafka"]["host_index"] = node["redborder"]["managers_per_services"]["kafka"].index(node.name) end +#set druid realtime partition id (its needed in cluster mode for druid brokers) +if node["redborder"]["managers_per_services"]["druid-realtime"].include?(node.name) + node.default["redborder"]["druid"]["realtime"]["partition_num"] = node["redborder"]["managers_per_services"]["druid-realtime"].index(node.name) +end + #get an array of managers managers_list = [] node["redborder"]["cluster_info"].each_key do |mgr|