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/04/06 07:49:40 UTC
[GitHub] [shardingsphere] xianshun163 opened a new issue #9946: How to config to use the HashModShardingAlgorithm
xianshun163 opened a new issue #9946:
URL: https://github.com/apache/shardingsphere/issues/9946
## Question
I want to know how to config the config-sharding.yaml file about use the "HashModShardingAlgorithm" shardingAlgorithms .
There is an example in the file config-sharding.yaml like this :
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..2}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: t_order_inline
t_order_inline:
type: INLINE
props:
algorithm-expression: t_order_${order_id % 2}
I have try the example, and it works well.
But I want to use the HashModShardingAlgorithm to sharding my data.
It is there any example about how to config it?
My version is shardingsphere proxy 5.0.0 .
Thanks!
**For English only**, other languages will not accept.
Before asking a question, make sure you have:
- Googled your question.
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
--
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] xianshun163 commented on issue #9946: How to config to use the HashModShardingAlgorithm
Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #9946:
URL: https://github.com/apache/shardingsphere/issues/9946#issuecomment-813925449
t_order_inline:
type: HASH_MOD
props:
sharding-count: "12"
--
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] xianshun163 closed issue #9946: How to config to use the HashModShardingAlgorithm
Posted by GitBox <gi...@apache.org>.
xianshun163 closed issue #9946:
URL: https://github.com/apache/shardingsphere/issues/9946
--
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] xianshun163 commented on issue #9946: How to config to use the HashModShardingAlgorithm
Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #9946:
URL: https://github.com/apache/shardingsphere/issues/9946#issuecomment-813926937
I have do it myselfe.
sharding-count must as a string by "".
--
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