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/24 16:11:05 UTC
[GitHub] [incubator-shardingsphere] meAsky opened a new pull request #4923:
Create README_ZH.md
meAsky opened a new pull request #4923: Create README_ZH.md
URL: https://github.com/apache/incubator-shardingsphere/pull/4923
Fixes #4906
Changes proposed in this pull request:
- translate examples README.md document to chinese
----------------------------------------------------------------
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
#4923: translate examples README.md document to chinese
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4923: translate examples README.md document to chinese
URL: https://github.com/apache/incubator-shardingsphere/pull/4923#issuecomment-603358653
## Pull Request Test Coverage Report for [Build 10553](https://coveralls.io/builds/29600588)
* **0** of **0** changed or added relevant lines in **0** files are covered.
* **23** unchanged lines in **4** files lost coverage.
* Overall coverage increased (+**0.03%**) to **58.077%**
---
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29600588/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L70) | 1 | 94.44% |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29600588/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L116) | 2 | 93.48% |
| [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/29600588/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-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/ShardingRouteDecorator.java](https://coveralls.io/builds/29600588/source?filename=sharding-core%2Fsharding-core-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2FShardingRouteDecorator.java#L65) | 17 | 32.14% |
<!-- | **Total:** | **23** | | -->
| Totals | [![Coverage Status](https://coveralls.io/builds/29600588/badge)](https://coveralls.io/builds/29600588) |
| :-- | --: |
| Change from base [Build 1157](https://coveralls.io/builds/29576426): | 0.03% |
| Covered Lines: | 11878 |
| Relevant Lines: | 20452 |
---
##### 💛 - [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] terrymanu merged pull request #4923:
translate examples README.md document to chinese
Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #4923: translate examples README.md document to chinese
URL: https://github.com/apache/incubator-shardingsphere/pull/4923
----------------------------------------------------------------
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 #4923:
translate examples README.md document to chinese
Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4923: translate examples README.md document to chinese
URL: https://github.com/apache/incubator-shardingsphere/pull/4923#issuecomment-603358653
## Pull Request Test Coverage Report for [Build 10534](https://coveralls.io/builds/29584439)
* **0** of **0** changed or added relevant lines in **0** files are covered.
* **3** unchanged lines in **1** file lost coverage.
* Overall coverage decreased (**-0.005%**) to **58.047%**
---
| 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/29584439/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/29584439/badge)](https://coveralls.io/builds/29584439) |
| :-- | --: |
| Change from base [Build 1157](https://coveralls.io/builds/29576426): | -0.005% |
| Covered Lines: | 11873 |
| Relevant Lines: | 20454 |
---
##### 💛 - [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 commented on issue #4923:
translate examples README.md document to chinese
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #4923: translate examples README.md document to chinese
URL: https://github.com/apache/incubator-shardingsphere/pull/4923#issuecomment-603353106
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?src=pr&el=h1) Report
> Merging [#4923](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/dc04259bbdb5f26da8d8676333185925d9184493&el=desc) will **decrease** coverage by `0.15%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4923 +/- ##
============================================
- Coverage 54.68% 54.52% -0.16%
- Complexity 436 441 +5
============================================
Files 1138 1137 -1
Lines 20396 20454 +58
Branches 3748 3759 +11
============================================
Hits 11153 11153
- Misses 8539 8593 +54
- Partials 704 708 +4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...or/impl/keygen/BaseGeneratedKeyTokenGenerator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3Jld3JpdGUvdG9rZW4vZ2VuZXJhdG9yL2ltcGwva2V5Z2VuL0Jhc2VHZW5lcmF0ZWRLZXlUb2tlbkdlbmVyYXRvci5qYXZh) | `66.66% <0.00%> (-16.67%)` | `1.00% <0.00%> (ø%)` | |
| [...phere/sharding/merge/dql/orderby/OrderByValue.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvb3JkZXJieS9PcmRlckJ5VmFsdWUuamF2YQ==) | `83.67% <0.00%> (-9.88%)` | `0.00% <0.00%> (ø%)` | |
| [.../sharding/route/engine/ShardingRouteDecorator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJvdXRlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9yb3V0ZS9lbmdpbmUvU2hhcmRpbmdSb3V0ZURlY29yYXRvci5qYXZh) | `23.21% <0.00%> (-3.91%)` | `0.00% <0.00%> (ø%)` | |
| [...r/binder/statement/dml/InsertStatementContext.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWJpbmRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9iaW5kZXIvc3RhdGVtZW50L2RtbC9JbnNlcnRTdGF0ZW1lbnRDb250ZXh0LmphdmE=) | `86.36% <0.00%> (-3.64%)` | `0.00% <0.00%> (ø%)` | |
| [...g/merge/dql/groupby/GroupByMemoryMergedResult.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvZ3JvdXBieS9Hcm91cEJ5TWVtb3J5TWVyZ2VkUmVzdWx0LmphdmE=) | `93.10% <0.00%> (-2.82%)` | `1.00% <0.00%> (ø%)` | |
| [.../execute/sql/execute/result/MemoryQueryResult.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWV4ZWN1dGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL2V4ZWN1dGUvc3FsL2V4ZWN1dGUvcmVzdWx0L01lbW9yeVF1ZXJ5UmVzdWx0LmphdmE=) | `96.07% <0.00%> (-1.97%)` | `0.00% <0.00%> (ø%)` | |
| [.../execute/sql/execute/result/StreamQueryResult.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWV4ZWN1dGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL2V4ZWN1dGUvc3FsL2V4ZWN1dGUvcmVzdWx0L1N0cmVhbVF1ZXJ5UmVzdWx0LmphdmE=) | `92.30% <0.00%> (-1.93%)` | `0.00% <0.00%> (ø%)` | |
| [...on/engine/InsertClauseShardingConditionEngine.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJvdXRlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9yb3V0ZS9lbmdpbmUvY29uZGl0aW9uL2VuZ2luZS9JbnNlcnRDbGF1c2VTaGFyZGluZ0NvbmRpdGlvbkVuZ2luZS5qYXZh) | `50.00% <0.00%> (-1.36%)` | `7.00% <0.00%> (+7.00%)` | :arrow_down: |
| [...rding/rewrite/engine/ShardingSQLRewriteEngine.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3Jld3JpdGUvZW5naW5lL1NoYXJkaW5nU1FMUmV3cml0ZUVuZ2luZS5qYXZh) | `83.33% <0.00%> (-0.88%)` | `0.00% <0.00%> (ø%)` | |
| [...al/datasource/AbstractOrchestrationDataSource.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree#diff-c2hhcmRpbmctamRiYy9zaGFyZGluZy1qZGJjLW9yY2hlc3RyYXRpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5namRiYy9vcmNoZXN0cmF0aW9uL2ludGVybmFsL2RhdGFzb3VyY2UvQWJzdHJhY3RPcmNoZXN0cmF0aW9uRGF0YVNvdXJjZS5qYXZh) | `93.93% <0.00%> (-0.80%)` | `0.00% <0.00%> (ø%)` | |
| ... and [36 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?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/4923?src=pr&el=footer). Last update [d0f7a7b...e6748fb](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4923?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 #4923: translate examples README.md document to chinese
Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4923: translate examples README.md document to chinese
URL: https://github.com/apache/incubator-shardingsphere/pull/4923#discussion_r397643188
##########
File path: examples/README_ZH.md
##########
@@ -0,0 +1,120 @@
+# ShardingSphere示例
+
+1.x的示例,请参阅 `https://github.com/apache/incubator-shardingsphere/tree/${tag}/sharding-jdbc-example`
+
+2.x或3.x或4.x的示例,请参见 `https://github.com/apache/incubator-shardingsphere-example/tree/${tag}`
+
+**需要注意**
+
+- *请不要使用`dev`分支来运行您的示例,`dev`分支的示例尚未发布。*
+
+- *手动模式初始脚本位于 `https://github.com/apache/incubator-shardingsphere-example/blob/dev/src/resources/manual_schema.sql`,请在首次运行示例之前执行它。*
+
+- *请确保MySQL上的主从数据同步正确运行。否则,此示例查询从库数据将是空。*
+
+## 如果要使用`dev`分支,请在开始该example之前
+
+请确保已安装了来自[shardingsphere](https://github.com/apache/incubator-shardingsphere) 和 [shardingsphere-spi-impl](https://github.com/OpenSharding/shardingsphere-spi-impl)的某些依赖项,因为某些示例依赖于此。如果您是shardingsphere的新手,您可以准备如下依赖:
+
+1.下载并安装[shardingsphere](https://github.com/apache/incubator-shardingsphere):
+
+```bash
+## 下载shardingsphere代码
+git clone https://github.com/apache/incubator-shardingsphere.git
+
+## 检出一个指定版本,比如是 4.0.0-RC1
+cd incubator-shardingsphere && git checkout 4.0.0-RC1
+
+## 安装依赖
+mvn clean install -Prelease
+```
+
+2.下载并安装[shardingsphere-spi-impl](https://github.com/OpenSharding/shardingsphere-spi-impl):
+
+```bash
+## 下载shardingsphere-SPI-implement的代码
+git clone https://github.com/OpenSharding/shardingsphere-spi-impl.git
+
+## 检出一个指定版本,比如是 4.0.0-RC1
+cd shardingsphere-spi-impl && git checkout 4.0.0-RC1
+
+## 安装依赖
+mvn clean install
+```
+
+## shardingsphere-example模块设计
+
+### 项目结构
+
+```
+shardingsphere-example
+ ├── example-core
+ │ ├── config-utility
+ │ ├── example-api
+ │ ├── example-raw-jdbc
+ │ ├── example-spring-jpa
+ │ └── example-spring-mybatis
+ ├── sharding-jdbc-example
+ │ ├── sharding-example
+ │ │ ├── sharding-raw-jdbc-example
+ │ │ ├── sharding-spring-boot-jpa-example
+ │ │ ├── sharding-spring-boot-mybatis-example
+ │ │ ├── sharding-spring-namespace-jpa-example
+ │ │ └── sharding-spring-namespace-mybatis-example
+ │ ├── orchestration-example
+ │ │ ├── orchestration-raw-jdbc-example
+ │ │ ├── orchestration-spring-boot-example
+ │ │ └── orchestration-spring-namespace-example
+ │ ├── transaction-example
+ │ │ ├── transaction-2pc-xa-example
+ │ │ └──transaction-base-seata-example
+ │ ├── other-feature-example
+ │ │ ├── hint-example
+ │ │ └── encrypt-example
+ ├── sharding-proxy-example
+ │ └── sharding-proxy-boot-mybatis-example
+ └── src/resources
+ └── manual_schema.sql
+```
+
+### 分片数据的最佳实践
+
+* 分片数据库
+* 分片表
+* 分片数据库和表
+* 主从
+* 分片和主从
+
+您可以从[sharding-example](./sharding-jdbc-example/sharding-example)中获取更多详细信息
+
+### 分片与编排的最佳实践
+
+* 使用本地配置文件对zookeeper/etcd和分片
Review comment:
使用本地配置文件和zookeeper/etcd配置分片 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