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/06/23 14:57:51 UTC
[GitHub] [shardingsphere] monkeymada opened a new issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
monkeymada opened a new issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952
## Question
**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**.
Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
For example:(This configuration reported an error)
spring.shardingsphere.rules.sharding.tables.<table-name>.database-strategy.hint.<myClassName>.sharding-algorithm-name=myClassName
--
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] monkeymada commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
monkeymada commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867421702
Refer to the document configuration but always report an error:
Caused by: org.apache.shardingsphere.infra.spi.exception.ServiceProviderNotFoundException: No implementation class load from SPI `org.apache.shardingsphere.sharding.spi.ShardingAlgorithm` with type `CLASS_BASED`.
Configuration details:
#sharding-jdbc
#spring.shardingsphere.datasource.names=ds1,ds2
spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.common.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.common.username=admin
spring.shardingsphere.datasource.common.password=123456
spring.shardingsphere.datasource.ds1.jdbc-url=jdbc:mysql://localhost:3306/my_sql?serverTimezone=UTC&useSSL=false
spring.shardingsphere.datasource.ds2.jdbc-url=jdbc:mysql://localhost:3306/my_sql?serverTimezone=UTC&useSSL=false
# 用于Hint 的分片策略
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds${1..2}.t_order
spring.shardingsphere.rules.sharding.tables.t_order.database-strategy.hint.hint-test.sharding-algorithm-name=hint-test
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.type=CLASS_BASED
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.strategy=HINT
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.algorithmClassName=com.shardingjdbc.test.DatabaseHintShardingKeyAlgorithm
--
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] strongduanmu commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867295768
@monkeymada You can refer to the example module in the `shardingsphere` source code project, we provide `hint-example`.
--
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] strongduanmu edited a comment on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867295768
@monkeymada You can refer to the example module in the `shardingsphere` source code project, we provide `hint-example`.
https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example/other-feature-example/hint-example
--
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] Yule-Momoko closed issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
Yule-Momoko closed issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867424664
@monkeymada Please try `5.0.0-beta` version.
--
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] strongduanmu commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867429652
@monkeymada The CLASS_BASED configuration is a new feature added in the beta version, so it can only be used after an upgrade.
--
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] monkeymada commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
monkeymada commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867435499
Plan to use online, so want to use stable version
--
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] monkeymada commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
monkeymada commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867425861
Could you please help me to check where is my configuration wrong
--
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] monkeymada commented on issue #10952: Is there a Sharding-JDBC 5.0.0-alpha hint configuration demo
Posted by GitBox <gi...@apache.org>.
monkeymada commented on issue #10952:
URL: https://github.com/apache/shardingsphere/issues/10952#issuecomment-867434642
Please tell me how to configure the hint mode correctly in 5.0.0-alpha. Please tell me how to configure the hint mode correctly
--
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