Version Matrix
| Item | Verified | Note |
|---|---|---|
| Apache Druid 30.0.0 | Yes | Three roles: master/data/query |
| Dependency: ZooKeeper three-node | Yes | First start zkServer.sh start |
| Dependency: Hadoop/HDFS | Yes | start-all.sh or start-dfs.sh |
| Historical: -Xmx512m / Direct 1g | Yes | Sync processing.buffer.sizeBytes≈50 MiB |
| Broker: -Xmx512m / Direct 512m | Yes | Sync processing.buffer.sizeBytes≈50 MiB |
| Router: -Xmx128m / Direct 128m | Yes | Lightweight routing, only forwards queries |
| Timezone parameter -Duser.timezone=UTC+8 | Yes | Can run |
Configuration Summary
- coordinator-overlord: 512M
- historical: 512M, off-heap 1G
- middleManager: 128M
- broker: 512M, off-heap 512M
- router: 128M, off-heap 128M
Key Formula
maxDirectMemory = druid.processing.buffer.sizeBytes × (druid.processing.numMergeBuffers + druid.processing.numThreads + 1)
If processing.buffer.sizeBytes is too large, need to increase maxDirectMemory, otherwise service cannot start.
Startup Commands
Query Node (h121):
cd /opt/servers/apache-druid-30.0.0
nohup start-cluster-query-server &
Data Node (h122):
cd /opt/servers/apache-druid-30.0.0
nup start-cluster-data-server &
Master Node (h123):
cd /opt/servers/apache-druid-30.0.0
nohup start-cluster-master-no-zk-server &
Error Quick Reference
| Symptom | Root Cause | Fix |
|---|---|---|
| Historical won’t start, logs contain Direct buffer OOM | processing.buffer.sizeBytes doesn’t match MaxDirectMemorySize | Increase MaxDirectMemorySize or lower buffer |
| Broker crashes after query, OutOfMemoryError | Broker off-heap too small and concurrency slightly high | Temporarily lower concurrency; or increase DirectMemory to 1g |
| Query reports Cannot acquire enough memory | Buffer too small or too many thread/merge buffers | Lower numThreads/numMergeBuffers or raise buffer |
WebUI Access
http://h121.wzk.icu:8888