Apache Pinot 实时分析数据库
Apache Pinot 是分布式的实时 OLAP 数据库,支持低延迟、高并发的切片和聚合查询。核心组件:Controller、Broker、Server、Minion 和 Deep Storage。
表分为离线表和实时表,按时间分片。适合用户行为、广告、监控和实时报表,不适合强事务和复杂 join。
上传表配置:
curl -X POST http://controller:9000/tables \
-H 'Content-Type: application/json' \
-d @table.json
查看表和 segment:
curl http://controller:9000/tables
curl http://controller:9000/tables/events/segments
SQL 查询:
curl -X POST http://broker:8099/query/sql \
-H 'Content-Type: application/json' \
-d '{"sql":"SELECT event_type, COUNT(*) FROM events GROUP BY event_type ORDER BY 2 DESC LIMIT 10"}'
查看实时表消费状态:
curl http://controller:9000/tables/events/realtime
retentionTime 和业务保留期不一致。