plantpulse-batch (Batch Processing)
Role
Schedule-based batch job executor. Performs daily/hourly/monthly statistical aggregation, data cleanup, report generation, and OEE/RAM/EMS plugin calculations.
| Item | Value |
|---|---|
| Module name | plantpulse-batch |
| Installation path | /opt/kopens/plantpulse-platform/plantpulse-batch/ |
| Port | 9500 |
| Scheduler | Quartz (PostgreSQL JDBC store) |
Primary responsibilities
- Hourly / daily / monthly aggregation (tag → asset)
- OEE / RAM / EMS plugin calculation
- Automated report generation
- Data retention policy enforcement
- Data integrity validation
Architecture
Directory structure
plantpulse-batch/
├── config/
│ └── plantpulse-batch.properties # 배치 설정 (외부화 — 배포해도 유지)
├── bin/start.sh stop.sh log-viewer.sh
├── logs/system.log
└── server/ # 내장 Tomcat (webapps/ROOT.war)
└── conf/server.xml
Key configuration
plantpulse-batch/config/plantpulse-batch.properties — configure.sh generates env.sh values by substitution. Do not edit files within the web application (they are removed during deployment).
# 메타스토어 (PostgreSQL)
metastore.url=jdbc:postgresql://${PP_POSTGRES_HOST}:${PP_POSTGRES_PORT}/${PP_DB_NAME}
metastore.user=${PP_PG_USER}
metastore.password=${PP_PG_PASSWORD}
# 시계열 저장소 (Cassandra) / TSE
storage.db.host=${PP_CASSANDRA_HOST}
storage.db.keyspace=${PP_KEYSPACE}
tse.host=${PP_TSE_HOST}
# 배치 동작
batch.timer_schedule_delay=5000 # 배치 타이머 주기 (ms)
batch.thread_pool_batch_thread_size=4 # 배치 워커 스레드 수
batch.buffer_drain_limit_size=10000 # 1회 드레인 최대 건수
batch.sync.tse.enabled=true # TSE 동기화
batch.sync.external.db.enabled=false # 외부 DB 동기화 (TimescaleDB/InfluxDB/QuestDB)
Operations commands
cd /opt/kopens/plantpulse-platform/plantpulse-datalake-cli/bin
./restart-batch.sh
./pd status # 9500 RUNNING 확인
# 표준 헬스체크 (익명, readiness — 배치 파이프라인 가동·Redis 연결 시에만 UP)
curl -fsS http://127.0.0.1:9500/api/health
# 준비 완료: 200 {"status":"UP","service":"plantpulse-batch-web","ts":...,"checks":{"timer":true,"redis":true}}
# 기동 전: 503 {"status":"STARTING",...} / 기동 후 의존성 다운: 503 {"status":"DEGRADED",...}
From the console, use System > Batch Management to run, pause, or trigger individual jobs.
Common issues
| Symptom | Cause | Action |
|---|---|---|
| Job does not run | Quartz lock / cluster conflict | Check qrtz_locks table |
| Aggregation results missing | Target data time range error | Verify batch interval (batch.timer_schedule_delay) and target period settings |
| Out of memory | Large window processing | Increase heap or split window |
Related documentation
- Module index
- Plugins (OEE/RAM/EMS) user guide
- Developer: Scheduler architecture