mirror of https://github.com/apache/druid.git
Merge pull request #388 from metamx/refactor-docs
Refactor out the configuration docs
This commit is contained in:
commit
f86d769d63
|
@ -0,0 +1,121 @@
|
||||||
|
---
|
||||||
|
layout: doc_page
|
||||||
|
---
|
||||||
|
Broker Node Configuration
|
||||||
|
=========================
|
||||||
|
For general Broker Node information, see [here](Broker.html).
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
-----------
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```
|
||||||
|
io.druid.cli.Main server broker
|
||||||
|
```
|
||||||
|
|
||||||
|
With the following JVM configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx256m
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
druid.host=localhost
|
||||||
|
druid.service=broker
|
||||||
|
druid.port=8080
|
||||||
|
|
||||||
|
druid.zk.service.host=localhost
|
||||||
|
```
|
||||||
|
|
||||||
|
Production Configs
|
||||||
|
------------------
|
||||||
|
These production configs are using S3 as a deep store.
|
||||||
|
|
||||||
|
JVM settings:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx#{HEAP_MAX}g
|
||||||
|
-Xms#{HEAP_MIN}g
|
||||||
|
-XX:NewSize=#{NEW_SIZE}g
|
||||||
|
-XX:MaxNewSize=#{MAX_NEW_SIZE}g
|
||||||
|
-XX:+UseConcMarkSweepGC
|
||||||
|
-XX:+PrintGCDetails
|
||||||
|
-XX:+PrintGCTimeStamps
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
-Djava.io.tmpdir=/mnt/tmp
|
||||||
|
|
||||||
|
-Dcom.sun.management.jmxremote.port=17071
|
||||||
|
-Dcom.sun.management.jmxremote.authenticate=false
|
||||||
|
-Dcom.sun.management.jmxremote.ssl=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/broker
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
druid.extensions.coordinates=[]
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.discovery.curator.path=/prod/discovery
|
||||||
|
|
||||||
|
druid.broker.cache.type=memcached
|
||||||
|
druid.broker.cache.hosts=#{MC_HOST1}:11211,#{MC_HOST2}:11211,#{MC_HOST3}:11211
|
||||||
|
druid.broker.cache.expiration=2147483647
|
||||||
|
druid.broker.cache.memcachedPrefix=d1
|
||||||
|
druid.broker.http.numConnections=20
|
||||||
|
druid.broker.http.readTimeout=PT5M
|
||||||
|
|
||||||
|
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"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime Configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The broker module uses several of the default modules in [Configuration](Configuration.html) and has the following set of configurations as well:
|
||||||
|
|
||||||
|
|Property|Possible Values|Description|Default|
|
||||||
|
|--------|---------------|-----------|-------|
|
||||||
|
|`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 compute nodes. `random` choose randomly, `connectionCount` picks the node with the fewest number of active connections to|`random`|
|
||||||
|
|
||||||
|
#### Local Cache
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`druid.broker.cache.sizeInBytes`|Maximum size of the cache. If this is zero, cache is disabled.|0|
|
||||||
|
|`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|
|
||||||
|
|
||||||
|
#### 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|
|
|
@ -3,61 +3,11 @@ layout: doc_page
|
||||||
---
|
---
|
||||||
Broker
|
Broker
|
||||||
======
|
======
|
||||||
|
For Broker Node Configuration, see [Broker Configuration](Broker-Config.html).
|
||||||
|
|
||||||
The Broker is the node to route queries to if you want to run a distributed cluster. It understands the metadata published to ZooKeeper about what segments exist on what nodes and routes queries such that they hit the right nodes. This node also merges the result sets from all of the individual nodes together.
|
The Broker is the node to route queries to if you want to run a distributed cluster. It understands the metadata published to ZooKeeper about what segments exist on what nodes and routes queries such that they hit the right nodes. This node also merges the result sets from all of the individual nodes together.
|
||||||
On start up, Realtime nodes announce themselves and the segments they are serving in Zookeeper.
|
On start up, Realtime nodes announce themselves and the segments they are serving in Zookeeper.
|
||||||
|
|
||||||
Quick Start
|
|
||||||
-----------
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```
|
|
||||||
io.druid.cli.Main server broker
|
|
||||||
```
|
|
||||||
|
|
||||||
With the following JVM configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
-server
|
|
||||||
-Xmx256m
|
|
||||||
-Duser.timezone=UTC
|
|
||||||
-Dfile.encoding=UTF-8
|
|
||||||
|
|
||||||
druid.host=localhost
|
|
||||||
druid.service=broker
|
|
||||||
druid.port=8080
|
|
||||||
|
|
||||||
druid.zk.service.host=localhost
|
|
||||||
```
|
|
||||||
|
|
||||||
JVM Configuration
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
The broker module uses several of the default modules in [Configuration](Configuration.html) and has the following set of configurations as well:
|
|
||||||
|
|
||||||
|Property|Possible Values|Description|Default|
|
|
||||||
|--------|---------------|-----------|-------|
|
|
||||||
|`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 compute nodes. `random` choose randomly, `connectionCount` picks the node with the fewest number of active connections to|`random`|
|
|
||||||
|
|
||||||
#### Local Cache
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`druid.broker.cache.sizeInBytes`|Maximum size of the cache. If this is zero, cache is disabled.|0|
|
|
||||||
|`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|
|
|
||||||
|
|
||||||
#### 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|
|
|
||||||
|
|
||||||
Running
|
Running
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -65,7 +15,6 @@ Running
|
||||||
io.druid.cli.Main server broker
|
io.druid.cli.Main server broker
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Forwarding Queries
|
Forwarding Queries
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
---
|
||||||
|
layout: doc_page
|
||||||
|
---
|
||||||
|
Coordinator Node Configuration
|
||||||
|
==============================
|
||||||
|
For general Coordinator Node information, see [here](Coordinator.html).
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
-----------
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```
|
||||||
|
io.druid.cli.Main server coordinator
|
||||||
|
```
|
||||||
|
|
||||||
|
With the following JVM configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx256m
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
druid.host=localhost
|
||||||
|
druid.service=coordinator
|
||||||
|
druid.port=8082
|
||||||
|
|
||||||
|
druid.zk.service.host=localhost
|
||||||
|
|
||||||
|
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
|
||||||
|
druid.db.connector.user=druid
|
||||||
|
druid.db.connector.password=diurd
|
||||||
|
|
||||||
|
druid.coordinator.startDelay=PT60s
|
||||||
|
```
|
||||||
|
|
||||||
|
Production Configs
|
||||||
|
------------------
|
||||||
|
These production configs are using S3 as a deep store.
|
||||||
|
|
||||||
|
JVM settings:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx#{HEAP_MAX}g
|
||||||
|
-Xms#{HEAP_MIN}g
|
||||||
|
-XX:NewSize=#{NEW_SIZE}g
|
||||||
|
-XX:MaxNewSize=#{MAX_NEW_SIZE}g
|
||||||
|
-XX:+UseConcMarkSweepGC
|
||||||
|
-XX:+PrintGCDetails
|
||||||
|
-XX:+PrintGCTimeStamps
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
-Djava.io.tmpdir=/mnt/tmp
|
||||||
|
|
||||||
|
-Dcom.sun.management.jmxremote.port=17071
|
||||||
|
-Dcom.sun.management.jmxremote.authenticate=false
|
||||||
|
-Dcom.sun.management.jmxremote.ssl=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/coordinator
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.discovery.curator.path=/prod/discovery
|
||||||
|
|
||||||
|
druid.db.connector.connectURI=jdbc:mysql://#{MYSQL_URL}:3306/druid
|
||||||
|
druid.db.connector.user=#{MYSQL_USER}
|
||||||
|
druid.db.connector.password=#{MYSQL_PW}
|
||||||
|
druid.db.connector.useValidationQuery=true
|
||||||
|
druid.db.tables.base=prod
|
||||||
|
|
||||||
|
druid.coordinator.period=PT60S
|
||||||
|
druid.coordinator.period.indexingPeriod=PT1H
|
||||||
|
druid.coordinator.startDelay=PT300S
|
||||||
|
druid.coordinator.merge.on=false
|
||||||
|
druid.coordinator.conversion.on=false
|
||||||
|
|
||||||
|
druid.selectors.indexing.serviceName=druid:prod:indexer
|
||||||
|
|
||||||
|
druid.monitoring.monitors=["com.metamx.metrics.SysMonitor", "com.metamx.metrics.JvmMonitor"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime Configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The coordinator module uses several of the default modules in [Configuration](Configuration.html) and has the following set of configurations as well:
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`druid.coordinator.period`|The run period for the coordinator. The coordinator’s operates by maintaining the current state of the world in memory and periodically looking at the set of segments available and segments being served to make decisions about whether any changes need to be made to the data topology. This property sets the delay between each of these runs.|PT60S|
|
||||||
|
|`druid.coordinator.period.indexingPeriod`|How often to send indexing tasks to the indexing service. Only applies if merge or conversion is turned on.|PT1800S (30 mins)|
|
||||||
|
|`druid.coordinator.startDelay`|The operation of the Coordinator works on the assumption that it has an up-to-date view of the state of the world when it runs, the current ZK interaction code, however, is written in a way that doesn’t allow the Coordinator to know for a fact that it’s done loading the current state of the world. This delay is a hack to give it enough time to believe that it has all the data.|PT300S|
|
||||||
|
|`druid.coordinator.merge.on`|Boolean flag for whether or not the coordinator should try and merge small segments into a more optimal segment size.|PT300S|
|
||||||
|
|`druid.coordinator.conversion.on`|Boolean flag for converting old segment indexing versions to the latest segment indexing version.|false|
|
||||||
|
|`druid.coordinator.load.timeout`|The timeout duration for when the coordinator assigns a segment to a historical node.|15 minutes|
|
||||||
|
|`druid.manager.segment.pollDuration`|The duration between polls the Coordinator does for updates to the set of active segments. Generally defines the amount of lag time it can take for the coordinator to notice new segments.|PT1M|
|
||||||
|
|`druid.manager.rules.pollDuration`|The duration between polls the Coordinator does for updates to the set of active rules. Generally defines the amount of lag time it can take for the coordinator to notice rules.|PT1M|
|
||||||
|
|`druid.manager.rules.defaultTier`|The default tier from which default rules will be loaded from.|_default|
|
||||||
|
|
||||||
|
Dynamic Configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The coordinator has dynamic configuration to change certain behaviour on the fly. The coordinator a JSON spec object from the Druid [MySQL](MySQL.html) config table. This object is detailed below:
|
||||||
|
|
||||||
|
It is recommended that you use the Coordinator Console to configure these parameters. However, if you need to do it via HTTP, the JSON object can be submitted to the overlord via a POST request at:
|
||||||
|
|
||||||
|
```
|
||||||
|
http://<COORDINATOR_IP>:<PORT>/coordinator/config
|
||||||
|
```
|
||||||
|
|
||||||
|
A sample worker setup spec is shown below:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"millisToWaitBeforeDeleting": 900000,
|
||||||
|
"mergeBytesLimit": 100000000L,
|
||||||
|
"mergeSegmentsLimit" : 1000,
|
||||||
|
"maxSegmentsToMove": 5,
|
||||||
|
"replicantLifetime": 15,
|
||||||
|
"replicationThrottleLimit": 10,
|
||||||
|
"emitBalancingStats": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Issuing a GET request at the same URL will return the spec that is currently in place. A description of the config setup spec is shown below.
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`millisToWaitBeforeDeleting`|How long does the coordinator need to be active before it can start deleting segments.|90000 (15 mins)|
|
||||||
|
|`mergeBytesLimit`|The maximum number of bytes to merge (for segments).|100000000L|
|
||||||
|
|`mergeSegmentsLimit`|The maximum number of segments that can be in a single merge [task](Tasks.html).|Integer.MAX_VALUE|
|
||||||
|
|`maxSegmentsToMove`|The maximum number of segments that can be moved at any given time.|5|
|
||||||
|
|`replicantLifetime`|The maximum number of coordinator runs for a segment to be replicated before we start alerting.|15|
|
||||||
|
|`replicationThrottleLimit`|The maximum number of segments that can be replicated at one time.|10|
|
||||||
|
|`emitBalancingStats`|Boolean flag for whether or not we should emit balancing stats. This is an expensive operation.|false|
|
|
@ -1,8 +1,9 @@
|
||||||
---
|
---
|
||||||
layout: doc_page
|
layout: doc_page
|
||||||
---
|
---
|
||||||
Coordinator
|
Coordinator Node
|
||||||
===========
|
================
|
||||||
|
For Coordinator Node Configuration, see [Coordinator Configuration](Coordinator-Config.html).
|
||||||
|
|
||||||
The Druid coordinator node is primarily responsible for segment management and distribution. More specifically, the Druid coordinator node communicates to historical nodes to load or drop segments based on configurations. The Druid coordinator is responsible for loading new segments, dropping outdated segments, managing segment replication, and balancing segment load.
|
The Druid coordinator node is primarily responsible for segment management and distribution. More specifically, the Druid coordinator node communicates to historical nodes to load or drop segments based on configurations. The Druid coordinator is responsible for loading new segments, dropping outdated segments, managing segment replication, and balancing segment load.
|
||||||
|
|
||||||
|
@ -10,89 +11,6 @@ The Druid coordinator runs periodically and the time between each run is a confi
|
||||||
|
|
||||||
Before any unassigned segments are serviced by historical nodes, the available historical nodes for each tier are first sorted in terms of capacity, with least capacity servers having the highest priority. Unassigned segments are always assigned to the nodes with least capacity to maintain a level of balance between nodes. The coordinator does not directly communicate with a historical node when assigning it a new segment; instead the coordinator creates some temporary information about the new segment under load queue path of the historical node. Once this request is seen, the historical node will load the segment and begin servicing it.
|
Before any unassigned segments are serviced by historical nodes, the available historical nodes for each tier are first sorted in terms of capacity, with least capacity servers having the highest priority. Unassigned segments are always assigned to the nodes with least capacity to maintain a level of balance between nodes. The coordinator does not directly communicate with a historical node when assigning it a new segment; instead the coordinator creates some temporary information about the new segment under load queue path of the historical node. Once this request is seen, the historical node will load the segment and begin servicing it.
|
||||||
|
|
||||||
Quick Start
|
|
||||||
-----------
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```
|
|
||||||
io.druid.cli.Main server coordinator
|
|
||||||
```
|
|
||||||
|
|
||||||
With the following JVM configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
-server
|
|
||||||
-Xmx256m
|
|
||||||
-Duser.timezone=UTC
|
|
||||||
-Dfile.encoding=UTF-8
|
|
||||||
|
|
||||||
druid.host=localhost
|
|
||||||
druid.service=coordinator
|
|
||||||
druid.port=8082
|
|
||||||
|
|
||||||
druid.zk.service.host=localhost
|
|
||||||
|
|
||||||
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
|
|
||||||
druid.db.connector.user=druid
|
|
||||||
druid.db.connector.password=diurd
|
|
||||||
|
|
||||||
druid.coordinator.startDelay=PT60s
|
|
||||||
```
|
|
||||||
|
|
||||||
JVM Configuration
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
The coordinator module uses several of the default modules in [Configuration](Configuration.html) and has the following set of configurations as well:
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`druid.coordinator.period`|The run period for the coordinator. The coordinator’s operates by maintaining the current state of the world in memory and periodically looking at the set of segments available and segments being served to make decisions about whether any changes need to be made to the data topology. This property sets the delay between each of these runs.|PT60S|
|
|
||||||
|`druid.coordinator.period.indexingPeriod`|How often to send indexing tasks to the indexing service. Only applies if merge or conversion is turned on.|PT1800S (30 mins)|
|
|
||||||
|`druid.coordinator.startDelay`|The operation of the Coordinator works on the assumption that it has an up-to-date view of the state of the world when it runs, the current ZK interaction code, however, is written in a way that doesn’t allow the Coordinator to know for a fact that it’s done loading the current state of the world. This delay is a hack to give it enough time to believe that it has all the data.|PT300S|
|
|
||||||
|`druid.coordinator.merge.on`|Boolean flag for whether or not the coordinator should try and merge small segments into a more optimal segment size.|PT300S|
|
|
||||||
|`druid.coordinator.conversion.on`|Boolean flag for converting old segment indexing versions to the latest segment indexing version.|false|
|
|
||||||
|`druid.coordinator.load.timeout`|The timeout duration for when the coordinator assigns a segment to a historical node.|15 minutes|
|
|
||||||
|`druid.manager.segment.pollDuration`|The duration between polls the Coordinator does for updates to the set of active segments. Generally defines the amount of lag time it can take for the coordinator to notice new segments.|PT1M|
|
|
||||||
|`druid.manager.rules.pollDuration`|The duration between polls the Coordinator does for updates to the set of active rules. Generally defines the amount of lag time it can take for the coordinator to notice rules.|PT1M|
|
|
||||||
|`druid.manager.rules.defaultTier`|The default tier from which default rules will be loaded from.|_default|
|
|
||||||
|
|
||||||
Dynamic Configuration
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
The coordinator has dynamic configuration to change certain behaviour on the fly. The coordinator a JSON spec object from the Druid [MySQL](MySQL.html) config table. This object is detailed below:
|
|
||||||
|
|
||||||
It is recommended that you use the Coordinator Console to configure these parameters. However, if you need to do it via HTTP, the JSON object can be submitted to the overlord via a POST request at:
|
|
||||||
|
|
||||||
```
|
|
||||||
http://<COORDINATOR_IP>:<PORT>/coordinator/config
|
|
||||||
```
|
|
||||||
|
|
||||||
A sample worker setup spec is shown below:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"millisToWaitBeforeDeleting": 900000,
|
|
||||||
"mergeBytesLimit": 100000000L,
|
|
||||||
"mergeSegmentsLimit" : 1000,
|
|
||||||
"maxSegmentsToMove": 5,
|
|
||||||
"replicantLifetime": 15,
|
|
||||||
"replicationThrottleLimit": 10,
|
|
||||||
"emitBalancingStats": false
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Issuing a GET request at the same URL will return the spec that is currently in place. A description of the config setup spec is shown below.
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`millisToWaitBeforeDeleting`|How long does the coordinator need to be active before it can start deleting segments.|90000 (15 mins)|
|
|
||||||
|`mergeBytesLimit`|The maximum number of bytes to merge (for segments).|100000000L|
|
|
||||||
|`mergeSegmentsLimit`|The maximum number of segments that can be in a single merge [task](Tasks.html).|Integer.MAX_VALUE|
|
|
||||||
|`maxSegmentsToMove`|The maximum number of segments that can be moved at any given time.|5|
|
|
||||||
|`replicantLifetime`|The maximum number of coordinator runs for a segment to be replicated before we start alerting.|15|
|
|
||||||
|`replicationThrottleLimit`|The maximum number of segments that can be replicated at one time.|10|
|
|
||||||
|`emitBalancingStats`|Boolean flag for whether or not we should emit balancing stats. This is an expensive operation.|false|
|
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
---
|
||||||
|
layout: doc_page
|
||||||
|
---
|
||||||
|
Historical Node Configuration
|
||||||
|
=============================
|
||||||
|
For general Historical Node information, see [here](Historical.html).
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
-----------
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```
|
||||||
|
io.druid.cli.Main server historical
|
||||||
|
```
|
||||||
|
|
||||||
|
With the following JVM configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx256m
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
druid.host=localhost
|
||||||
|
druid.service=historical
|
||||||
|
druid.port=8081
|
||||||
|
|
||||||
|
druid.zk.service.host=localhost
|
||||||
|
|
||||||
|
druid.server.maxSize=10000000000
|
||||||
|
|
||||||
|
# Change these to make Druid faster
|
||||||
|
druid.processing.buffer.sizeBytes=100000000
|
||||||
|
druid.processing.numThreads=1
|
||||||
|
|
||||||
|
druid.segmentCache.locations=[{"path": "/tmp/druid/indexCache", "maxSize"\: 10000000000}]
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: This will spin up a Historical node with the local filesystem as deep storage.
|
||||||
|
|
||||||
|
Production Configs
|
||||||
|
------------------
|
||||||
|
These production configs are using S3 as a deep store.
|
||||||
|
|
||||||
|
JVM settings:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx#{HEAP_MAX}g
|
||||||
|
-Xms#{HEAP_MIN}g
|
||||||
|
-XX:NewSize=#{NEW_SIZE}g
|
||||||
|
-XX:MaxNewSize=#{MAX_NEW_SIZE}g
|
||||||
|
-XX:+UseConcMarkSweepGC
|
||||||
|
-XX:+PrintGCDetails
|
||||||
|
-XX:+PrintGCTimeStamps
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
-Djava.io.tmpdir=/mnt/tmp
|
||||||
|
|
||||||
|
-Dcom.sun.management.jmxremote.port=17071
|
||||||
|
-Dcom.sun.management.jmxremote.authenticate=false
|
||||||
|
-Dcom.sun.management.jmxremote.ssl=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/compute/_default
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.52"]
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.s3.accessKey=#{ACCESS_KEY}
|
||||||
|
druid.s3.secretKey=#{SECRET_KEY}
|
||||||
|
|
||||||
|
druid.server.type=historical
|
||||||
|
druid.server.maxSize=#{SERVER_MAXSIZE}
|
||||||
|
druid.server.http.numThreads=50
|
||||||
|
|
||||||
|
druid.processing.buffer.sizeBytes=#{BUFFER_SIZE}}
|
||||||
|
druid.processing.numThreads=#{NUM_THREADS}}
|
||||||
|
|
||||||
|
druid.segmentCache.locations=[{"path": "/mnt/persistent/zk_druid", "maxSize": #{SERVER_MAXSIZE}}]
|
||||||
|
|
||||||
|
druid.request.logging.type=file
|
||||||
|
druid.request.logging.dir=request_logs/
|
||||||
|
|
||||||
|
druid.monitoring.monitors=["io.druid.server.metrics.ServerMonitor", "com.metamx.metrics.SysMonitor","com.metamx.metrics.JvmMonitor"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
The historical module uses several of the default modules in [Configuration](Configuration.html) and has no uniques configs of its own.
|
|
@ -1,48 +1,12 @@
|
||||||
---
|
---
|
||||||
layout: doc_page
|
layout: doc_page
|
||||||
---
|
---
|
||||||
Historical
|
Historical Node
|
||||||
=======
|
===============
|
||||||
|
For Historical Node Configuration, see [Historial Configuration](Historical-Config.html).
|
||||||
|
|
||||||
Historical nodes load up historical segments and expose them for querying.
|
Historical nodes load up historical segments and expose them for querying.
|
||||||
|
|
||||||
Quick Start
|
|
||||||
-----------
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```
|
|
||||||
io.druid.cli.Main server historical
|
|
||||||
```
|
|
||||||
|
|
||||||
With the following JVM configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
-server
|
|
||||||
-Xmx256m
|
|
||||||
-Duser.timezone=UTC
|
|
||||||
-Dfile.encoding=UTF-8
|
|
||||||
|
|
||||||
druid.host=localhost
|
|
||||||
druid.service=historical
|
|
||||||
druid.port=8081
|
|
||||||
|
|
||||||
druid.zk.service.host=localhost
|
|
||||||
|
|
||||||
druid.server.maxSize=10000000000
|
|
||||||
|
|
||||||
# Change these to make Druid faster
|
|
||||||
druid.processing.buffer.sizeBytes=100000000
|
|
||||||
druid.processing.numThreads=1
|
|
||||||
|
|
||||||
druid.segmentCache.locations=[{"path": "/tmp/druid/indexCache", "maxSize"\: 10000000000}]
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: This will spin up a Historical node with the local filesystem as deep storage.
|
|
||||||
|
|
||||||
JVM Configuration
|
|
||||||
-----------------
|
|
||||||
The historical module uses several of the default modules in [Configuration](Configuration.html) and has no uniques configs of its own.
|
|
||||||
|
|
||||||
Running
|
Running
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,255 @@
|
||||||
|
---
|
||||||
|
layout: doc_page
|
||||||
|
---
|
||||||
|
For general Indexing Service information, see [here](Indexing-Service.html).
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
-----------
|
||||||
|
|
||||||
|
```
|
||||||
|
io.druid.cli.Main server overlord
|
||||||
|
```
|
||||||
|
|
||||||
|
With the following JVM configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx256m
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
-Ddruid.host=localhost
|
||||||
|
-Ddruid.port=8080
|
||||||
|
-Ddruid.service=overlord
|
||||||
|
|
||||||
|
-Ddruid.zk.service.host=localhost
|
||||||
|
|
||||||
|
-Ddruid.db.connector.connectURI=jdbc:mysql://localhost:3306/druid
|
||||||
|
-Ddruid.db.connector.user=druid
|
||||||
|
-Ddruid.db.connector.password=diurd
|
||||||
|
|
||||||
|
-Ddruid.selectors.indexing.serviceName=overlord
|
||||||
|
-Ddruid.indexer.queue.startDelay=PT0M
|
||||||
|
-Ddruid.indexer.runner.javaOpts="-server -Xmx1g"
|
||||||
|
-Ddruid.indexer.runner.startPort=8081
|
||||||
|
-Ddruid.indexer.fork.property.druid.computation.buffer.size=268435456
|
||||||
|
```
|
||||||
|
|
||||||
|
Production Configs
|
||||||
|
------------------
|
||||||
|
These production configs are using S3 as a deep store and running the indexing service in distributed mode.
|
||||||
|
|
||||||
|
JVM settings for both overlord and middle manager:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx#{HEAP_MAX}g
|
||||||
|
-Xms#{HEAP_MIN}g
|
||||||
|
-XX:NewSize=#{NEW_SIZE}g
|
||||||
|
-XX:MaxNewSize=#{MAX_NEW_SIZE}g
|
||||||
|
-XX:+UseConcMarkSweepGC
|
||||||
|
-XX:+PrintGCDetails
|
||||||
|
-XX:+PrintGCTimeStamps
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
-Djava.io.tmpdir=/mnt/tmp
|
||||||
|
|
||||||
|
-Dcom.sun.management.jmxremote.port=17071
|
||||||
|
-Dcom.sun.management.jmxremote.authenticate=false
|
||||||
|
-Dcom.sun.management.jmxremote.ssl=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties for overlord:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/indexer
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.52"]
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.discovery.curator.path=/prod/discovery
|
||||||
|
|
||||||
|
druid.s3.accessKey=#{ACCESS_KEY}
|
||||||
|
druid.s3.secretKey=#{SECRET_KEY}
|
||||||
|
|
||||||
|
druid.db.connector.connectURI=jdbc:mysql://#{MYSQL_URL}:3306/druid
|
||||||
|
druid.db.connector.user=#{MYSQL_USER}
|
||||||
|
druid.db.connector.password=#{MYSQL_PW}
|
||||||
|
druid.db.connector.useValidationQuery=true
|
||||||
|
druid.db.tables.base=prod
|
||||||
|
|
||||||
|
druid.indexer.autoscale.doAutoscale=true
|
||||||
|
druid.indexer.autoscale.strategy=ec2
|
||||||
|
druid.indexer.autoscale.workerIdleTimeout=PT90m
|
||||||
|
druid.indexer.autoscale.terminatePeriod=PT5M
|
||||||
|
druid.indexer.autoscale.workerVersion=#{WORKER_VERSION}
|
||||||
|
|
||||||
|
druid.indexer.firehoseId.prefix=druid:prod:chat
|
||||||
|
druid.indexer.logs.type=s3
|
||||||
|
druid.indexer.logs.s3Bucket=#{INDEXER_LOGS_BUCKET}
|
||||||
|
druid.indexer.logs.s3Prefix=prod/logs/v1
|
||||||
|
druid.indexer.runner.type=remote
|
||||||
|
druid.indexer.runner.compressZnodes=true
|
||||||
|
druid.indexer.runner.minWorkerVersion=#{WORKER_VERSION}
|
||||||
|
druid.indexer.storage.type=db
|
||||||
|
|
||||||
|
druid.monitoring.monitors=["com.metamx.metrics.SysMonitor","com.metamx.metrics.JvmMonitor"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties for middle manager:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/worker
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.52","io.druid.extensions:druid-kafka-seven:0.6.52"]
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.discovery.curator.path=/prod/discovery
|
||||||
|
|
||||||
|
druid.s3.accessKey=#{ACCESS_KEY}
|
||||||
|
druid.s3.secretKey=#{SECRET_KEY}
|
||||||
|
|
||||||
|
druid.indexer.logs.type=s3
|
||||||
|
druid.indexer.logs.s3Bucket=#{INDEXER_LOGS_BUCKET}
|
||||||
|
druid.indexer.logs.s3Prefix=prod/logs/v1
|
||||||
|
druid.indexer.runner.javaOpts=-server -Xmx#{HEAP_MAX}g -Xms#{HEAP_MIN}g -XX:NewSize=#{NEW_SIZE}m -XX:MaxNewSize=#{MAX_NEW_SIZE}6m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
|
||||||
|
druid.indexer.runner.startPort=8081
|
||||||
|
druid.indexer.runner.taskDir=/mnt/persistent/task/
|
||||||
|
druid.indexer.task.taskDir=/mnt/persistent/task/
|
||||||
|
druid.indexer.task.chathandler.type=announce
|
||||||
|
|
||||||
|
druid.indexer.firehoseId.prefix=druid:prod:chat
|
||||||
|
|
||||||
|
druid.indexer.fork.property.druid.indexer.hadoopWorkingPath=/tmp/druid-indexing
|
||||||
|
druid.indexer.fork.property.druid.computation.buffer.size=#{BUFFER_SIZE}
|
||||||
|
druid.indexer.fork.property.druid.processing.numThreads=#{NUM_WORKER_THREADS}
|
||||||
|
druid.indexer.fork.property.druid.request.logging.type=file
|
||||||
|
druid.indexer.fork.property.druid.request.logging.dir=request_logs/
|
||||||
|
druid.indexer.fork.property.druid.segmentCache.locations=[{"path": "/mnt/persistent/zk_druid", "maxSize": 0}]
|
||||||
|
druid.indexer.fork.property.druid.storage.type=s3
|
||||||
|
druid.indexer.fork.property.druid.storage.baseKey=prod/v1
|
||||||
|
druid.indexer.fork.property.druid.storage.bucket=#{INDEXER_LOGS_BUCKET}
|
||||||
|
druid.server.http.numThreads=20
|
||||||
|
|
||||||
|
druid.worker.capacity=#{NUM_WORKER_THREADS}
|
||||||
|
druid.worker.ip=#{IP_ADDR}
|
||||||
|
druid.worker.version=#{WORKER_VERSION}
|
||||||
|
|
||||||
|
druid.selectors.indexing.serviceName=druid:prod:indexer
|
||||||
|
|
||||||
|
druid.monitoring.monitors=["com.metamx.metrics.SysMonitor","com.metamx.metrics.JvmMonitor"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Runtime Configuration
|
||||||
|
|
||||||
|
In addition to the configuration of some of the default modules in [Configuration](Configuration.html), the overlord has the following basic configs:
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`druid.indexer.runner.type`|Choices "local" or "remote". Indicates whether tasks should be run locally or in a distributed environment.|local|
|
||||||
|
|`druid.indexer.storage.type`|Choices are "local" or "db". Indicates whether incoming tasks should be stored locally (in heap) or in a database. Storing incoming tasks in a database allows for tasks to be resumed if the overlord should fail.|local|
|
||||||
|
|`druid.indexer.storage.recentlyFinishedThreshold`|A duration of time to store task results.|PT24H|
|
||||||
|
|`druid.indexer.queue.maxSize`|Maximum number of active tasks at one time.|Integer.MAX_VALUE|
|
||||||
|
|`druid.indexer.queue.startDelay`|Sleep this long before starting overlord queue management. This can be useful to give a cluster time to re-orient itself after e.g. a widespread network issue.|PT1M|
|
||||||
|
|`druid.indexer.queue.restartDelay`|Sleep this long when overlord queue management throws an exception before trying again.|PT30S|
|
||||||
|
|`druid.indexer.queue.storageSyncRate`|Sync overlord state this often with an underlying task persistence mechanism.|PT1M|
|
||||||
|
|
||||||
|
The following configs only apply if the overlord is running in remote mode:
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`druid.indexer.runner.taskAssignmentTimeout`|How long to wait after a task as been assigned to a middle manager before throwing an error.|PT5M|
|
||||||
|
|`druid.indexer.runner.minWorkerVersion`|The minimum middle manager version to send tasks to. |none|
|
||||||
|
|`druid.indexer.runner.compressZnodes`|Indicates whether or not the overlord should expect middle managers to compress Znodes.|false|
|
||||||
|
|`druid.indexer.runner.maxZnodeBytes`|The maximum size Znode in bytes that can be created in Zookeeper.|524288|
|
||||||
|
|
||||||
|
There are additional configs for autoscaling (if it is enabled):
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`druid.indexer.autoscale.strategy`|Choices are "noop" or "ec2". Sets the strategy to run when autoscaling is required.|noop|
|
||||||
|
|`druid.indexer.autoscale.doAutoscale`|If set to "true" autoscaling will be enabled.|false|
|
||||||
|
|`druid.indexer.autoscale.provisionPeriod`|How often to check whether or not new middle managers should be added.|PT1M|
|
||||||
|
|`druid.indexer.autoscale.terminatePeriod`|How often to check when middle managers should be removed.|PT1H|
|
||||||
|
|`druid.indexer.autoscale.originTime`|The starting reference timestamp that the terminate period increments upon.|2012-01-01T00:55:00.000Z|
|
||||||
|
|`druid.indexer.autoscale.workerIdleTimeout`|How long can a worker be idle (not a run task) before it can be considered for termination.|PT10M|
|
||||||
|
|`druid.indexer.autoscale.maxScalingDuration`|How long the overlord will wait around for a middle manager to show up before giving up.|PT15M|
|
||||||
|
|`druid.indexer.autoscale.numEventsToTrack`|The number of autoscaling related events (node creation and termination) to track.|10|
|
||||||
|
|`druid.indexer.autoscale.pendingTaskTimeout`|How long a task can be in "pending" state before the overlord tries to scale up.|PT30S|
|
||||||
|
|`druid.indexer.autoscale.workerVersion`|If set, will only create nodes of set version during autoscaling. Overrides dynamic configuration. |null|
|
||||||
|
|`druid.indexer.autoscale.workerPort`|The port that middle managers will run on.|8080|
|
||||||
|
|
||||||
|
#### Dynamic Configuration
|
||||||
|
|
||||||
|
Overlord dynamic configuration is mainly for autoscaling. The overlord reads a worker setup spec as a JSON object from the Druid [MySQL](MySQL.html) config table. This object contains information about the version of middle managers to create, the maximum and minimum number of middle managers in the cluster at one time, and additional information required to automatically create middle managers.
|
||||||
|
|
||||||
|
The JSON object can be submitted to the overlord via a POST request at:
|
||||||
|
|
||||||
|
```
|
||||||
|
http://<COORDINATOR_IP>:<port>/druid/indexer/v1/worker/setup
|
||||||
|
```
|
||||||
|
|
||||||
|
A sample worker setup spec is shown below:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"minVersion":"some_version",
|
||||||
|
"minNumWorkers":"0",
|
||||||
|
"maxNumWorkers":"10",
|
||||||
|
"nodeData": {
|
||||||
|
"type":"ec2",
|
||||||
|
"amiId":"ami-someId",
|
||||||
|
"instanceType":"m1.xlarge",
|
||||||
|
"minInstances":"1",
|
||||||
|
"maxInstances":"1",
|
||||||
|
"securityGroupIds":["securityGroupIds"],
|
||||||
|
"keyName":"keyName"
|
||||||
|
},
|
||||||
|
"userData":{
|
||||||
|
"classType":"galaxy",
|
||||||
|
"env":"druid",
|
||||||
|
"version":"druid_version",
|
||||||
|
"type":"sample_cluster/worker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Issuing a GET request at the same URL will return the current worker setup spec that is currently in place. The worker setup spec list above is just a sample and it is possible to extend the code base for other deployment environments. A description of the worker setup spec is shown below.
|
||||||
|
|
||||||
|
|Property|Description|Default|
|
||||||
|
|--------|-----------|-------|
|
||||||
|
|`minVersion`|The coordinator only assigns tasks to workers with a version greater than the minVersion. If this is not specified, the minVersion will be the same as the coordinator version.|none|
|
||||||
|
|`minNumWorkers`|The minimum number of workers that can be in the cluster at any given time.|0|
|
||||||
|
|`maxNumWorkers`|The maximum number of workers that can be in the cluster at any given time.|0|
|
||||||
|
|`nodeData`|A JSON object that contains metadata about new nodes to create.|none|
|
||||||
|
|`userData`|A JSON object that contains metadata about how the node should register itself on startup. This data is sent with node creation requests.|none|
|
|
@ -1,7 +1,10 @@
|
||||||
---
|
---
|
||||||
layout: doc_page
|
layout: doc_page
|
||||||
---
|
---
|
||||||
# Druid Indexing Service
|
Indexing Service
|
||||||
|
================
|
||||||
|
For Indexing Service Configuration, see [Indexing Service Configuration](Indexing-Service-Config.html).
|
||||||
|
|
||||||
The indexing service is a highly-available, distributed service that runs indexing related tasks. Indexing service [tasks](Tasks.html) create (and sometimes destroy) Druid [segments](Segments.html). The indexing service has a master/slave like architecture.
|
The indexing service is a highly-available, distributed service that runs indexing related tasks. Indexing service [tasks](Tasks.html) create (and sometimes destroy) Druid [segments](Segments.html). The indexing service has a master/slave like architecture.
|
||||||
|
|
||||||
The indexing service is composed of three main components: a peon component that can run a single task, a [Middle Manager](Middlemanager.html) component that manages peons, and an overlord component that manages task distribution to middle managers.
|
The indexing service is composed of three main components: a peon component that can run a single task, a [Middle Manager](Middlemanager.html) component that manages peons, and an overlord component that manages task distribution to middle managers.
|
||||||
|
@ -21,52 +24,14 @@ The truth is, the indexing service is an experience that is difficult to charact
|
||||||
The indexing service is philosophical transcendence, an infallible truth that will shape your soul, mold your character, and define your reality. The indexing service is creating world peace, playing with puppies, unwrapping presents on Christmas morning, cradling a loved one, and beating Goro in Mortal Kombat for the first time. The indexing service is sustainable economic growth, global propensity, and a world of transparent financial transactions. The indexing service is a true belieber. The indexing service is panicking because you forgot you signed up for a course and the big exam is in a few minutes, only to wake up and realize it was all a dream. What is the indexing service? More like what isn’t the indexing service. The indexing service is here and it is ready, but are you?
|
The indexing service is philosophical transcendence, an infallible truth that will shape your soul, mold your character, and define your reality. The indexing service is creating world peace, playing with puppies, unwrapping presents on Christmas morning, cradling a loved one, and beating Goro in Mortal Kombat for the first time. The indexing service is sustainable economic growth, global propensity, and a world of transparent financial transactions. The indexing service is a true belieber. The indexing service is panicking because you forgot you signed up for a course and the big exam is in a few minutes, only to wake up and realize it was all a dream. What is the indexing service? More like what isn’t the indexing service. The indexing service is here and it is ready, but are you?
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
Overlord Node
|
Overlord Node
|
||||||
-----------------
|
-------------
|
||||||
|
|
||||||
The overlord node is responsible for accepting tasks, coordinating task distribution, creating locks around tasks, and returning statuses to callers. Overlord can be configured to run in one of two modes - local or remote (local being default).
|
The overlord node is responsible for accepting tasks, coordinating task distribution, creating locks around tasks, and returning statuses to callers. Overlord can be configured to run in one of two modes - local or remote (local being default).
|
||||||
In local mode overlord is also responsible for creating peons for executing tasks. When running the overlord in local mode, all middle manager and peon configurations must be provided as well.
|
In local mode overlord is also responsible for creating peons for executing tasks. When running the overlord in local mode, all middle manager and peon configurations must be provided as well.
|
||||||
Local mode is typically used for simple workflows. In remote mode, the overlord and middle manager are run in separate processes and you can run each on a different server.
|
Local mode is typically used for simple workflows. In remote mode, the overlord and middle manager are run in separate processes and you can run each on a different server.
|
||||||
This mode is recommended if you intend to use the indexing service as the single endpoint for all Druid indexing.
|
This mode is recommended if you intend to use the indexing service as the single endpoint for all Druid indexing.
|
||||||
|
|
||||||
|
|
||||||
Run Overlord
|
|
||||||
----
|
|
||||||
|
|
||||||
```
|
|
||||||
io.druid.cli.Main server overlord
|
|
||||||
```
|
|
||||||
|
|
||||||
With the following JVM configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
-server
|
|
||||||
-Xmx256m
|
|
||||||
-Duser.timezone=UTC
|
|
||||||
-Dfile.encoding=UTF-8
|
|
||||||
|
|
||||||
-Ddruid.host=localhost
|
|
||||||
-Ddruid.port=8080
|
|
||||||
-Ddruid.service=overlord
|
|
||||||
|
|
||||||
-Ddruid.zk.service.host=localhost
|
|
||||||
|
|
||||||
-Ddruid.db.connector.connectURI=jdbc:mysql://localhost:3306/druid
|
|
||||||
-Ddruid.db.connector.user=druid
|
|
||||||
-Ddruid.db.connector.password=diurd
|
|
||||||
|
|
||||||
-Ddruid.selectors.indexing.serviceName=overlord
|
|
||||||
-Ddruid.indexer.queue.startDelay=PT0M
|
|
||||||
-Ddruid.indexer.runner.javaOpts="-server -Xmx1g"
|
|
||||||
-Ddruid.indexer.runner.startPort=8081
|
|
||||||
-Ddruid.indexer.fork.property.druid.computation.buffer.size=268435456
|
|
||||||
```
|
|
||||||
|
|
||||||
You can now submit simple indexing tasks to the indexing service.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Submitting Tasks and Querying Task Status
|
#### Submitting Tasks and Querying Task Status
|
||||||
|
|
||||||
Tasks are submitted to the overlord node in the form of JSON objects. Tasks can be submitted via POST requests to:
|
Tasks are submitted to the overlord node in the form of JSON objects. Tasks can be submitted via POST requests to:
|
||||||
|
@ -110,94 +75,8 @@ The Autoscaling mechanisms currently in place are tightly coupled with our deplo
|
||||||
|
|
||||||
If autoscaling is enabled, new middle managers may be added when a task has been in pending state for too long. Middle managers may be terminated if they have not run any tasks for a period of time.
|
If autoscaling is enabled, new middle managers may be added when a task has been in pending state for too long. Middle managers may be terminated if they have not run any tasks for a period of time.
|
||||||
|
|
||||||
#### JVM Configuration
|
|
||||||
|
|
||||||
In addition to the configuration of some of the default modules in [Configuration](Configuration.html), the overlord has the following basic configs:
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`druid.indexer.runner.type`|Choices "local" or "remote". Indicates whether tasks should be run locally or in a distributed environment.|local|
|
|
||||||
|`druid.indexer.storage.type`|Choices are "local" or "db". Indicates whether incoming tasks should be stored locally (in heap) or in a database. Storing incoming tasks in a database allows for tasks to be resumed if the overlord should fail.|local|
|
|
||||||
|`druid.indexer.storage.recentlyFinishedThreshold`|A duration of time to store task results.|PT24H|
|
|
||||||
|`druid.indexer.queue.maxSize`|Maximum number of active tasks at one time.|Integer.MAX_VALUE|
|
|
||||||
|`druid.indexer.queue.startDelay`|Sleep this long before starting overlord queue management. This can be useful to give a cluster time to re-orient itself after e.g. a widespread network issue.|PT1M|
|
|
||||||
|`druid.indexer.queue.restartDelay`|Sleep this long when overlord queue management throws an exception before trying again.|PT30S|
|
|
||||||
|`druid.indexer.queue.storageSyncRate`|Sync overlord state this often with an underlying task persistence mechanism.|PT1M|
|
|
||||||
|
|
||||||
The following configs only apply if the overlord is running in remote mode:
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`druid.indexer.runner.taskAssignmentTimeout`|How long to wait after a task as been assigned to a middle manager before throwing an error.|PT5M|
|
|
||||||
|`druid.indexer.runner.minWorkerVersion`|The minimum middle manager version to send tasks to. |none|
|
|
||||||
|`druid.indexer.runner.compressZnodes`|Indicates whether or not the overlord should expect middle managers to compress Znodes.|false|
|
|
||||||
|`druid.indexer.runner.maxZnodeBytes`|The maximum size Znode in bytes that can be created in Zookeeper.|524288|
|
|
||||||
|
|
||||||
There are additional configs for autoscaling (if it is enabled):
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`druid.indexer.autoscale.strategy`|Choices are "noop" or "ec2". Sets the strategy to run when autoscaling is required.|noop|
|
|
||||||
|`druid.indexer.autoscale.doAutoscale`|If set to "true" autoscaling will be enabled.|false|
|
|
||||||
|`druid.indexer.autoscale.provisionPeriod`|How often to check whether or not new middle managers should be added.|PT1M|
|
|
||||||
|`druid.indexer.autoscale.terminatePeriod`|How often to check when middle managers should be removed.|PT1H|
|
|
||||||
|`druid.indexer.autoscale.originTime`|The starting reference timestamp that the terminate period increments upon.|2012-01-01T00:55:00.000Z|
|
|
||||||
|`druid.indexer.autoscale.workerIdleTimeout`|How long can a worker be idle (not a run task) before it can be considered for termination.|PT10M|
|
|
||||||
|`druid.indexer.autoscale.maxScalingDuration`|How long the overlord will wait around for a middle manager to show up before giving up.|PT15M|
|
|
||||||
|`druid.indexer.autoscale.numEventsToTrack`|The number of autoscaling related events (node creation and termination) to track.|10|
|
|
||||||
|`druid.indexer.autoscale.pendingTaskTimeout`|How long a task can be in "pending" state before the overlord tries to scale up.|PT30S|
|
|
||||||
|`druid.indexer.autoscale.workerVersion`|If set, will only create nodes of set version during autoscaling. Overrides dynamic configuration. |null|
|
|
||||||
|`druid.indexer.autoscale.workerPort`|The port that middle managers will run on.|8080|
|
|
||||||
|
|
||||||
#### Dynamic Configuration
|
|
||||||
|
|
||||||
Overlord dynamic configuration is mainly for autoscaling. The overlord reads a worker setup spec as a JSON object from the Druid [MySQL](MySQL.html) config table. This object contains information about the version of middle managers to create, the maximum and minimum number of middle managers in the cluster at one time, and additional information required to automatically create middle managers.
|
|
||||||
|
|
||||||
The JSON object can be submitted to the overlord via a POST request at:
|
|
||||||
|
|
||||||
```
|
|
||||||
http://<COORDINATOR_IP>:<port>/druid/indexer/v1/worker/setup
|
|
||||||
```
|
|
||||||
|
|
||||||
A sample worker setup spec is shown below:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"minVersion":"some_version",
|
|
||||||
"minNumWorkers":"0",
|
|
||||||
"maxNumWorkers":"10",
|
|
||||||
"nodeData": {
|
|
||||||
"type":"ec2",
|
|
||||||
"amiId":"ami-someId",
|
|
||||||
"instanceType":"m1.xlarge",
|
|
||||||
"minInstances":"1",
|
|
||||||
"maxInstances":"1",
|
|
||||||
"securityGroupIds":["securityGroupIds"],
|
|
||||||
"keyName":"keyName"
|
|
||||||
},
|
|
||||||
"userData":{
|
|
||||||
"classType":"galaxy",
|
|
||||||
"env":"druid",
|
|
||||||
"version":"druid_version",
|
|
||||||
"type":"sample_cluster/worker"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Issuing a GET request at the same URL will return the current worker setup spec that is currently in place. The worker setup spec list above is just a sample and it is possible to extend the code base for other deployment environments. A description of the worker setup spec is shown below.
|
|
||||||
|
|
||||||
|Property|Description|Default|
|
|
||||||
|--------|-----------|-------|
|
|
||||||
|`minVersion`|The coordinator only assigns tasks to workers with a version greater than the minVersion. If this is not specified, the minVersion will be the same as the coordinator version.|none|
|
|
||||||
|`minNumWorkers`|The minimum number of workers that can be in the cluster at any given time.|0|
|
|
||||||
|`maxNumWorkers`|The maximum number of workers that can be in the cluster at any given time.|0|
|
|
||||||
|`nodeData`|A JSON object that contains metadata about new nodes to create.|none|
|
|
||||||
|`userData`|A JSON object that contains metadata about how the node should register itself on startup. This data is sent with node creation requests.|none|
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Middle Managers
|
Middle Managers
|
||||||
-----
|
---------------
|
||||||
|
|
||||||
See [Middle Manager](Middlemanager.html).
|
See [Middle Manager](Middlemanager.html).
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
---
|
||||||
|
layout: doc_page
|
||||||
|
---
|
||||||
|
Realtime Node Configuration
|
||||||
|
===========================
|
||||||
|
For general Real-time Node information, see [here](Realtime.html).
|
||||||
|
|
||||||
|
For Real-time Ingestion, see [Realtime Ingestion](Realtime-ingestion.html).
|
||||||
|
|
||||||
|
Quick Start
|
||||||
|
-----------
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```
|
||||||
|
io.druid.cli.Main server realtime
|
||||||
|
```
|
||||||
|
|
||||||
|
With the following JVM configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx256m
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
druid.host=localhost
|
||||||
|
druid.service=realtime
|
||||||
|
druid.port=8083
|
||||||
|
|
||||||
|
druid.extensions.coordinates=["io.druid.extensions:druid-kafka-seven:0.6.52"]
|
||||||
|
|
||||||
|
|
||||||
|
druid.zk.service.host=localhost
|
||||||
|
|
||||||
|
# The realtime config file.
|
||||||
|
druid.realtime.specFile=/path/to/specFile
|
||||||
|
|
||||||
|
# Choices: db (hand off segments), noop (do not hand off segments).
|
||||||
|
druid.publish.type=db
|
||||||
|
|
||||||
|
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
|
||||||
|
druid.db.connector.user=druid
|
||||||
|
druid.db.connector.password=diurd
|
||||||
|
|
||||||
|
druid.processing.buffer.sizeBytes=100000000
|
||||||
|
```
|
||||||
|
|
||||||
|
Production Configs
|
||||||
|
------------------
|
||||||
|
These production configs are using S3 as a deep store.
|
||||||
|
|
||||||
|
JVM settings:
|
||||||
|
|
||||||
|
```
|
||||||
|
-server
|
||||||
|
-Xmx#{HEAP_MAX}g
|
||||||
|
-Xms#{HEAP_MIN}g
|
||||||
|
-XX:NewSize=#{NEW_SIZE}g
|
||||||
|
-XX:MaxNewSize=#{MAX_NEW_SIZE}g
|
||||||
|
-XX:+UseConcMarkSweepGC
|
||||||
|
-XX:+PrintGCDetails
|
||||||
|
-XX:+PrintGCTimeStamps
|
||||||
|
-Duser.timezone=UTC
|
||||||
|
-Dfile.encoding=UTF-8
|
||||||
|
-Djava.io.tmpdir=/mnt/tmp
|
||||||
|
|
||||||
|
-Dcom.sun.management.jmxremote.port=17071
|
||||||
|
-Dcom.sun.management.jmxremote.authenticate=false
|
||||||
|
-Dcom.sun.management.jmxremote.ssl=false
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime.properties:
|
||||||
|
|
||||||
|
```
|
||||||
|
druid.host=#{IP_ADDR}:8080
|
||||||
|
druid.port=8080
|
||||||
|
druid.service=druid/prod/realtime
|
||||||
|
|
||||||
|
# This setup requires all dependencies to be bundled such that we don't need to contact the remote repo
|
||||||
|
druid.extensions.remoteRepositories=[]
|
||||||
|
druid.extensions.localRepository=lib
|
||||||
|
druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.52","io.druid.extensions:druid-kafka-seven:0.6.52"]
|
||||||
|
|
||||||
|
druid.zk.service.host=#{ZK_IPs}
|
||||||
|
druid.zk.paths.base=/druid/prod
|
||||||
|
|
||||||
|
druid.s3.accessKey=#{ACCESS_KEY}
|
||||||
|
druid.s3.secretKey=#{SECRET_KEY}
|
||||||
|
|
||||||
|
druid.db.connector.connectURI=jdbc:mysql://#{MYSQL_URL}:3306/druid
|
||||||
|
druid.db.connector.user=#{MYSQL_USER}
|
||||||
|
druid.db.connector.password=#{MYSQL_PW}
|
||||||
|
druid.db.connector.useValidationQuery=true
|
||||||
|
druid.db.tables.base=prod
|
||||||
|
|
||||||
|
druid.publish.type=db
|
||||||
|
|
||||||
|
druid.processing.numThreads=3
|
||||||
|
|
||||||
|
druid.request.logging.type=file
|
||||||
|
druid.request.logging.dir=request_logs/
|
||||||
|
|
||||||
|
druid.realtime.specFile=conf/schemas.json
|
||||||
|
|
||||||
|
druid.segmentCache.locations=[{"path": "/mnt/persistent/zk_druid", "maxSize": 0}]
|
||||||
|
|
||||||
|
druid.storage.type=s3
|
||||||
|
druid.storage.bucket=#{S3_STORAGE_BUCKET}
|
||||||
|
druid.storage.baseKey=prod-realtime/v1
|
||||||
|
|
||||||
|
druid.monitoring.monitors=["com.metamx.metrics.SysMonitor", "io.druid.segment.realtime.RealtimeMetricsMonitor"]
|
||||||
|
|
||||||
|
# Emit metrics over http
|
||||||
|
druid.emitter=http
|
||||||
|
druid.emitter.http.recipientBaseUrl=#{EMITTER_URL}
|
||||||
|
|
||||||
|
# If you choose to compress ZK announcements, you must do so for every node type
|
||||||
|
druid.announcer.type=batch
|
||||||
|
druid.curator.compress=true
|
||||||
|
```
|
||||||
|
|
||||||
|
The realtime module also uses several of the default modules in [Configuration](Configuration.html). For more information on the realtime spec file (or configuration file), see [realtime ingestion](Realtime-ingestion.html) page.
|
|
@ -2,22 +2,15 @@
|
||||||
layout: doc_page
|
layout: doc_page
|
||||||
---
|
---
|
||||||
Realtime Data Ingestion
|
Realtime Data Ingestion
|
||||||
========
|
=======================
|
||||||
|
For general Real-time Node information, see [here](Realtime.html).
|
||||||
|
|
||||||
Realtime data ingestion uses [Realtime nodes](Realtime.html) to index data and make it immediately available for querying. This data is periodically handed off (in the form of data segments) to [Historical](Historical.html) nodes, after which that data is forgotten by the Realtime nodes. This handoff, or "segment propagation," involves a series of interactions between various members of the Druid cluster. It is illustrated below.
|
For Real-time Node Configuration, see [Realtime Configuration](Realtime-Config.html).
|
||||||
|
|
||||||
|
For writing your own plugins to the real-time node, see [Firehose](Firehose.html).
|
||||||
|
|
||||||
Much of the configuration governing Realtime nodes and the ingestion of data is set in the Realtime spec file, discussed on this page.
|
Much of the configuration governing Realtime nodes and the ingestion of data is set in the Realtime spec file, discussed on this page.
|
||||||
|
|
||||||
|
|
||||||
Segment Propagation
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
The segment propagation diagram for real-time data ingestion can be seen below:
|
|
||||||
|
|
||||||
![Segment Propagation](../img/segmentPropagation.png "Segment Propagation")
|
|
||||||
|
|
||||||
You can read about the various components shown in this diagram under the Architecture section (see the menu on the left).
|
|
||||||
|
|
||||||
<a id="realtime-specfile"></a>
|
<a id="realtime-specfile"></a>
|
||||||
## Realtime "specFile"
|
## Realtime "specFile"
|
||||||
|
|
||||||
|
@ -108,14 +101,6 @@ This provides configuration for the data processing portion of the realtime stre
|
||||||
|intermediatePersistPeriod|ISO8601 Period String|The period that determines the rate at which intermediate persists occur. These persists determine how often commits happen against the incoming realtime stream. If the realtime data loading process is interrupted at time T, it should be restarted to re-read data that arrived at T minus this period.|yes|
|
|intermediatePersistPeriod|ISO8601 Period String|The period that determines the rate at which intermediate persists occur. These persists determine how often commits happen against the incoming realtime stream. If the realtime data loading process is interrupted at time T, it should be restarted to re-read data that arrived at T minus this period.|yes|
|
||||||
|maxRowsInMemory|Number|The number of rows to aggregate before persisting. This number is the post-aggregation rows, so it is not equivalent to the number of input events, but the number of aggregated rows that those events result in. This is used to manage the required JVM heap size.|yes|
|
|maxRowsInMemory|Number|The number of rows to aggregate before persisting. This number is the post-aggregation rows, so it is not equivalent to the number of input events, but the number of aggregated rows that those events result in. This is used to manage the required JVM heap size.|yes|
|
||||||
|
|
||||||
### Firehose
|
|
||||||
|
|
||||||
See [Firehose](Firehose.html).
|
|
||||||
|
|
||||||
### Plumber
|
|
||||||
|
|
||||||
See [Plumber](Plumber.html)
|
|
||||||
|
|
||||||
Constraints
|
Constraints
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -131,18 +116,4 @@ The following table summarizes constraints between settings in the spec file for
|
||||||
|
|
||||||
The normal, expected use cases have the following overall constraints: `indexGranularity < intermediatePersistPeriod =< windowPeriod < segmentGranularity`
|
The normal, expected use cases have the following overall constraints: `indexGranularity < intermediatePersistPeriod =< windowPeriod < segmentGranularity`
|
||||||
|
|
||||||
If the RealtimeNode process runs out of heap, try adjusting druid.computation.buffer.size property which specifies a size in bytes that must fit into the heap.
|
If the Realtime Node process runs out of heap, try adjusting druid.computation.buffer.size property which specifies a size in bytes that must fit into the heap.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Extending the code
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Realtime integration is intended to be extended in two ways:
|
|
||||||
|
|
||||||
1. Connect to data streams from varied systems ([Firehose](https://github.com/druid-io/druid-api/blob/master/src/main/java/io/druid/data/input/FirehoseFactory.java))
|
|
||||||
2. Adjust the publishing strategy to match your needs ([Plumber](https://github.com/metamx/druid/blob/master/server/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java))
|
|
||||||
|
|
||||||
The expectations are that the former will be very common and something that users of Druid will do on a fairly regular basis. Most users will probably never have to deal with the latter form of customization. Indeed, we hope that all potential use cases can be packaged up as part of Druid proper without requiring proprietary customization.
|
|
||||||
|
|
||||||
Given those expectations, adding a firehose is straightforward and completely encapsulated inside of the interface. Adding a plumber is more involved and requires understanding of how the system works to get right, it’s not impossible, but it’s not intended that individuals new to Druid will be able to do it immediately.
|
|
|
@ -1,54 +1,44 @@
|
||||||
---
|
---
|
||||||
layout: doc_page
|
layout: doc_page
|
||||||
---
|
---
|
||||||
Realtime Nodes
|
Real-time Node
|
||||||
========
|
==============
|
||||||
|
For Real-time Node Configuration, see [Realtime Configuration](Realtime-Config.html).
|
||||||
|
|
||||||
|
For Real-time Ingestion, see [Realtime Ingestion](Realtime-ingestion.html).
|
||||||
|
|
||||||
Realtime nodes provide a realtime index. Data indexed via these nodes is immediately available for querying. Realtime nodes will periodically build segments representing the data they’ve collected over some span of time and transfer these segments off to [Historical](Historical.html) nodes. They use ZooKeeper to monitor the transfer and MySQL to store metadata about the transfered segment. Once transfered, segments are forgotten by the Realtime nodes.
|
Realtime nodes provide a realtime index. Data indexed via these nodes is immediately available for querying. Realtime nodes will periodically build segments representing the data they’ve collected over some span of time and transfer these segments off to [Historical](Historical.html) nodes. They use ZooKeeper to monitor the transfer and MySQL to store metadata about the transfered segment. Once transfered, segments are forgotten by the Realtime nodes.
|
||||||
|
|
||||||
|
### Running
|
||||||
Quick Start
|
|
||||||
-----------
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
io.druid.cli.Main server realtime
|
io.druid.cli.Main server realtime
|
||||||
```
|
```
|
||||||
|
Segment Propagation
|
||||||
|
-------------------
|
||||||
|
|
||||||
With the following JVM configuration:
|
The segment propagation diagram for real-time data ingestion can be seen below:
|
||||||
|
|
||||||
```
|
![Segment Propagation](../img/segmentPropagation.png "Segment Propagation")
|
||||||
-server
|
|
||||||
-Xmx256m
|
|
||||||
-Duser.timezone=UTC
|
|
||||||
-Dfile.encoding=UTF-8
|
|
||||||
|
|
||||||
druid.host=localhost
|
You can read about the various components shown in this diagram under the Architecture section (see the menu on the left).
|
||||||
druid.service=realtime
|
|
||||||
druid.port=8083
|
|
||||||
|
|
||||||
druid.extensions.coordinates=["io.druid.extensions:druid-kafka-seven:0.6.52"]
|
### Firehose
|
||||||
|
|
||||||
|
See [Firehose](Firehose.html).
|
||||||
|
|
||||||
druid.zk.service.host=localhost
|
### Plumber
|
||||||
|
|
||||||
# The realtime config file.
|
See [Plumber](Plumber.html)
|
||||||
druid.realtime.specFile=/path/to/specFile
|
|
||||||
|
|
||||||
# Choices: db (hand off segments), noop (do not hand off segments).
|
Extending the code
|
||||||
druid.publish.type=db
|
------------------
|
||||||
|
|
||||||
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
|
Realtime integration is intended to be extended in two ways:
|
||||||
druid.db.connector.user=druid
|
|
||||||
druid.db.connector.password=diurd
|
|
||||||
|
|
||||||
druid.processing.buffer.sizeBytes=100000000
|
1. Connect to data streams from varied systems ([Firehose](https://github.com/druid-io/druid-api/blob/master/src/main/java/io/druid/data/input/FirehoseFactory.java))
|
||||||
```
|
2. Adjust the publishing strategy to match your needs ([Plumber](https://github.com/metamx/druid/blob/master/server/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java))
|
||||||
|
|
||||||
The realtime module also uses several of the default modules in [Configuration](Configuration.html). For more information on the realtime spec file (or configuration file), see [realtime ingestion](Realtime-ingestion.html) page.
|
The expectations are that the former will be very common and something that users of Druid will do on a fairly regular basis. Most users will probably never have to deal with the latter form of customization. Indeed, we hope that all potential use cases can be packaged up as part of Druid proper without requiring proprietary customization.
|
||||||
|
|
||||||
|
Given those expectations, adding a firehose is straightforward and completely encapsulated inside of the interface. Adding a plumber is more involved and requires understanding of how the system works to get right, it’s not impossible, but it’s not intended that individuals new to Druid will be able to do it immediately.
|
||||||
Requirements
|
|
||||||
------------
|
|
||||||
|
|
||||||
Realtime nodes currently require a Kafka cluster to sit in front of them and collect results. There’s [more configuration](Tutorial\:-Loading-Your-Data-Part-2.md#set-up-kafka) required for these as well.
|
|
||||||
|
|
|
@ -14,8 +14,15 @@ h2. Getting Started
|
||||||
* "Tutorial: Loading Your Data Part 2":./Tutorial:-Loading-Your-Data-Part-2.html
|
* "Tutorial: Loading Your Data Part 2":./Tutorial:-Loading-Your-Data-Part-2.html
|
||||||
* "Tutorial: All About Queries":./Tutorial:-All-About-Queries.html
|
* "Tutorial: All About Queries":./Tutorial:-All-About-Queries.html
|
||||||
|
|
||||||
|
h2. Configuration
|
||||||
|
* "Common Configuration":Configuration.html
|
||||||
|
* "Realtime":Realtime-Config.html
|
||||||
|
* "Coordinator":Coordinator-Config.html
|
||||||
|
* "Historical":Historical-Config.html
|
||||||
|
* "Broker":Broker-Config.html
|
||||||
|
* "Indexing Service":Indexing-Service-Config.html
|
||||||
|
|
||||||
h2. Operations
|
h2. Operations
|
||||||
* "Configuration":Configuration.html
|
|
||||||
* "Extending Druid":./Modules.html
|
* "Extending Druid":./Modules.html
|
||||||
* "Cluster Setup":./Cluster-setup.html
|
* "Cluster Setup":./Cluster-setup.html
|
||||||
* "Booting a Production Cluster":./Booting-a-production-cluster.html
|
* "Booting a Production Cluster":./Booting-a-production-cluster.html
|
||||||
|
@ -23,8 +30,6 @@ h2. Operations
|
||||||
|
|
||||||
h2. Data Ingestion
|
h2. Data Ingestion
|
||||||
* "Realtime":./Realtime-ingestion.html
|
* "Realtime":./Realtime-ingestion.html
|
||||||
** "Firehose":./Firehose.html
|
|
||||||
** "Plumber":./Plumber.html
|
|
||||||
* "Batch":./Batch-ingestion.html
|
* "Batch":./Batch-ingestion.html
|
||||||
* "Indexing Service":./Indexing-Service.html
|
* "Indexing Service":./Indexing-Service.html
|
||||||
** "Tasks":./Tasks.html
|
** "Tasks":./Tasks.html
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<metamx.java-util.version>0.25.2</metamx.java-util.version>
|
<metamx.java-util.version>0.25.3</metamx.java-util.version>
|
||||||
<apache.curator.version>2.3.0</apache.curator.version>
|
<apache.curator.version>2.3.0</apache.curator.version>
|
||||||
<druid.api.version>0.1.8</druid.api.version>
|
<druid.api.version>0.1.8</druid.api.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
Loading…
Reference in New Issue