plantpulse-warehouse (Data Warehouse / Lakehouse)
Role
A lakehouse module that archives time series data from Aster TSDB into RustFS in Apache Iceberg format. Used for long-term retention, analytical query performance, and integration with other BI tools.
| Item | Value |
|---|---|
| Module name | plantpulse-warehouse-web |
| Install path | /opt/kopens/plantpulse-platform/plantpulse-warehouse/ |
| Port | 9600 |
| Format | Apache Iceberg V2 |
| Storage | RustFS (S3) |
Composition
Directory Structure
plantpulse-warehouse/
├── app/ # 웨어하우스 서비스
├── bin/start.sh stop.sh log-viewer.sh
├── config/
├── etc/ # PID 관리
├── lib/ # Spark JAR
├── logs/system.log
└── s3/
├── archive.sh # 아카이빙
└── optimize.sh # 테이블 최적화
Archiving (archive.sh)
# 전일 데이터 아카이빙 (기본)
/opt/kopens/plantpulse-platform/plantpulse-warehouse/s3/archive.sh
# 특정 날짜
/opt/kopens/plantpulse-platform/plantpulse-warehouse/s3/archive.sh 2026-05-29
- Approximately 60 seconds per 1,000,000 records
- Target: Aster TSDB
tm_tag_point→ RustFSplantpulse-iceberg/warehouse/tag_point/ - Partition:
dt=YYYY-MM-DD/hh=HH/
Iceberg Table Optimization (optimize.sh)
Merges small files, deletes expired snapshots, and cleans up metadata.
/opt/kopens/plantpulse-platform/plantpulse-warehouse/s3/optimize.sh
Recommended cycle: once a week, overnight. There's rarely a need to run this by hand — Temporal already runs it
on schedule PP-S3-OPTIMIZER-WEEKLY (Sunday 04:00), and the script above is what that
workflow calls. Change the time via OP_TIME.
Operations Commands
cd /opt/kopens/plantpulse-platform/plantpulse-datalake-cli/bin
./restart-warehouse.sh
./pd status # 9600 RUNNING 확인
# 표준 헬스체크 (익명, 순수 liveness — 공통 3개 필드 + 시스템/JVM 메트릭 포함)
curl -fsS http://127.0.0.1:9600/api/health
# → {"status":"UP","service":"plantpulse-warehouse-s3","ts":..., ...}
Common Issues
| Symptom | Cause | Action |
|---|---|---|
| Archiving job failed | Spark / Hive not ready | Retry after pd restart analytics |
| Explosion of small files | optimize.sh not run | Run regularly, once a week |
| RustFS running out of disk | Retention period not configured | Iceberg expire snapshots + lifecycle policy |
| Kyuubi query OOM | Large table / missing partition | Specify WHERE dt = '...' explicitly |
SQL Query Example
USE iceberg;
-- 메타데이터
DESCRIBE TABLE EXTENDED tag_point;
-- 5월 집계
SELECT tag_id, count(*) AS rows, min(time), max(time)
FROM tag_point
WHERE dt BETWEEN '2026-05-01' AND '2026-05-31'
GROUP BY tag_id
ORDER BY rows DESC
LIMIT 100;
-- 스냅샷 이력
SELECT * FROM tag_point.snapshots;
SELECT * FROM tag_point.history;