|
|
@@ -15,10 +15,9 @@ import java.util.Map;
|
|
|
/**
|
|
|
* 运行态明细分区滚动清理(公共模块)
|
|
|
* <p>
|
|
|
- * 背景:fhzg_se_snapshot_detail(断面明细)/ fhzg_se_line_loss_detail(线损明细)
|
|
|
- * 为按月 RANGE COLUMNS 分区表,需每月滚动:
|
|
|
+ * 背景:fhzg_se_snapshot_detail(断面明细)为按月 RANGE COLUMNS 分区表,需每月滚动:
|
|
|
* 1. REORGANIZE pMax 拆出下月分区(pMax 含跨月数据时不能直接 ADD,必须 REORGANIZE)
|
|
|
- * 2. DROP 过期月分区(保留策略:断面 30 天 / 线损 7 天 → 最多保留近 2 个自然月)
|
|
|
+ * 2. DROP 过期月分区(保留策略:断面 30 天 → 最多保留近 2 个自然月)
|
|
|
* <p>
|
|
|
* 前置条件:表已完成分区迁移(scripts/migrate_se_detail_partition.sql)。
|
|
|
* 表未分区时安全跳过并告警,不抛异常。
|
|
|
@@ -38,7 +37,6 @@ public class SePartitionRotateScheduler {
|
|
|
private static final Map<String, Integer> PARTITION_TABLES = Collections.unmodifiableMap(
|
|
|
new HashMap<String, Integer>() {{
|
|
|
put("fhzg_se_snapshot_detail", 2); // 30 天保留 → 当前月+上月
|
|
|
- put("fhzg_se_line_loss_detail", 2); // 7 天保留 → 当前月+上月
|
|
|
}});
|
|
|
|
|
|
private final JdbcTemplate jdbcTemplate;
|