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 2020/03/25 18:30:08 UTC
[GitHub] [incubator-shardingsphere] TaoZhiMLND opened a new pull request
#4945: make key-generator as a spring bean on spring namespace.
TaoZhiMLND opened a new pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945
Fixes #1977.
Changes proposed in this pull request:
- [✓] change `shardingNamespace.xml` configuration.
- [✓] create class `KeyGeneratorFactoryBean` extends `TypeBasedSPIConfiguration` implements `FactoryBean<ShardingKeyGenerator>`,leverage `FactoryBean` to create KeyGenerator.
- [✓] modify class `KeyGeneratorConfiguration`~~extends TypeBasedSPIConfiguration~~,add member variables `ShardingKeyGenerator keyGenerator`.
- [✓] modify class `KeyGeneratorBeanDefinitionParser` addConstructorArgReference with `KeyGenerator` by using TAG `generator-ref`.
- [✓] modify class `TableRule`, shardingKeyGenerator=tableRuleConfig.getKeyGeneratorConfig().getKeyGenerator().
- [✓] modify class `ShardingRule`, use keyGeneratorConfiguration.getKeyGenerator() instead of create by ShardingKeyGeneratorServiceLoader.
- [✓] modify correlative tests, add test on `ShardingKeyGenerator` Bean.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399813763
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
ShardingKeyGenerator has renamed to KeyGenerateAlgorithm.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] tristaZero commented on issue #4945:
make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-612835490
@TaoZhiMLND Hi Very appreciated your contribution to this community. I think you took a lot of time on this PR. Good job! :-)
Recently, I am working on a similar issue with you, so could I get some advice from you?
The question is whether it is possible to hide the `KeyGenerateAlgorithmFactoryBean` in xml from users?
Like this one below,
```
From
<bean id="incrementAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGenerateAlgorithmFactoryBean">
<property name="type" value="INCREMENT" />
</bean>
To
<bean id="incrementAlgorithm" name="type" value="INCREMENT" />
```
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] cherrylzhao merged pull request #4945:
make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
cherrylzhao merged pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604253200
## Pull Request Test Coverage Report for [Build 10672](https://coveralls.io/builds/29675686)
* **18** of **18** **(100.0%)** changed or added relevant lines in **6** files are covered.
* **3** unchanged lines in **1** file lost coverage.
* Overall coverage increased (+**0.02%**) to **57.649%**
---
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29675686/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
<!-- | **Total:** | **3** | | -->
| Totals | [![Coverage Status](https://coveralls.io/builds/29675686/badge)](https://coveralls.io/builds/29675686) |
| :-- | --: |
| Change from base [Build 1201](https://coveralls.io/builds/29675449): | 0.02% |
| Covered Lines: | 11829 |
| Relevant Lines: | 20519 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399814767
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
> here we should rename ShardingKeyGenerator SPI to KeyGenerateAlgorithm.
> Be care about modifying all sub class of ShardingKeyGenerator
ShardingKeyGenerator has renamed to KeyGenerateAlgorithm, including all sub class of ShardingKeyGenerator and ShardingKeyGeneratorServiceLoader.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] codecov-io edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604251543
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=h1) Report
> Merging [#4945](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/61378239e8a8ec7356677b7aff287b772c45c68f&el=desc) will **decrease** coverage by `0.21%`.
> The diff coverage is `94.11%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4945 +/- ##
============================================
- Coverage 54.54% 54.33% -0.22%
- Complexity 440 445 +5
============================================
Files 1136 1144 +8
Lines 20448 20524 +76
Branches 3758 3762 +4
============================================
- Hits 11154 11152 -2
- Misses 8586 8667 +81
+ Partials 708 705 -3
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...org/apache/shardingsphere/core/rule/TableRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1RhYmxlUnVsZS5qYXZh) | `84.09% <50.00%> (ø)` | `1.00 <0.00> (ø)` | |
| [...api/config/sharding/KeyGeneratorConfiguration.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYXBpL2NvbmZpZy9zaGFyZGluZy9LZXlHZW5lcmF0b3JDb25maWd1cmF0aW9uLmphdmE=) | `100.00% <100.00%> (+50.00%)` | `0.00 <0.00> (ø)` | |
| [.../apache/shardingsphere/core/rule/ShardingRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1NoYXJkaW5nUnVsZS5qYXZh) | `74.34% <100.00%> (-5.24%)` | `0.00 <0.00> (ø)` | |
| [.../swapper/KeyGeneratorConfigurationYamlSwapper.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS95YW1sL3N3YXBwZXIvS2V5R2VuZXJhdG9yQ29uZmlndXJhdGlvbllhbWxTd2FwcGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [.../factorybean/KeyGeneratorAlgorithmFactoryBean.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvZmFjdG9yeWJlYW4vS2V5R2VuZXJhdG9yQWxnb3JpdGhtRmFjdG9yeUJlYW4uamF2YQ==) | `100.00% <100.00%> (ø)` | `2.00 <2.00> (?)` | |
| [...space/parser/KeyGeneratorBeanDefinitionParser.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvcGFyc2VyL0tleUdlbmVyYXRvckJlYW5EZWZpbml0aW9uUGFyc2VyLmphdmE=) | `100.00% <100.00%> (+18.18%)` | `1.00 <0.00> (ø)` | |
| [...che/shardingsphere/core/rule/BindingTableRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL0JpbmRpbmdUYWJsZVJ1bGUuamF2YQ==) | `73.07% <0.00%> (-26.93%)` | `0.00% <0.00%> (ø%)` | |
| [...underlying/common/database/type/DatabaseTypes.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtdW5kZXJseWluZy9zaGFyZGluZ3NwaGVyZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3VuZGVybHlpbmcvY29tbW9uL2RhdGFiYXNlL3R5cGUvRGF0YWJhc2VUeXBlcy5qYXZh) | `83.33% <0.00%> (-7.15%)` | `0.00% <0.00%> (ø%)` | |
| [.../shardingsphere/core/shard/BaseShardingEngine.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWVudHJ5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9jb3JlL3NoYXJkL0Jhc2VTaGFyZGluZ0VuZ2luZS5qYXZh) | `83.33% <0.00%> (-3.04%)` | `0.00% <0.00%> (ø%)` | |
| ... and [59 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=footer). Last update [6137823...fe90913](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r398255632
##########
File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java
##########
@@ -217,10 +217,10 @@ private void checkRule(final List<String> dataNodes) {
throw new ShardingSphereConfigurationException("ActualDataNodes must be configured if want to shard tables for logicTable [%s]", logicTable);
}
}
-
+
/**
* Get generate key column.
- *
Review comment:
keep origin blankspaces
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604253200
## Pull Request Test Coverage Report for [Build 10693](https://coveralls.io/builds/29691293)
* **28** of **28** **(100.0%)** changed or added relevant lines in **9** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.02%**) to **57.259%**
---
| Totals | [![Coverage Status](https://coveralls.io/builds/29691293/badge)](https://coveralls.io/builds/29691293) |
| :-- | --: |
| Change from base [Build 10692](https://coveralls.io/builds/29690884): | 0.02% |
| Covered Lines: | 11726 |
| Relevant Lines: | 20479 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r398255615
##########
File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java
##########
@@ -217,10 +217,10 @@ private void checkRule(final List<String> dataNodes) {
throw new ShardingSphereConfigurationException("ActualDataNodes must be configured if want to shard tables for logicTable [%s]", logicTable);
}
}
-
Review comment:
keep origin blankspaces
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls commented on issue #4945: make
key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604253200
## Pull Request Test Coverage Report for [Build 10590](https://coveralls.io/builds/29626286)
* **17** of **19** **(89.47%)** changed or added relevant lines in **6** files are covered.
* **150** unchanged lines in **3** files lost coverage.
* Overall coverage decreased (**-0.09%**) to **57.988%**
---
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-namespace/src/main/java/org/apache/shardingsphere/shardingjdbc/spring/namespace/factorybean/KeyGeneratorFactoryBean.java](https://coveralls.io/builds/29626286/source?filename=sharding-spring%2Fsharding-jdbc-spring%2Fsharding-jdbc-spring-namespace%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fspring%2Fnamespace%2Ffactorybean%2FKeyGeneratorFactoryBean.java#L36) | 6 | 8 | 75.0%
<!-- | **Total:** | **17** | **19** | **89.47%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29626286/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29626286/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L42) | 14 | 0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29626286/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L127) | 133 | 0% |
<!-- | **Total:** | **150** | | -->
| Totals | [![Coverage Status](https://coveralls.io/builds/29626286/badge)](https://coveralls.io/builds/29626286) |
| :-- | --: |
| Change from base [Build 1173](https://coveralls.io/builds/29607358): | -0.09% |
| Covered Lines: | 11877 |
| Relevant Lines: | 20482 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] codecov-io edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604251543
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=h1) Report
> Merging [#4945](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/e330c7b54315d33df1ae0ac14da17b1f5b6beb74&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `92.59%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4945 +/- ##
============================================
+ Coverage 53.82% 53.85% +0.02%
- Complexity 441 443 +2
============================================
Files 1139 1140 +1
Lines 20474 20471 -3
Branches 3741 3740 -1
============================================
+ Hits 11021 11024 +3
+ Misses 8748 8743 -5
+ Partials 705 704 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...org/apache/shardingsphere/core/rule/TableRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1RhYmxlUnVsZS5qYXZh) | `83.90% <75.00%> (-0.19%)` | `1.00 <0.00> (ø)` | |
| [.../apache/shardingsphere/core/rule/ShardingRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1NoYXJkaW5nUnVsZS5qYXZh) | `73.73% <80.00%> (-0.27%)` | `0.00 <0.00> (ø)` | |
| [...api/config/sharding/KeyGeneratorConfiguration.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYXBpL2NvbmZpZy9zaGFyZGluZy9LZXlHZW5lcmF0b3JDb25maWd1cmF0aW9uLmphdmE=) | `100.00% <100.00%> (+50.00%)` | `0.00 <0.00> (ø)` | |
| [...strategy/keygen/SnowflakeKeyGenerateAlgorithm.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9zdHJhdGVneS9rZXlnZW4vU25vd2ZsYWtlS2V5R2VuZXJhdGVBbGdvcml0aG0uamF2YQ==) | `93.18% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...core/strategy/keygen/UUIDKeyGenerateAlgorithm.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9zdHJhdGVneS9rZXlnZW4vVVVJREtleUdlbmVyYXRlQWxnb3JpdGhtLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../swapper/KeyGeneratorConfigurationYamlSwapper.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS95YW1sL3N3YXBwZXIvS2V5R2VuZXJhdG9yQ29uZmlndXJhdGlvbllhbWxTd2FwcGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...ithm/keygen/KeyGenerateAlgorithmServiceLoader.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3BpL2FsZ29yaXRobS9rZXlnZW4vS2V5R2VuZXJhdGVBbGdvcml0aG1TZXJ2aWNlTG9hZGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...e/factorybean/KeyGenerateAlgorithmFactoryBean.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvZmFjdG9yeWJlYW4vS2V5R2VuZXJhdGVBbGdvcml0aG1GYWN0b3J5QmVhbi5qYXZh) | `100.00% <100.00%> (ø)` | `2.00 <2.00> (?)` | |
| [...space/parser/KeyGeneratorBeanDefinitionParser.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvcGFyc2VyL0tleUdlbmVyYXRvckJlYW5EZWZpbml0aW9uUGFyc2VyLmphdmE=) | `100.00% <100.00%> (+18.18%)` | `1.00 <0.00> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=footer). Last update [e330c7b...4f2d845](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399813872
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
> here we should rename ShardingKeyGenerator SPI to KeyGenerateAlgorithm.
> Be care about modifying all sub class of ShardingKeyGenerator
ShardingKeyGenerator has renamed to KeyGenerateAlgorithm.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399813763
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
ShardingKeyGenerator has renamed to KeyGenerateAlgorithm.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] cherrylzhao commented on a change in
pull request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399126395
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
here we should rename ShardingKeyGenerator SPI to KeyGenerateAlgorithm.
Be care about modifying all sub class of ShardingKeyGenerator
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] cherrylzhao commented on a change in
pull request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r400277252
##########
File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java
##########
@@ -130,7 +129,7 @@ private void addActualTable(final String datasourceName, final String tableName)
}
private boolean containsKeyGeneratorConfiguration(final TableRuleConfiguration tableRuleConfiguration) {
Review comment:
containsKeyGeneratorConfiguration => containsKeyGenerateAlgorithm is better
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604253200
## Pull Request Test Coverage Report for [Build 10712](https://coveralls.io/builds/29716160)
* **27** of **27** **(100.0%)** changed or added relevant lines in **9** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.02%**) to **57.349%**
---
| Totals | [![Coverage Status](https://coveralls.io/builds/29716160/badge)](https://coveralls.io/builds/29716160) |
| :-- | --: |
| Change from base [Build 10711](https://coveralls.io/builds/29715603): | 0.02% |
| Covered Lines: | 11740 |
| Relevant Lines: | 20471 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] cherrylzhao commented on a change in
pull request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r400273976
##########
File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
##########
@@ -108,14 +108,14 @@ private ShardingStrategy createDefaultShardingStrategy(final ShardingStrategyCon
return Optional.ofNullable(shardingStrategyConfiguration).map(ShardingStrategyFactory::newInstance).orElse(new NoneShardingStrategy());
}
- private ShardingKeyGenerator createDefaultKeyGenerator(final KeyGeneratorConfiguration keyGeneratorConfiguration) {
- ShardingKeyGeneratorServiceLoader serviceLoader = new ShardingKeyGeneratorServiceLoader();
+ private KeyGenerateAlgorithm createDefaultKeyGenerateAlgorithm(final KeyGeneratorConfiguration keyGeneratorConfiguration) {
+ KeyGenerateAlgorithmServiceLoader serviceLoader = new KeyGenerateAlgorithmServiceLoader();
return containsKeyGeneratorConfiguration(keyGeneratorConfiguration)
- ? serviceLoader.newService(keyGeneratorConfiguration.getType(), keyGeneratorConfiguration.getProperties()) : serviceLoader.newService();
+ ? keyGeneratorConfiguration.getKeyGenerateAlgorithm() : serviceLoader.newService();
}
private boolean containsKeyGeneratorConfiguration(final KeyGeneratorConfiguration keyGeneratorConfiguration) {
Review comment:
containsKeyGeneratorConfiguration => containsKeyGenerateAlgorithm is better
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604253200
## Pull Request Test Coverage Report for [Build 10644](https://coveralls.io/builds/29655702)
* **17** of **17** **(100.0%)** changed or added relevant lines in **6** files are covered.
* **295** unchanged lines in **13** files lost coverage.
* Overall coverage decreased (**-0.2%**) to **57.83%**
---
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/context/ShardingSQLRewriteContextDecorator.java](https://coveralls.io/builds/29655702/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fcontext%2FShardingSQLRewriteContextDecorator.java#L34) | 1 | 87.5% |
| [shardingsphere-underlying/shardingsphere-common/src/main/java/org/apache/shardingsphere/underlying/common/database/type/DatabaseTypes.java](https://coveralls.io/builds/29655702/source?filename=shardingsphere-underlying%2Fshardingsphere-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Fcommon%2Fdatabase%2Ftype%2FDatabaseTypes.java#L32) | 2 | 83.33% |
| [shardingsphere-underlying/shardingsphere-rewrite/shardingsphere-rewrite-engine/src/main/java/org/apache/shardingsphere/underlying/rewrite/engine/SQLRewriteEngine.java](https://coveralls.io/builds/29655702/source?filename=shardingsphere-underlying%2Fshardingsphere-rewrite%2Fshardingsphere-rewrite-engine%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Frewrite%2Fengine%2FSQLRewriteEngine.java#L26) | 2 | 0% |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29655702/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29655702/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L120) | 4 | 91.67% |
| [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShardingStatement.java](https://coveralls.io/builds/29655702/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fstatement%2FShardingStatement.java#L273) | 4 | 70.16% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/BindingTableRule.java](https://coveralls.io/builds/29655702/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FBindingTableRule.java#L88) | 7 | 73.08% |
| [shardingsphere-underlying/shardingsphere-rewrite/shardingsphere-rewrite-engine/src/main/java/org/apache/shardingsphere/underlying/rewrite/SQLRewriteEntry.java](https://coveralls.io/builds/29655702/source?filename=shardingsphere-underlying%2Fshardingsphere-rewrite%2Fshardingsphere-rewrite-engine%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Frewrite%2FSQLRewriteEntry.java#L54) | 12 | 0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29655702/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L42) | 14 | 0% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29655702/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L375) | 22 | 79.61% |
<!-- | **Total:** | **295** | | -->
| Totals | [![Coverage Status](https://coveralls.io/builds/29655702/badge)](https://coveralls.io/builds/29655702) |
| :-- | --: |
| Change from base [Build 1173](https://coveralls.io/builds/29607358): | -0.2% |
| Covered Lines: | 11869 |
| Relevant Lines: | 20524 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r399813872
##########
File path: sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/config/sharding/KeyGeneratorConfiguration.java
##########
@@ -20,27 +20,21 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.Getter;
-import org.apache.shardingsphere.underlying.common.config.TypeBasedSPIConfiguration;
-
-import java.util.Properties;
+import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
/**
* Key generator configuration.
*/
@Getter
-public final class KeyGeneratorConfiguration extends TypeBasedSPIConfiguration {
+public final class KeyGeneratorConfiguration {
private final String column;
- public KeyGeneratorConfiguration(final String type, final String column) {
- super(type);
- Preconditions.checkArgument(!Strings.isNullOrEmpty(column), "Column is required.");
- this.column = column;
- }
+ private final ShardingKeyGenerator keyGenerator;
Review comment:
> here we should rename ShardingKeyGenerator SPI to KeyGenerateAlgorithm.
> Be care about modifying all sub class of ShardingKeyGenerator
ShardingKeyGenerator has renamed to KeyGenerateAlgorithm.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4945: make
key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604166533
fix ut first
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] codecov-io edited a comment on issue
#4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604251543
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=h1) Report
> Merging [#4945](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/1aa9cd7c5eb592fbc922158f3b417c97f2909f29&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `92.85%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4945 +/- ##
============================================
+ Coverage 53.75% 53.78% +0.02%
- Complexity 442 444 +2
============================================
Files 1143 1144 +1
Lines 20480 20479 -1
Branches 3748 3747 -1
============================================
+ Hits 11010 11015 +5
+ Misses 8770 8765 -5
+ Partials 700 699 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../apache/shardingsphere/core/rule/ShardingRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1NoYXJkaW5nUnVsZS5qYXZh) | `74.00% <80.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...org/apache/shardingsphere/core/rule/TableRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1RhYmxlUnVsZS5qYXZh) | `84.09% <80.00%> (ø)` | `1.00 <0.00> (ø)` | |
| [...api/config/sharding/KeyGeneratorConfiguration.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYXBpL2NvbmZpZy9zaGFyZGluZy9LZXlHZW5lcmF0b3JDb25maWd1cmF0aW9uLmphdmE=) | `100.00% <100.00%> (+50.00%)` | `0.00 <0.00> (ø)` | |
| [...strategy/keygen/SnowflakeKeyGenerateAlgorithm.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9zdHJhdGVneS9rZXlnZW4vU25vd2ZsYWtlS2V5R2VuZXJhdGVBbGdvcml0aG0uamF2YQ==) | `93.18% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...core/strategy/keygen/UUIDKeyGenerateAlgorithm.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9zdHJhdGVneS9rZXlnZW4vVVVJREtleUdlbmVyYXRlQWxnb3JpdGhtLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../swapper/KeyGeneratorConfigurationYamlSwapper.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS95YW1sL3N3YXBwZXIvS2V5R2VuZXJhdG9yQ29uZmlndXJhdGlvbllhbWxTd2FwcGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...ithm/keygen/KeyGenerateAlgorithmServiceLoader.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3BpL2FsZ29yaXRobS9rZXlnZW4vS2V5R2VuZXJhdGVBbGdvcml0aG1TZXJ2aWNlTG9hZGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...e/factorybean/KeyGenerateAlgorithmFactoryBean.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvZmFjdG9yeWJlYW4vS2V5R2VuZXJhdGVBbGdvcml0aG1GYWN0b3J5QmVhbi5qYXZh) | `100.00% <100.00%> (ø)` | `2.00 <2.00> (?)` | |
| [...space/parser/KeyGeneratorBeanDefinitionParser.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvcGFyc2VyL0tleUdlbmVyYXRvckJlYW5EZWZpbml0aW9uUGFyc2VyLmphdmE=) | `100.00% <100.00%> (+18.18%)` | `1.00 <0.00> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=footer). Last update [1aa9cd7...106d76e](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r398255595
##########
File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java
##########
@@ -130,9 +130,9 @@ private void addActualTable(final String datasourceName, final String tableName)
}
private boolean containsKeyGeneratorConfiguration(final TableRuleConfiguration tableRuleConfiguration) {
- return null != tableRuleConfiguration.getKeyGeneratorConfig() && !Strings.isNullOrEmpty(tableRuleConfiguration.getKeyGeneratorConfig().getType());
+ return null != tableRuleConfiguration.getKeyGeneratorConfig() && null != tableRuleConfiguration.getKeyGeneratorConfig().getKeyGenerator();
}
-
Review comment:
keep origin blankspaces
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r398257053
##########
File path: sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-namespace/src/test/resources/META-INF/rdb/withNamespaceGenerateKeyColumns.xml
##########
@@ -31,10 +31,18 @@
<sharding:standard-strategy id="databaseStrategy" sharding-column="user_id" precise-algorithm-ref="preciseModuloDatabaseShardingAlgorithm" />
<sharding:standard-strategy id="tableStrategy" sharding-column="order_id" precise-algorithm-ref="preciseModuloTableShardingAlgorithm" />
-
- <sharding:key-generator id="defaultKeyGenerator" type="INCREMENT" column="id" />
- <sharding:key-generator id="itemKeyGenerator" type="DECREMENT" column="order_item_id" />
- <sharding:key-generator id="orderKeyGenerator" type="INCREMENT" column="order_id" />
+
+ <bean id="incrementKeyGenerator" class="org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGeneratorFactoryBean">
+ <constructor-arg value="INCREMENT"/>
+ </bean>
+
+ <bean id="decrementKeyGenerator" class="org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGeneratorFactoryBean">
+ <constructor-arg value="DECREMENT"/>
+ </bean>
+
+ <sharding:key-generator id="defaultKeyGenerator" column="id" generator-ref="incrementKeyGenerator" />
Review comment:
is there will be puzzle to users:
a key-generator and referred a XXKeyGenerator ?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] codecov-io commented on issue #4945:
make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#issuecomment-604251543
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=h1) Report
> Merging [#4945](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/61378239e8a8ec7356677b7aff287b772c45c68f&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `78.94%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4945 +/- ##
============================================
- Coverage 54.54% 54.47% -0.08%
- Complexity 440 442 +2
============================================
Files 1136 1141 +5
Lines 20448 20482 +34
Branches 3758 3763 +5
============================================
+ Hits 11154 11158 +4
- Misses 8586 8617 +31
+ Partials 708 707 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../apache/shardingsphere/core/rule/ShardingRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1NoYXJkaW5nUnVsZS5qYXZh) | `79.57% <50.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...org/apache/shardingsphere/core/rule/TableRule.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9ydWxlL1RhYmxlUnVsZS5qYXZh) | `84.09% <50.00%> (ø)` | `1.00 <0.00> (ø)` | |
| [...namespace/factorybean/KeyGeneratorFactoryBean.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvZmFjdG9yeWJlYW4vS2V5R2VuZXJhdG9yRmFjdG9yeUJlYW4uamF2YQ==) | `75.00% <75.00%> (ø)` | `2.00 <2.00> (?)` | |
| [...api/config/sharding/KeyGeneratorConfiguration.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYXBpL2NvbmZpZy9zaGFyZGluZy9LZXlHZW5lcmF0b3JDb25maWd1cmF0aW9uLmphdmE=) | `100.00% <100.00%> (+50.00%)` | `0.00 <0.00> (ø)` | |
| [.../swapper/KeyGeneratorConfigurationYamlSwapper.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS95YW1sL3N3YXBwZXIvS2V5R2VuZXJhdG9yQ29uZmlndXJhdGlvbllhbWxTd2FwcGVyLmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...space/parser/KeyGeneratorBeanDefinitionParser.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmctc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nL3NoYXJkaW5nLWpkYmMtc3ByaW5nLW5hbWVzcGFjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmdqZGJjL3NwcmluZy9uYW1lc3BhY2UvcGFyc2VyL0tleUdlbmVyYXRvckJlYW5EZWZpbml0aW9uUGFyc2VyLmphdmE=) | `100.00% <100.00%> (+18.18%)` | `1.00 <0.00> (ø)` | |
| [.../sql/parser/sql/statement/dml/SelectStatement.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc3RhdGVtZW50L2RtbC9TZWxlY3RTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
| [...sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL2ltcGwvTXlTUUxETUxWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
| [...sql/parser/sql/segment/dml/TableFactorSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVGYWN0b3JTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (?%)` | |
| [.../parser/sql/segment/dml/TableReferenceSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVSZWZlcmVuY2VTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (?%)` | |
| ... and [3 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=footer). Last update [6137823...3df4a41](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4945?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull
request #4945: make key-generator as a spring bean on spring namespace.
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4945: make key-generator as a spring bean on spring namespace.
URL: https://github.com/apache/incubator-shardingsphere/pull/4945#discussion_r398256450
##########
File path: sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-namespace/src/test/resources/META-INF/rdb/shardingNamespace.xml
##########
@@ -17,18 +17,19 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
- xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
- xmlns:bean="http://www.springframework.org/schema/util"
- xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Review comment:
keep origin indent
----------------------------------------------------------------
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
With regards,
Apache Git Services