Support scaling for shardingsphere
I missing an important work for sharding scaling. In order to support scaling for shardingsphere, We need to understand the sharding rule, and mapping the sharding table name to the actual table name.
For sharding rule:
t_order:
actualDataNodes: ds${0..1}.t_order${0..1}
We need synchronize table t_order0 and t_order1 from ds0, table t_order0 and t_order1 from ds1, this four table all map to t_order.
- [x] Parse shardingsphere rule configuration.
- [x] Filter table not in shardingsphere rule configuration(history sync and realtime sync).
- [x] Mapping actual table name to logic table name in reader.
@ssxlulu @KomachiSion How to submit the sharding rule file in start job interface? Put file content in json field?
I think we can get full configuration by interface, and use sharding-core to parse them to xxxConfiguration.
For example, TableRuleConfigurationYamlSwapper can parse table rule from yaml to TableRuleConfiguration, TableRuleConfiguration include logicTable and actualDataNodes.
@avalon566 You can implement this based on YamlSwapper interface, which includes TableRuleConfigurationYamlSwapper, OrchestrationConfigurationYamlSwapper , and includes DataNode and Table configuration.
@SteNicholas Thx, I will reference to this interface.