pengxianggui commented on issue #23128:
URL:
https://github.com/apache/shardingsphere/issues/23128#issuecomment-1369312322
> Please show us your configuration.
```yml
rules:
- !SHARDING
broadcastTables:
- t_alarm_domain # 广播表规则列表
bindingTables: # 绑定表规则列表。见:
https://github.com/apache/shardingsphere/issues/21002
- t_alarm,t_sensor_alarm
- t_alarm,t_video_alarm
- t_alarm,t_device_offline_alarm
- t_alarm,t_alarm_handle
tables: # 单分片键的标准分片场景
t_alarm:
actualDataNodes: db0.t_alarm_$->{2022..2025}
tableStrategy:
standard:
shardingColumn: alarm_time
shardingAlgorithmName: time-inline
t_sensor_alarm:
actualDataNodes: db0.t_sensor_alarm_$->{2022..2025}
tableStrategy:
standard:
shardingColumn: alarm_time
shardingAlgorithmName: time-inline
t_video_alarm:
actualDataNodes: db0.t_video_alarm_$->{2022..2025}
tableStrategy:
standard:
shardingColumn: alarm_time
shardingAlgorithmName: time-inline
t_device_offline_alarm:
actualDataNodes: db0.t_device_offline_alarm_$->{2022..2025}
tableStrategy:
standard:
shardingColumn: alarm_time
shardingAlgorithmName: time-inline
t_alarm_handle:
actualDataNodes: db0.t_alarm_handle_$->{2022..2025}
tableStrategy:
standard:
shardingColumn: alarm_time
shardingAlgorithmName: time-inline
shardingAlgorithms:
time-inline:
type: CLASS_BASED
props:
strategy: standard
algorithmClassName:
cn.com.asoco.alarm_platform.server.sharding.AlarmTimeShardingAlgorithm #
使用自定义类实现分片逻辑处理
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]