configWithoutDataSourceWithoutProps.yaml 1.7 KB
Newer Older
T
tristaZero 已提交
1 2
shardingRule:
  tables:
T
reverse  
tristaZero 已提交
3 4 5
    config:
      actualDataNodes: db_ms_${0..1}.t_config

T
tristaZero 已提交
6 7 8 9 10
    t_order: 
      actualDataNodes: db_ms_${0..1}.t_order_${0..1}
      databaseStrategy: 
        standard:
          shardingColumn: user_id
T
reverse  
tristaZero 已提交
11
          preciseAlgorithmClassName: io.shardingsphere.shardingjdbc.orchestration.api.yaml.fixture.SingleAlgorithm
T
tristaZero 已提交
12 13 14 15
      tableStrategy: 
        inline:
          shardingColumn: order_id
          algorithmExpression: t_order_${order_id % 2}
16 17 18
      keyGenerator:    
        keyGeneratorColumnName: order_id
        keyGeneratorClassName: io.shardingsphere.shardingjdbc.orchestration.api.yaml.fixture.IncrementKeyGenerator
T
reverse  
tristaZero 已提交
19 20 21 22 23 24 25 26 27 28 29 30

    t_order_item:
      actualDataNodes: db_ms_${0..1}.t_order_item_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: io.shardingsphere.shardingjdbc.orchestration.api.yaml.fixture.SingleAlgorithm
      tableStrategy:
        inline:
          shardingColumn: order_id
          algorithmExpression: t_order_item_${order_id % 2}

T
tristaZero 已提交
31 32
  bindingTables:
    - t_order,t_order_item
T
reverse  
tristaZero 已提交
33 34 35 36 37 38 39
  defaultDatabaseStrategy:
    none:
  defaultTableStrategy:
    complex:
      shardingColumns: id, order_id
      algorithmClassName: io.shardingsphere.shardingjdbc.orchestration.api.yaml.fixture.MultiAlgorithm

T
tristaZero 已提交
40 41 42 43 44
  masterSlaveRules:
    db_ms_0:
      masterDataSourceName: db0_master
      slaveDataSourceNames:
        - db0_slave
T
reverse  
tristaZero 已提交
45
      loadBalanceAlgorithmClassName: io.shardingsphere.api.algorithm.masterslave.RoundRobinMasterSlaveLoadBalanceAlgorithm
T
tristaZero 已提交
46 47 48 49 50 51 52
    db_ms_1:
      masterDataSourceName: db1_master
      slaveDataSourceNames:
        - db1_slave

orchestration:
  name: demo_ds_ms
53
  registry:
T
tristaZero 已提交
54
    serverLists: localhost:3181
55
    namespace: orchestration-yaml-test