From bb5c5b3ce704f87541d92d8adf92646af17bc902 Mon Sep 17 00:00:00 2001 From: fjy Date: Fri, 25 Jul 2014 10:50:41 -0700 Subject: [PATCH] fix config with broker select and add docs --- docs/content/Broker-Config.md | 3 +++ .../java/io/druid/client/selector/TierSelectorStrategy.java | 2 +- services/src/main/java/io/druid/cli/CliBroker.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/content/Broker-Config.md b/docs/content/Broker-Config.md index da4c8a9db5d..6da606c70e4 100644 --- a/docs/content/Broker-Config.md +++ b/docs/content/Broker-Config.md @@ -14,6 +14,9 @@ The broker module uses several of the default modules in [Configuration](Configu |--------|---------------|-----------|-------| |`druid.broker.cache.type`|`local`, `memcached`|The type of cache to use for queries.|`local`| |`druid.broker.balancer.type`|`random`, `connectionCount`|Determines how the broker balances connections to historical nodes. `random` choose randomly, `connectionCount` picks the node with the fewest number of active connections to|`random`| +|`druid.broker.select.tier`|`highestPriority`, `lowestPriority`, `custom`|If segments are cross-replicated across tiers in a cluster, you can tell the broker to prefer to select segments in a tier with a certain priority.|`highestPriority`| +|`druid.broker.select.tier.custom.priorities`|`An array of integer priorities.`|Select servers in tiers with a custom priority list.|None| + #### Local Cache diff --git a/server/src/main/java/io/druid/client/selector/TierSelectorStrategy.java b/server/src/main/java/io/druid/client/selector/TierSelectorStrategy.java index cadbd435478..715962f0e80 100644 --- a/server/src/main/java/io/druid/client/selector/TierSelectorStrategy.java +++ b/server/src/main/java/io/druid/client/selector/TierSelectorStrategy.java @@ -29,7 +29,7 @@ import java.util.TreeMap; /** */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = HighestPriorityTierSelectorStrategy.class) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "tier", defaultImpl = HighestPriorityTierSelectorStrategy.class) @JsonSubTypes(value = { @JsonSubTypes.Type(name = "highestPriority", value = HighestPriorityTierSelectorStrategy.class), @JsonSubTypes.Type(name = "lowestPriority", value = LowestPriorityTierSelectorStrategy.class), diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java index 2381c13d282..f23102bccdd 100644 --- a/services/src/main/java/io/druid/cli/CliBroker.java +++ b/services/src/main/java/io/druid/cli/CliBroker.java @@ -85,7 +85,7 @@ public class CliBroker extends ServerRunnable binder.bind(Cache.class).toProvider(CacheProvider.class).in(ManageLifecycle.class); JsonConfigProvider.bind(binder, "druid.broker.cache", CacheProvider.class); JsonConfigProvider.bind(binder, "druid.broker.cache", CacheConfig.class); - JsonConfigProvider.bind(binder, "druid.broker.select.tier", TierSelectorStrategy.class); + JsonConfigProvider.bind(binder, "druid.broker.select", TierSelectorStrategy.class); JsonConfigProvider.bind(binder, "druid.broker.select.tier.custom", CustomTierSelectorStrategyConfig.class); JsonConfigProvider.bind(binder, "druid.broker.balancer", ServerSelectorStrategy.class);