This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new c337f30  Update scaling usage and build doc (#12785)
c337f30 is described below

commit c337f3007b2eb06010ce9afaa396fa746f1c0d4c
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Wed Sep 29 14:01:34 2021 +0800

    Update scaling usage and build doc (#12785)
    
    * Update scaling usage doc
    
    * Update scaling build doc
---
 .../user-manual/shardingsphere-scaling/build.cn.md |  9 +--
 .../user-manual/shardingsphere-scaling/build.en.md |  8 ++-
 .../user-manual/shardingsphere-scaling/usage.cn.md | 73 +++++++++++++++++-----
 .../user-manual/shardingsphere-scaling/usage.en.md | 73 +++++++++++++++++-----
 4 files changed, 126 insertions(+), 37 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-scaling/build.cn.md 
b/docs/document/content/user-manual/shardingsphere-scaling/build.cn.md
index 72f7a91..2d466ff 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/build.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/build.cn.md
@@ -9,14 +9,15 @@ weight = 1
 1. 执行以下命令,编译生成 ShardingSphere-Scaling 二进制包:
 
 ```
-
-git clone https://github.com/apache/shardingsphere.git;
-cd shardingsphere;
-mvn clean install -Prelease;
+git clone --depth 1 https://github.com/apache/shardingsphere.git
+cd shardingsphere
+mvn clean install -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true 
-Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests -Prelease
 ```
 
 
发布包所在目录为:`/shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz`。
 
+或者通过[下载页面]( https://shardingsphere.apache.org/document/current/cn/downloads/ 
)获取安装包。
+
 2. 解压缩发布包,修改配置文件 `conf/server.yaml`,这里主要修改启动端口,保证不与本机其他端口冲突,同时修改断点续传服务(可选)地址即可:
 
 ```
diff --git 
a/docs/document/content/user-manual/shardingsphere-scaling/build.en.md 
b/docs/document/content/user-manual/shardingsphere-scaling/build.en.md
index 8133449..11e2d93 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/build.en.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/build.en.md
@@ -9,13 +9,15 @@ weight = 1
 1. Execute the following command to compile and generate the 
ShardingSphere-Scaling binary package:
 
 ```
-git clone https://github.com/apache/shardingsphere.git;
-cd shardingsphere;
-mvn clean install -Prelease;
+git clone --depth 1 https://github.com/apache/shardingsphere.git
+cd shardingsphere
+mvn clean install -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true 
-Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests -Prelease
 ```
 
 The binary package's directory 
is:`/shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz`。
 
+Or get binary package from [download page]( 
https://shardingsphere.apache.org/document/current/en/downloads/ ).
+
 2. Unzip the distribution package, modify the configuration file 
`conf/server.yaml`, we should ensure the port does not conflict with others, 
and modify the resume from break-point(optional) server lists:
 
 ```
diff --git 
a/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md 
b/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
index 4aefc13..0575b32 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
@@ -57,7 +57,7 @@ PostgreSQL 需要开启 
[test_decoding](https://www.postgresql.org/docs/9.4/test
 | ------------------------------------------------- | 
------------------------------------------------------------ |
 | ruleConfig.source                                 | 源端数据源相关配置                
                             |
 | ruleConfig.target                                 | 目标端数据源相关配置               
                            |
-| jobConfiguration.concurrency                      | 
迁移并发度,举例:如果设置为3,则待迁移的表将会有三个线程同时对该表进行迁移,前提是该表有整数型主键 |
+| handleConfig.concurrency                          | 
迁移并发度,举例:如果设置为3,则待迁移的表将会有三个线程同时对该表进行迁移,前提是该表有整数型主键 |
 
 数据源配置:
 
@@ -79,19 +79,20 @@ curl -X POST \
   -d '{
         "ruleConfig": {
           "source": {
+            "schemaName": "sharding_db",
             "type": "shardingSphereJdbc",
             "parameter": "
                 dataSources:
                   ds_0:
                     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_0?useSSL=false
-                    username: scaling
-                    password: scaling
+                    username: root
+                    password: root
                   ds_1:
                     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_1?useSSL=false
-                    username: scaling
-                    password: scaling
+                    username: root
+                    password: root
                 rules:
                 - !SHARDING
                   tables:
@@ -99,34 +100,76 @@ curl -X POST \
                       actualDataNodes: ds_$->{0..1}.t_order_$->{0..1}
                       databaseStrategy:
                         standard:
-                          shardingColumn: order_id
+                          shardingColumn: user_id
                           shardingAlgorithmName: t_order_db_algorith
                       logicTable: t_order
                       tableStrategy:
                         standard:
-                          shardingColumn: user_id
+                          shardingColumn: order_id
                           shardingAlgorithmName: t_order_tbl_algorith
                   shardingAlgorithms:
                     t_order_db_algorith:
                       type: INLINE
                       props:
-                        algorithm-expression: ds_$->{order_id % 2}
+                        algorithm-expression: ds_$->{user_id % 2}
                     t_order_tbl_algorith:
                       type: INLINE
                       props:
-                        algorithm-expression: t_order_$->{user_id % 2}
+                        algorithm-expression: t_order_$->{order_id % 2}
                 "
           },
           "target": {
-              "type": "jdbc",
-              "parameter": "
-                username: root
-                password: root
-                jdbcUrl: 
jdbc:mysql://127.0.0.1:3307/sharding_db?serverTimezone=UTC&useSSL=false
+            "schemaName": "sharding_db",
+            "type": "shardingSphereJdbc",
+            "parameter": "
+                dataSources:
+                  ds_0:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_2?useSSL=false
+                    username: root
+                    password: root
+                  ds_1:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_3?useSSL=false
+                    username: root
+                    password: root
+                  ds_2:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_4?useSSL=false
+                    username: root
+                    password: root
+                  ds_3:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_5?useSSL=false
+                    username: root
+                    password: root
+                rules:
+                - !SHARDING
+                  tables:
+                    t_order:
+                      actualDataNodes: ds_$->{0..3}.t_order_$->{0..3}
+                      databaseStrategy:
+                        standard:
+                          shardingColumn: user_id
+                          shardingAlgorithmName: t_order_db_algorith
+                      logicTable: t_order
+                      tableStrategy:
+                        standard:
+                          shardingColumn: order_id
+                          shardingAlgorithmName: t_order_tbl_algorith
+                  shardingAlgorithms:
+                    t_order_db_algorith:
+                      type: INLINE
+                      props:
+                        algorithm-expression: ds_$->{user_id % 4}
+                    t_order_tbl_algorith:
+                      type: INLINE
+                      props:
+                        algorithm-expression: t_order_$->{order_id % 4}
                 "
           }
         },
-        "jobConfiguration":{
+        "handleConfig":{
           "concurrency":"3"
         }
       }'
diff --git 
a/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md 
b/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
index eb2ad44..bf35ee6 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
@@ -57,7 +57,7 @@ Body:
 | ------------------------------------------------- | 
------------------------------------------------------------ |
 | ruleConfig.source                                 | source data source 
configuration                             |
 | ruleConfig.target                                 | target data source 
configuration                             |
-| jobConfiguration.concurrency                      | sync task proposed 
concurrency                               |
+| handleConfig.concurrency                          | sync task proposed 
concurrency                               |
 
 Data source configuration:
 
@@ -79,19 +79,20 @@ curl -X POST \
   -d '{
         "ruleConfig": {
           "source": {
+            "schemaName": "sharding_db",
             "type": "shardingSphereJdbc",
             "parameter": "
                 dataSources:
                   ds_0:
                     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_0?useSSL=false
-                    username: scaling
-                    password: scaling
+                    username: root
+                    password: root
                   ds_1:
                     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
                     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_1?useSSL=false
-                    username: scaling
-                    password: scaling
+                    username: root
+                    password: root
                 rules:
                 - !SHARDING
                   tables:
@@ -99,34 +100,76 @@ curl -X POST \
                       actualDataNodes: ds_$->{0..1}.t_order_$->{0..1}
                       databaseStrategy:
                         standard:
-                          shardingColumn: order_id
+                          shardingColumn: user_id
                           shardingAlgorithmName: t_order_db_algorith
                       logicTable: t_order
                       tableStrategy:
                         standard:
-                          shardingColumn: user_id
+                          shardingColumn: order_id
                           shardingAlgorithmName: t_order_tbl_algorith
                   shardingAlgorithms:
                     t_order_db_algorith:
                       type: INLINE
                       props:
-                        algorithm-expression: ds_$->{order_id % 2}
+                        algorithm-expression: ds_$->{user_id % 2}
                     t_order_tbl_algorith:
                       type: INLINE
                       props:
-                        algorithm-expression: t_order_$->{user_id % 2}
+                        algorithm-expression: t_order_$->{order_id % 2}
                 "
           },
           "target": {
-              "type": "jdbc",
-              "parameter": "
-                username: root
-                password: root
-                jdbcUrl: 
jdbc:mysql://127.0.0.1:3307/sharding_db?serverTimezone=UTC&useSSL=false
+            "schemaName": "sharding_db",
+            "type": "shardingSphereJdbc",
+            "parameter": "
+                dataSources:
+                  ds_0:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_2?useSSL=false
+                    username: root
+                    password: root
+                  ds_1:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_3?useSSL=false
+                    username: root
+                    password: root
+                  ds_2:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_4?useSSL=false
+                    username: root
+                    password: root
+                  ds_3:
+                    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+                    jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_5?useSSL=false
+                    username: root
+                    password: root
+                rules:
+                - !SHARDING
+                  tables:
+                    t_order:
+                      actualDataNodes: ds_$->{0..3}.t_order_$->{0..3}
+                      databaseStrategy:
+                        standard:
+                          shardingColumn: user_id
+                          shardingAlgorithmName: t_order_db_algorith
+                      logicTable: t_order
+                      tableStrategy:
+                        standard:
+                          shardingColumn: order_id
+                          shardingAlgorithmName: t_order_tbl_algorith
+                  shardingAlgorithms:
+                    t_order_db_algorith:
+                      type: INLINE
+                      props:
+                        algorithm-expression: ds_$->{user_id % 4}
+                    t_order_tbl_algorith:
+                      type: INLINE
+                      props:
+                        algorithm-expression: t_order_$->{order_id % 4}
                 "
           }
         },
-        "jobConfiguration":{
+        "handleConfig":{
           "concurrency":"3"
         }
       }'

Reply via email to