You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/05/25 07:15:51 UTC

[GitHub] [shardingsphere] menghaoranss opened a new issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

menghaoranss opened a new issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454


   - [ ] SHOW SHARDING TABLE RULES (FROM schemaName)
   - [ ] SHOW SHARDING TABLE RULE t_order
   - [ ] SHOW SHARDING BINDING TABLE  RULES (FROM schemaName)?
   - [ ] SHOW SHARDING BROADCAST TABLE RULES (FROM schemaName)?
   - [ ] SHOW READWRITE SPLITTING RULES (FROM schemaName)?
   - [ ] SHOW DB_DISCOVERY RULES (FROM schemaName)?
   - [ ] SHOW ENCRYPT RULES (FROM schemaName)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848662332


   **SHOW ENCRYPT TABLE RULE t_order (from schemaName)?**
   
   ```
   mysql> show encrypt table rule t_encrypt;
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | table     | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | t_encrypt | order_id    | order_cipher | NULL        | MD5           |                         |
   | t_encrypt | user_id     | user_cipher  | user_plain  | AES           | aes-key-value=123456abc |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   2 rows in set (0.00 sec)
   
   mysql> show encrypt table rule t_encrypt from encrypt_db;
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | table     | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | t_encrypt | order_id    | order_cipher | NULL        | MD5           |                         |
   | t_encrypt | user_id     | user_cipher  | user_plain  | AES           | aes-key-value=123456abc |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-847683105


   **SHOW SHARDING BINDING TABLE RULES (FROM schemaName)?**
   
   ```
   mysql> show sharding binding table rules from sharding_db;
   +----------------------+
   | shardingBindingTable |
   +----------------------+
   | t_order,t_order_item |
   | t1,t2                |
   +----------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848629506


   **SHOW ENCRYPT RULES (FROM schemaName)?**
   ```
   mysql> show encrypt rules;
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | table     | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | t_encrypt | user_id     | user_cipher  | user_plain  | AES           | aes-key-value:123456abc |
   | t_encrypt | order_id    | order_cipher | NULL        | MD5           |                         |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848474085


   SHOW DB_DISCOVERY RULES (FROM **schemaName)?**
   
   ```
   mysql> show db_discovery rules from database_discovery_db;
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | name  | dataSourceNames    | discoverType | discoverProps                                                                                               |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | pr_ds | [ds_0, ds_1, ds_2] | MGR          | {keepAliveCron=0/5 * * * * ?, zkServerLists=localhost:2181, groupName=92504d5b-6dec-11e8-91ea-246e9612aaf1} |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848452924


   **SHOW READWRITE_SPLITTING RULES (FROM schemaName)?**
   
   
   _static_
   ```
   mysql> show readwrite_splitting rules;
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   | name       | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames      | loadBalancerType | loadBalancerProps      |
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   | ms_group_0 | NULL                    | ds_primary          |  ds_slave_0, ds_slave_1  | random           |                        |
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   1 row in set (0.00 sec)
   ```
   
   _dynamic_
   ```
   mysql> show readwrite_splitting rules from readwrite_splitting_db;
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   | name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames | loadBalancerType | loadBalancerProps      |
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   | pr_ds | ms_group_0              | NULL                |                     | random           |  read_weight=2:1}      |
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   1 row in set (0.01 sec)
   ```
   
   _all_
   ```
   mysql> show readwrite_splitting rules from readwrite_splitting_db;
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   | name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames    | loadBalancerType | loadBalancerProps      |
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   | pr_ds | ms_group_0              | write_ds            |  read_ds_0, read_ds_1  | random           |  read_weight=2:1       |
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   1 row in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848629506


   **SHOW ENCRYPT RULES (FROM schemaName)?**
   ```
   mysql> show encrypt rules from encrypt_db;
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | table     | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | t_encrypt | order_id    | order_cipher | NULL        | MD5           |                         |
   | t_encrypt | user_id     | user_cipher  | user_plain  | AES           | aes-key-value=123456abc |
   | t_order   | item_id     | order_cipher | NULL        | MD5           |                         |
   | t_order   | order_id    | user_cipher  | user_plain  | AES           | aes-key-value=123456abc |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   4 rows in set (0.01 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-849508539


   **SHOW SHARDING TABLE RULE t_order (FROM schemaName)?**
   ```
   mysql> show sharding table rule t_order;
   +---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
   | table   | actualDataNodes            | actualDataSources | databaseStrategyType | databaseShardingColumn | databaseShardingAlgorithmType | databaseShardingAlgorithmProps         | tableStrategyType | tableShardingColumn | tableShardingAlgorithmType | tableShardingAlgorithmProps                  | keyGenerateColumn | keyGeneratorType | keyGeneratorProps |
   +---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
   | t_order | ds_${0..1}.t_order_${0..1} |                   | INLINE               | user_id                | INLINE                        | algorithm-expression:ds_${user_id % 2} | INLINE            | order_id            | INLINE                     | algorithm-expression:t_order_${order_id % 2} | order_id          | SNOWFLAKE        | worker-id:123     |
   +---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
   1 row in set (0.01 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848662332


   **SHOW ENCRYPT TABLE RULE t_order (from schemaName)?**
   
   ```
   mysql> show encrypt table rule t_encrypt;
   +-------------+--------------+-------------+---------------+-------------------------+
   | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-------------+--------------+-------------+---------------+-------------------------+
   | user_id     | user_cipher  | user_plain  | AES           | aes-key-value:123456abc |
   | order_id    | order_cipher | NULL        | MD5           |                         |
   +-------------+--------------+-------------+---------------+-------------------------+
   2 rows in set (0.01 sec)
   
   mysql> show encrypt table rule t_encrypt from encrypt_db;;
   +-------------+--------------+-------------+---------------+-------------------------+
   | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-------------+--------------+-------------+---------------+-------------------------+
   | user_id     | user_cipher  | user_plain  | AES           | aes-key-value:123456abc |
   | order_id    | order_cipher | NULL        | MD5           |                         |
   +-------------+--------------+-------------+---------------+-------------------------+
   2 rows in set (0.01 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss closed issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-847683105


   **SHOW SHARDING BINDING TABLE RULES (FROM schemaName)?**
   
   ```
   mysql> show sharding binding table rules from sharding_db;
   +----------------------+
   | shardingBindingTables |
   +----------------------+
   | t_order,t_order_item |
   | t1,t2                |
   +----------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-861989490


   **SHOW RESOURCES (FROM schemName)?**
   
   ```
   mysql> show resources;
   +------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | name | type  | host      | port | db   | attribute                                                                                                                                                                                           |
   +------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | ds_0 | MySQL | 127.0.0.1 | 3306 | ds_0 | {"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50,"maintenanceIntervalMilliseconds":30000} |
   | ds_1 | MySQL | 127.0.0.1 | 3306 | ds_1 | {"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50,"maintenanceIntervalMilliseconds":30000} |
   +------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   2 rows in set (0.84 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-849480104


   ```
   mysql> show sharding table rules;
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   | table        | actualDataNodes                 | actualDataSources | databaseStrategyType | databaseShardingColumn | databaseShardingAlgorithmType | databaseShardingAlgorithmProps         | tableStrategyType | tableShardingColumn | tableShardingAlgorithmType | tableShardingAlgorithmProps                       | keyGenerateColumn | keyGeneratorType | keyGeneratorProps |
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   | t_order      | ds_${0..1}.t_order_${0..1}      |                   | INLINE               | user_id                | INLINE                        | algorithm-expression:ds_${user_id % 2} | INLINE            | order_id            | INLINE                     | algorithm-expression:t_order_${order_id % 2}      | order_id          | SNOWFLAKE        | worker-id:123     |
   | t_order_item | ds_${0..1}.t_order_item_${0..1} |                   | INLINE               | user_id                | INLINE                        | algorithm-expression:ds_${user_id % 2} | INLINE            | order_id            | INLINE                     | algorithm-expression:t_order_item_${order_id % 2} | order_item_id     | SNOWFLAKE        | worker-id:123     |
   | t2           |                                 | ds_0,ds_1         |                      |                        |                               |                                        | mod               | id                  | mod                        | sharding-count:10                                 |                   |                  |                   |
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   3 rows in set (0.02 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-847838295


   **SHOW SHARDING BROADCAST TABLE RULES (FROM schemaName)?**
   ```
   mysql> show sharding broadcast table rules;
   +------------------------+
   | shardingBroadcastTable |
   +------------------------+
   | t_1                    |
   | t_2                    |
   +------------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-847838295


   **SHOW SHARDING BROADCAST TABLE RULES (FROM schemaName)?**
   ```
   mysql> show sharding broadcast table rules;
   +------------------------+
   | shardingBroadcastTables |
   +------------------------+
   | t_1                    |
   | t_2                    |
   +------------------------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848474085


   **SHOW DB_DISCOVERY RULES (FROM schemaName)?**
   
   ```
   mysql> show db_discovery rules from database_discovery_db;
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | name  | dataSourceNames    | discoverType | discoverProps                                                                                               |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | pr_ds | [ds_0, ds_1, ds_2] | MGR          | {keepAliveCron=0/5 * * * * ?, zkServerLists=localhost:2181, groupName=92504d5b-6dec-11e8-91ea-246e9612aaf1} |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848629506


   **SHOW ENCRYPT RULES (FROM schemaName)?**
   ```
   mysql> show encrypt rules;
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | table     | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps          |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   | t_encrypt | user_id     | user_cipher  | user_plain  | AES           | aes-key-value:123456abc |
   | t_encrypt | order_id    | order_cipher | NULL        | MD5           |                         |
   | t_order   | item_id     | order_cipher | NULL        | MD5           |                         |
   | t_order   | order_id    | user_cipher  | user_plain  | AES           | aes-key-value:123456abc |
   +-----------+-------------+--------------+-------------+---------------+-------------------------+
   4 rows in set (0.01 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-857624343


   Completed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-849480104


   **SHOW SHARDING TABLE RULES (FROM schemaName)?**
   ```
   mysql> show sharding table rules;
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   | table        | actualDataNodes                 | actualDataSources | databaseStrategyType | databaseShardingColumn | databaseShardingAlgorithmType | databaseShardingAlgorithmProps         | tableStrategyType | tableShardingColumn | tableShardingAlgorithmType | tableShardingAlgorithmProps                       | keyGenerateColumn | keyGeneratorType | keyGeneratorProps |
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   | t_order      | ds_${0..1}.t_order_${0..1}      |                   | INLINE               | user_id                | INLINE                        | algorithm-expression:ds_${user_id % 2} | INLINE            | order_id            | INLINE                     | algorithm-expression:t_order_${order_id % 2}      | order_id          | SNOWFLAKE        | worker-id:123     |
   | t_order_item | ds_${0..1}.t_order_item_${0..1} |                   | INLINE               | user_id                | INLINE                        | algorithm-expression:ds_${user_id % 2} | INLINE            | order_id            | INLINE                     | algorithm-expression:t_order_item_${order_id % 2} | order_item_id     | SNOWFLAKE        | worker-id:123     |
   | t2           |                                 | ds_0,ds_1         |                      |                        |                               |                                        | mod               | id                  | mod                        | sharding-count:10                                 |                   |                  |                   |
   +--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
   3 rows in set (0.02 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848452924


   **SHOW READWRITE_SPLITTING RULES (FROM schemaName)?**
   
   
   _static_
   ```
   mysql> show readwrite_splitting rules;
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   | name       | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames      | loadBalancerType | loadBalancerProps      |
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   | ms_group_0 | NULL                    | ds_primary          | [ds_slave_0, ds_slave_1] | random           | {}                     |
   +------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
   1 row in set (0.00 sec)
   ```
   
   _dynamic_
   ```
   mysql> show readwrite_splitting rules from readwrite_splitting_db;
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   | name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames | loadBalancerType | loadBalancerProps      |
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   | pr_ds | ms_group_0              | NULL                | []                  | random           | {read_weight=2:1}      |
   +-------+-------------------------+---------------------+---------------------+------------------+------------------------+
   1 row in set (0.01 sec)
   ```
   
   _all_
   ```
   mysql> show readwrite_splitting rules from readwrite_splitting_db;
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   | name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames    | loadBalancerType | loadBalancerProps      |
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   | pr_ds | ms_group_0              | write_ds            | [read_ds_0, read_ds_1] | random           | {read_weight=2:1}      |
   +-------+-------------------------+---------------------+------------------------+------------------+------------------------+
   1 row in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss edited a comment on issue #10454: Refactor SHOW SHARDING/READWRITE_SPLITTING/DB_DISCOVERY/ENCRYPT RULES

Posted by GitBox <gi...@apache.org>.
menghaoranss edited a comment on issue #10454:
URL: https://github.com/apache/shardingsphere/issues/10454#issuecomment-848474085


   **SHOW DB_DISCOVERY RULES (FROM schemaName)?**
   
   ```
   mysql> show db_discovery rules from database_discovery_db;
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | name  | dataSourceNames    | discoverType | discoverProps                                                                                               |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   | pr_ds |  ds_0, ds_1, ds_2  | MGR          |  keepAliveCron=0/5 * * * * ?, zkServerLists=localhost:2181, groupName=92504d5b-6dec-11e8-91ea-246e9612aaf1  |
   +-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org