diff --git a/docs/content/Broker-Config.md b/docs/content/Broker-Config.md index 552320ac5835dbd77788a2d3e6a99028540932f8..44ece97958095140ec8d59fcaccf189ffd5be67b 100644 --- a/docs/content/Broker-Config.md +++ b/docs/content/Broker-Config.md @@ -81,7 +81,7 @@ druid.server.http.numThreads=50 druid.request.logging.type=emitter druid.request.logging.feed=druid_requests -druid.monitoring.monitors=["com.metamx.metrics.SysMonitor","com.metamx.metrics.JvmMonitor", "io.druid.client.cache.CacheMonitor"] +druid.monitoring.monitors=["com.metamx.metrics.SysMonitor","com.metamx.metrics.JvmMonitor"] # Emit metrics over http druid.emitter=http @@ -106,16 +106,16 @@ The broker module uses several of the default modules in [Configuration](Configu |Property|Description|Default| |--------|-----------|-------| -|`druid.broker.cache.sizeInBytes`|Maximum size of the cache. If this is zero, cache is disabled.|10485760 (10MB)| -|`druid.broker.cache.initialSize`|The initial size of the cache in bytes.|500000| -|`druid.broker.cache.logEvictionCount`|If this is non-zero, there will be an eviction of entries.|0| +|`druid.broker.cache.sizeInBytes`|Maximum cache size in bytes. Zero disables caching.|0| +|`druid.broker.cache.initialSize`|Initial size of the hashtable backing the cache.|500000| +|`druid.broker.cache.logEvictionCount`|If non-zero, log cache eviction every `logEvictionCount` items.|0| #### Memcache |Property|Description|Default| |--------|-----------|-------| -|`druid.broker.cache.expiration`|Memcache [expiration time ](https://code.google.com/p/memcached/wiki/NewCommands#Standard_Protocol).|2592000 (30 days)| -|`druid.broker.cache.timeout`|Maximum time in milliseconds to wait for a response from Memcache.|500| -|`druid.broker.cache.hosts`|Memcache hosts.|none| -|`druid.broker.cache.maxObjectSize`|Maximum object size in bytes for a Memcache object.|52428800 (50 MB)| -|`druid.broker.cache.memcachedPrefix`|Key prefix for all keys in Memcache.|druid| +|`druid.broker.cache.expiration`|Memcached [expiration time](https://code.google.com/p/memcached/wiki/NewCommands#Standard_Protocol).|2592000 (30 days)| +|`druid.broker.cache.timeout`|Maximum time in milliseconds to wait for a response from Memcached.|500| +|`druid.broker.cache.hosts`|Command separated list of Memcached hosts ``.|none| +|`druid.broker.cache.maxObjectSize`|Maximum object size in bytes for a Memcached object.|52428800 (50 MB)| +|`druid.broker.cache.memcachedPrefix`|Key prefix for all keys in Memcached.|druid| diff --git a/server/src/main/java/io/druid/client/cache/LocalCacheProvider.java b/server/src/main/java/io/druid/client/cache/LocalCacheProvider.java index 716f5abab93772faf4b13522cd8dafab12cb27cc..62cd3d9caaa9ed000cfc3218daa57e163e9d213b 100644 --- a/server/src/main/java/io/druid/client/cache/LocalCacheProvider.java +++ b/server/src/main/java/io/druid/client/cache/LocalCacheProvider.java @@ -29,7 +29,7 @@ public class LocalCacheProvider implements CacheProvider { @JsonProperty @Min(0) - private long sizeInBytes = 10485760; + private long sizeInBytes = 0; @JsonProperty @Min(0) diff --git a/services/src/main/java/io/druid/cli/CliHistorical.java b/services/src/main/java/io/druid/cli/CliHistorical.java index 8f0c8769397796726de974279522281470257913..9692375e2646297a39084af04fda961a66d1c7dc 100644 --- a/services/src/main/java/io/druid/cli/CliHistorical.java +++ b/services/src/main/java/io/druid/cli/CliHistorical.java @@ -26,6 +26,7 @@ import com.metamx.common.logger.Logger; import io.airlift.command.Command; import io.druid.client.cache.Cache; import io.druid.client.cache.CacheConfig; +import io.druid.client.cache.CacheMonitor; import io.druid.client.cache.CacheProvider; import io.druid.guice.Jerseys; import io.druid.guice.JsonConfigProvider; @@ -38,6 +39,7 @@ import io.druid.server.QueryResource; import io.druid.server.coordination.ServerManager; import io.druid.server.coordination.ZkCoordinator; import io.druid.server.initialization.JettyServerInitializer; +import io.druid.server.metrics.MetricsModule; import org.eclipse.jetty.server.Server; import java.util.List; @@ -77,10 +79,11 @@ public class CliHistorical extends ServerRunnable LifecycleModule.register(binder, ZkCoordinator.class); LifecycleModule.register(binder, Server.class); + binder.bind(Cache.class).toProvider(CacheProvider.class).in(ManageLifecycle.class); JsonConfigProvider.bind(binder, "druid.historical.cache", CacheProvider.class); JsonConfigProvider.bind(binder, "druid.historical.cache", CacheConfig.class); - + MetricsModule.register(binder, CacheMonitor.class); } } );