Skip to content

Commit 1067ab2

Browse files
authored
Merge pull request apache#7 from apache/master
update code
2 parents a86106e + 2523fa0 commit 1067ab2

File tree

1,271 files changed

+15312
-4631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,271 files changed

+15312
-4631
lines changed

.github/workflows/maven-on-windows.yml renamed to .github/workflows/ci.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# This workflow will build a Java project with Maven
1919
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
2020

21-
name: Java CI with Maven(Windows)
21+
name: Continuous Integration
2222

2323
on:
2424
push:
@@ -27,7 +27,7 @@ on:
2727
branches: [ master ]
2828

2929
jobs:
30-
build:
30+
windows:
3131
runs-on: windows-latest
3232
steps:
3333
- name: Cache Maven Repos
@@ -48,3 +48,26 @@ jobs:
4848
run: ./mvnw -B clean cobertura:cobertura -D"maven.javadoc.skip"=true install
4949
- name: Build examples with Maven
5050
run: ./mvnw -B -f examples/pom.xml clean package -DskipTests
51+
52+
unix:
53+
runs-on: ${{ matrix.os }}
54+
strategy:
55+
matrix:
56+
os: [ ubuntu-latest, macos-latest ]
57+
steps:
58+
- name: Cache Maven Repos
59+
uses: actions/cache@v2
60+
with:
61+
path: ~/.m2/repository
62+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
63+
restore-keys: |
64+
${{ runner.os }}-maven-
65+
- uses: actions/checkout@v2
66+
- name: Set up JDK 8
67+
uses: actions/setup-java@v1
68+
with:
69+
java-version: 8
70+
- name: Build with Maven
71+
run: ./mvnw -B clean cobertura:cobertura -Dmaven.javadoc.skip=true install
72+
- name: Build examples with Maven
73+
run: ./mvnw -B -f examples/pom.xml clean package -DskipTests

.github/workflows/it.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
name: Integration Test
19+
20+
on:
21+
push:
22+
branches: [ master, dev ]
23+
pull_request:
24+
branches: [ master ]
25+
26+
jobs:
27+
mysql-proxy-db:
28+
name: MySQL-Proxy with DB
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Cache Maven Repos
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/.m2/repository
35+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
36+
restore-keys: |
37+
${{ runner.os }}-maven-
38+
- uses: actions/checkout@v2
39+
- name: Set up JDK 8
40+
uses: actions/setup-java@v1
41+
with:
42+
java-version: 8
43+
- name: Build Project
44+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
45+
- name: Run Integration Test
46+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=db -Dit.databases=MySQL
47+
48+
mysql-proxy-tbl:
49+
name: MySQL-Proxy with TBL
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Cache Maven Repos
53+
uses: actions/cache@v2
54+
with:
55+
path: ~/.m2/repository
56+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
57+
restore-keys: |
58+
${{ runner.os }}-maven-
59+
- uses: actions/checkout@v2
60+
- name: Set up JDK 8
61+
uses: actions/setup-java@v1
62+
with:
63+
java-version: 8
64+
- name: Build Project
65+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
66+
- name: Run Integration Test
67+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=tbl -Dit.databases=MySQL
68+
69+
mysql-proxy-repilca-query:
70+
name: MySQL-Proxy with REPLICA-QUERY
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Cache Maven Repos
74+
uses: actions/cache@v2
75+
with:
76+
path: ~/.m2/repository
77+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
78+
restore-keys: |
79+
${{ runner.os }}-maven-
80+
- uses: actions/checkout@v2
81+
- name: Set up JDK 8
82+
uses: actions/setup-java@v1
83+
with:
84+
java-version: 8
85+
- name: Build Project
86+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
87+
- name: Run Integration Test
88+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=replica_query -Dit.databases=MySQL
89+
90+
mysql-proxy-dbtbl-with-proxy-repilca-query:
91+
name: MySQL-Proxy with DBTBL-WITH-REPLICA-QUERY
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: Cache Maven Repos
95+
uses: actions/cache@v2
96+
with:
97+
path: ~/.m2/repository
98+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
99+
restore-keys: |
100+
${{ runner.os }}-maven-
101+
- uses: actions/checkout@v2
102+
- name: Set up JDK 8
103+
uses: actions/setup-java@v1
104+
with:
105+
java-version: 8
106+
- name: Build Project
107+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
108+
- name: Run Integration Test
109+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=proxy -Dit.scenarios=dbtbl_with_replica_query -Dit.databases=MySQL
110+
111+
mysql-jdbc-db:
112+
name: MySQL-JDBC with DB
113+
runs-on: ubuntu-latest
114+
steps:
115+
- name: Cache Maven Repos
116+
uses: actions/cache@v2
117+
with:
118+
path: ~/.m2/repository
119+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
120+
restore-keys: |
121+
${{ runner.os }}-maven-
122+
- uses: actions/checkout@v2
123+
- name: Set up JDK 8
124+
uses: actions/setup-java@v1
125+
with:
126+
java-version: 8
127+
- name: Build Project
128+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
129+
- name: Run Integration Test
130+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=db -Dit.databases=MySQL
131+
132+
mysql-jdbc-tbl:
133+
name: MySQL-JDBC with TBL
134+
runs-on: ubuntu-latest
135+
steps:
136+
- name: Cache Maven Repos
137+
uses: actions/cache@v2
138+
with:
139+
path: ~/.m2/repository
140+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
141+
restore-keys: |
142+
${{ runner.os }}-maven-
143+
- uses: actions/checkout@v2
144+
- name: Set up JDK 8
145+
uses: actions/setup-java@v1
146+
with:
147+
java-version: 8
148+
- name: Build Project
149+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
150+
- name: Run Integration Test
151+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=tbl -Dit.databases=MySQL
152+
153+
mysql-jdbc-repilca-query:
154+
name: MySQL-JDBC with REPLICA-QUERY
155+
runs-on: ubuntu-latest
156+
steps:
157+
- name: Cache Maven Repos
158+
uses: actions/cache@v2
159+
with:
160+
path: ~/.m2/repository
161+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
162+
restore-keys: |
163+
${{ runner.os }}-maven-
164+
- uses: actions/checkout@v2
165+
- name: Set up JDK 8
166+
uses: actions/setup-java@v1
167+
with:
168+
java-version: 8
169+
- name: Build Project
170+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
171+
- name: Run Integration Test
172+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=replica_query -Dit.databases=MySQL
173+
174+
mysql-jdbc-dbtbl-with-proxy-repilca-query:
175+
name: MySQL-JDBC with DBTBL-WITH-REPLICA-QUERY
176+
runs-on: ubuntu-latest
177+
steps:
178+
- name: Cache Maven Repos
179+
uses: actions/cache@v2
180+
with:
181+
path: ~/.m2/repository
182+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
183+
restore-keys: |
184+
${{ runner.os }}-maven-
185+
- uses: actions/checkout@v2
186+
- name: Set up JDK 8
187+
uses: actions/setup-java@v1
188+
with:
189+
java-version: 8
190+
- name: Build Project
191+
run: ./mvnw -B clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs
192+
- name: Run Integration Test
193+
run: ./mvnw -B clean install -f shardingsphere-test/shardingsphere-integration-test/pom.xml -Pit.env.docker -Dit.adapters=jdbc -Dit.scenarios=dbtbl_with_replica_query -Dit.databases=MySQL

.github/workflows/maven-on-macos.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/maven-on-ubuntu.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/community/content/contribute/code-conduct.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The following code of conduct is based on full compliance with [ASF CODE OF COND
4040
- Order of members definition and parameters should be consistent during classes and methods.
4141
- Use guard clauses in priority.
4242
- Minimize the access permission for classes and methods.
43-
- Private method should be just next to the method in which it is used; writing private methods should be in the same as the appearance order of private methods.
43+
- Private method should be just next to the method in which it is used; Multiple private methods should be in the same as the appearance order of original methods.
4444
- No `null` parameters or return values.
4545
- Replace if else return and assign statement with ternary operator in priority.
4646
- Replace constructors, getters, setter methods and log variable with lombok in priority.

docs/community/content/powered-by/_index.cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ chapter = true
1313

1414
## 谁在使用 ShardingSphere?
1515

16-
共计 153 家公司。
16+
共计 156 家公司。
1717

1818
### 金融行业
1919
<ul>

docs/community/content/powered-by/_index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please register [here](https://github.com/apache/shardingsphere/issues/234) with
1313

1414
## Who are using ShardingSphere?
1515

16-
Total: 153 companies.
16+
Total: 156 companies.
1717

1818
### Financial Industry
1919
<ul>

docs/document/content/features/governance/_index.cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ chapter = true
1313

1414
## 挑战
1515

16-
分布式治理的挑战,主要在于集群管理的复杂性,以及如果以统一和标准的方式对接各种第三方集成组件
16+
分布式治理的挑战,主要在于集群管理的复杂性,以及如何以统一和标准的方式对接各种第三方集成组件
1717

1818
集成管理的复杂性体现在,一方面我们需要把所有的节点,不管是底层数据库节点,还是中间件或者业务系统节点,它们的状态都统一管理起来,并且能够实时的探测到最新的变动情况,进一步为集群的控制和调度提供依据。这方面我们使用集群拓扑状态图来管理集群状态,同时使用心跳检测机制实现状态检测与更新。
1919

docs/document/content/features/sharding/use-norms/rdl.cn.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ t_item=mod(item_id, 2)
4848

4949
### 前置工作
5050

51-
1. Start the service of MySQL instances
52-
2. Create MySQL databases (Viewed as the resources for ShardingProxy)
53-
3. Create a role or user with creating privileges for ShardingProxy
54-
4. Start the service of Zookeeper (For persisting configuration)
51+
1. 启动MySQL服务
52+
2. 创建MySQL数据库(参考ShardingProxy数据源配置规则)
53+
3. 为ShardingProxy创建一个拥有创建权限的角色或者用户
54+
4. 启动Zookeeper服务 (为了持久化配置)
5555

5656
### 启动ShardingProxy
5757

58-
1. Add `governance` and `authentication` setting item to the `server.yaml` (Please refer to the example in this file)
59-
2. Start the ShardingProxy ([Instruction](/en/quick-start/shardingsphere-proxy-quick-start/))
58+
1. 添加 `governance` `authentication` 配置参数到 `server.yaml` (请参考相关example案例)
59+
2. 启动 ShardingProxy ([相关介绍](/cn/quick-start/shardingsphere-proxy-quick-start/))
6060

6161
### 创建分布式数据库和分片表
6262

0 commit comments

Comments
 (0)