dtc.dbaddition.s2.yaml 872 B

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # DTC configure file. v2
  3. # Cache with Datasource Test cases.
  4. # Scene 2: Single DB Sharding Table
  5. # table name: opensource_0 ... opensource_9
  6. # total: 10 tables.
  7. #
  8. props:
  9. log.level: debug
  10. listener.port.dtc: 20015
  11. shm.mem.size: 100 #MB
  12. connector.procs: 1
  13. connection: &connection
  14. addr: 127.0.0.1:3307
  15. user: username
  16. pwd: password
  17. primary:
  18. db: &db dtc
  19. table: &table opensource
  20. cache:
  21. field:
  22. - {name: &key uid, type: signed, size: 4}
  23. - {name: name, type: string, size: 50}
  24. - {name: city, type: string, size: 50}
  25. - {name: sex, type: signed, size: 4}
  26. - {name: age, type: signed, size: 4}
  27. hot:
  28. logic:
  29. {db: *db, table: *table, connection: *connection}
  30. real:
  31. - {addr: mysql:3306, user: root, pwd: 123456, db: layer2}
  32. sharding:
  33. key: *key
  34. table: {prefix: [*table, _], start: 0, last: 9}