feat: 添加对 Kafka CurrentStatus 的 restart 值支持,更新 G5 入库逻辑及相关测试
This commit is contained in:
@@ -41,10 +41,10 @@ G5库结构(双写,临时接入):
|
||||
差异字段:
|
||||
- guid 为 int4,由库自己生成。
|
||||
- record_source 固定为 CRICS。
|
||||
- current_status 为 int2,on映射为1,off映射为2,其余为0。
|
||||
- current_status 为 int2,on映射为1,off映射为2,restart映射为3,其余为0。
|
||||
支持通过环境变量开关双写。
|
||||
|
||||
4. 数据处理规则
|
||||
非重启数据:reboot_reason 为空或不存在,current_status 取 CurrentStatus
|
||||
重启数据:reboot_reason 不为空,current_status 固定为 on
|
||||
重启数据:reboot_reason 不为空时保留 Kafka 上游 current_status 值;若上游值为 restart,则入库标记为 restart,G5 库映射为 3
|
||||
其余字段直接按 Kafka 原值落库,空值不补 0
|
||||
|
||||
Reference in New Issue
Block a user