Skip to content

Commit

Permalink
apache#1238 Revert config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
cherrylzhao authored and maxiaoguang64 committed Nov 25, 2018
1 parent 7b0607b commit c8a1392
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
94 changes: 47 additions & 47 deletions sharding-proxy/src/main/resources/conf/config-sharding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,50 @@
#
######################################################################################################

schemaName: sharding_db

dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
username: root
password:
autoCommit: true
connectionTimeout: 30000
idleTimeout: 60000
maxLifetime: 1800000
maximumPoolSize: 50
ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
username: root
password:
autoCommit: true
connectionTimeout: 30000
idleTimeout: 60000
maxLifetime: 1800000
maximumPoolSize: 50

shardingRule:
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..1}
tableStrategy:
inline:
shardingColumn: order_id
algorithmExpression: t_order_${order_id % 2}
keyGeneratorColumnName: order_id
t_order_item:
actualDataNodes: ds_${0..1}.t_order_item_${0..1}
tableStrategy:
inline:
shardingColumn: order_id
algorithmExpression: t_order_item_${order_id % 2}
keyGeneratorColumnName: order_item_id
bindingTables:
- t_order,t_order_item
defaultDatabaseStrategy:
inline:
shardingColumn: user_id
algorithmExpression: ds_${user_id % 2}
defaultTableStrategy:
none:
defaultKeyGeneratorClassName: io.shardingsphere.core.keygen.DefaultKeyGenerator
#schemaName: sharding_db
#
#dataSources:
# ds_0:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
# username: root
# password:
# autoCommit: true
# connectionTimeout: 30000
# idleTimeout: 60000
# maxLifetime: 1800000
# maximumPoolSize: 50
# ds_1:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
# username: root
# password:
# autoCommit: true
# connectionTimeout: 30000
# idleTimeout: 60000
# maxLifetime: 1800000
# maximumPoolSize: 50
#
#shardingRule:
# tables:
# t_order:
# actualDataNodes: ds_${0..1}.t_order_${0..1}
# tableStrategy:
# inline:
# shardingColumn: order_id
# algorithmExpression: t_order_${order_id % 2}
# keyGeneratorColumnName: order_id
# t_order_item:
# actualDataNodes: ds_${0..1}.t_order_item_${0..1}
# tableStrategy:
# inline:
# shardingColumn: order_id
# algorithmExpression: t_order_item_${order_id % 2}
# keyGeneratorColumnName: order_item_id
# bindingTables:
# - t_order,t_order_item
# defaultDatabaseStrategy:
# inline:
# shardingColumn: user_id
# algorithmExpression: ds_${user_id % 2}
# defaultTableStrategy:
# none:
# defaultKeyGeneratorClassName: io.shardingsphere.core.keygen.DefaultKeyGenerator
30 changes: 15 additions & 15 deletions sharding-proxy/src/main/resources/conf/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
# serverLists: localhost:2181
# namespace: orchestration
#
authentication:
username: root
password: root

props:
max.connections.size.per.query: 8
acceptor.size: 16 # The default value is available processors count * 2.
executor.size: 16 # Infinite by default.
# LOCAL: Proxy will run with LOCAL transaction.
# XA: Proxy will run with XA transaction.
# BASE: Proxy will run with B.A.S.E transaction.
proxy.transaction.type: LOCAL
proxy.opentracing.enabled: false
sql.show: false

#authentication:
# username: root
# password: root
#
#props:
# max.connections.size.per.query: 1
# acceptor.size: 16 # The default value is available processors count * 2.
# executor.size: 16 # Infinite by default.
# # LOCAL: Proxy will run with LOCAL transaction.
# # XA: Proxy will run with XA transaction.
# # BASE: Proxy will run with B.A.S.E transaction.
# proxy.transaction.type: LOCAL
# proxy.opentracing.enabled: false
# sql.show: false
#
#configMap:
# sharding-key1: sharding-value1
# sharding-key2: sharding-value2
Expand Down

0 comments on commit c8a1392

Please sign in to comment.