Skip to content

Commit 1416878

Browse files
authored
Check the format of the official website and modify it (#614)
* Fix English document formatting
1 parent 01c7c8f commit 1416878

File tree

127 files changed

+704
-622
lines changed

Some content is hidden

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

127 files changed

+704
-622
lines changed

community/development-specification/commit-message.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ sidebar_position: 2
44
---
55
>This article is quoted from https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/contribute/join/commit-message.html
66
7-
### Preface
7+
### 1.Preface
88

99
A good commit message can help other developers (or future developers) quickly understand the context of related changes, and can also help project managers determine whether the commit is suitable for inclusion in the release. But when we checked the commit logs of many open source projects, we found an interesting problem. Some developers have very good code quality, but the commit message record is rather confusing. When other contributors or learners are viewing the code, it can’t be intuitively understood through commit log.
1010
The purpose of the changes before and after the submission, as Peter Hutterer said:Re-establishing the context of a piece of code is wasteful. We can’t avoid it completely, so our efforts should go to reducing it as much as possible. Commit messages can do exactly that and as a result, a commit message shows whether a developer is a good collaborator. Therefore, DolphinScheduler developed the protocol in conjunction with other communities and official Apache documents.
1111

12-
### Commit Message RIP
12+
### 2.Commit Message RIP
1313

14-
#### 1:Clearly modify the content
14+
#### 2.1 Clearly modify the content
1515

1616
A commit message should clearly state what issues (bug fixes, function enhancements, etc.) the submission solves, so that other developers can better track the issues and clarify the optimization during the version iteration process.
1717

18-
#### 2Associate the corresponding Pull Request or Issue
18+
#### 2.2 Associate the corresponding Pull Request or Issue
1919

2020
When our changes are large, the commit message should best be associated with the relevant Issue or Pull Request on GitHub, so that our developers can quickly understand the context of the code submission through the associated information when reviewing the code. If the current commit is for an issue, then the issue can be closed in the Footer section.
2121

22-
#### 3:Unified format
22+
#### 2.3 Unified format
2323

2424
The formatted CommitMessage can help provide more historical information for quick browsing, and it can also generate a Change Log directly from commit.
2525

@@ -89,7 +89,7 @@ If the current commit is for a certain issue, you can close the issue in the Foo
8989
This closes #001
9090
```
9191

92-
### Reference documents
92+
### 3.Reference documents
9393

9494
[Dolphinscheduler Commit Message](https://dolphinscheduler.apache.org/zh-cn/docs/dev/user_doc/contribute/join/commit-message.html)
9595

community/development-specification/how-to-write-unit-test-code.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: How to Write Unit Test Code
33
sidebar_position: 10
44
---
55

6-
## Frame Selection
6+
## 1.Frame Selection
77

88
Junit5 + mockito + Jacobo + H2 local database
99

@@ -13,7 +13,7 @@ Idea enhancement plugin
1313
- Create the allnewset object and set the default value for allnewset
1414
- The association mapping between mybatisx DAO and mapper is easy to view
1515

16-
### Configure the Template of JUnit in Idea
16+
### 1.1 Configure the Template of JUnit in Idea
1717

1818
```properties
1919

@@ -136,9 +136,9 @@ public class $testClass {
136136

137137

138138

139-
## Unit Test Criteria
139+
## 2.Unit Test Criteria
140140

141-
### Catalogue And Naming Citeria
141+
### 2.1 Catalogue And Naming Citeria
142142

143143
- 1. Unit test code directory
144144
It must be written in the following project directory: src/test/java. It is not allowed to write in the business code directory.
@@ -156,7 +156,7 @@ public class $testClass {
156156
- 4. Specification for naming and defining test cases: use test as the prefix of method names
157157
The naming rule of test cases is: test + method name. Avoid using names that have no meaning in test1 and test2. Secondly, necessary function and method annotations are required.
158158

159-
### Unit Coding Specifications
159+
### 2.2 Unit Coding Specifications
160160

161161
- 1. System is not allowed to be used in unit test Out for human flesh verification, or if judgment for verification (log can be used for Key log output). Assertion assert must be used for verification.
162162

@@ -173,7 +173,7 @@ public class $testClass {
173173
- 5. For unit testing, it is necessary to ensure that the test granularity is small enough to help accurately locate the problem. Single test granularity is generally at the method level (very few scenarios such as tool classes or enumeration classes can be at the class level).
174174
Note: only with small test granularity can we locate the error location as soon as possible. Single test is not responsible for checking cross class or cross system interaction logic, which is the field of integration testing.
175175

176-
## Use of Assertions
176+
## 3.Use of Assertions
177177

178178
The result verification of all test cases must use the assertion pattern
179179
use Assertions.assertEquals
@@ -185,7 +185,7 @@ public class $testClass {
185185
Assertions.assertThat(actualObject).usingRecursiveComparison().isEqualTo(expectedObject);
186186

187187

188-
### Junit5 General Assertion
188+
### 3.1 Junit5 General Assertion
189189

190190
| Method | description | remarks |
191191
|--------|-------------|-------------|
@@ -197,7 +197,7 @@ public class $testClass {
197197
|AssertNotNull | judge whether the given object reference is not null| |
198198
|Assert all | multiple judgment logics are processed together. As long as one error is reported, the overall test will fail| |
199199

200-
### Junit5 Combined Assertion and Exception Assertion
200+
### 3.2 Junit5 Combined Assertion and Exception Assertion
201201

202202
**Composite assertion**
203203
The assertall method can process multiple judgment logics together. As long as one error is reported, the overall test will fail:
@@ -230,7 +230,7 @@ Example:
230230
}
231231
```
232232

233-
### Assertion Usage Criteria
233+
### 3.3 Assertion Usage Criteria
234234

235235
**Object instance equality assertion**
236236

@@ -264,7 +264,7 @@ assertEquals(2, jobRespProtocolArrayList.size());
264264
assertTrue(jobRespProtocolArrayList.stream(). anyMatch(statusPrecate));
265265
```
266266

267-
## Mock simulation return data
267+
## 4.Mock simulation return data
268268

269269
Sometimes we just test some apis or service modules, where the service or dao returns null values for some methods by default, but if the logic includes the judgment or secondary value of the returned null object, it is to throw some exceptions
270270

@@ -299,9 +299,9 @@ Example of mock simulation data:
299299
.thenReturn(pageInfo);
300300
```
301301

302-
## Compilation of Unit Test
302+
## 5.Compilation of Unit Test
303303

304-
### Class Division
304+
### 5.1 Class Division
305305

306306
It can be roughly classified according to the major functions of the class
307307

@@ -314,7 +314,7 @@ It can be roughly classified according to the major functions of the class
314314
-Entity class is used for DB interaction and parameter VO object and other entity classes processed by methods (if there are other user-defined functions besides normal get set, unit test is required)
315315

316316

317-
### Unit Test of Controller class
317+
### 5.2 Unit Test of Controller class
318318
Using mockmvc
319319

320320
It mainly verifies the requestmethod method of interface request, basic parameters and expected return results.
@@ -350,10 +350,10 @@ Main scenarios: scenarios with and without unnecessary parameters are abnormal
350350

351351
```
352352

353-
### Unit Test of Server class
353+
### 5.3 Unit Test of Server class
354354
//todo
355355

356-
### Unit Test of Dao class
356+
### 5.4 Unit Test of Dao class
357357

358358
Use H2 database, application. In the configuration file In properties, you need to configure the basic information of H2 database and the relevant path information of mybatis
359359

community/development-specification/license.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar_position: 0.1
99
The open source projects under the ASF (Apache Foundation) have extremely strict requirements for the license. When you contribute code to Linkis, you must follow the Apache rules. In order to avoid the contributors wasting too much time on the license,
1010
This article will explain the ASF-License and how to avoid the license risk when participating in the Linkis project development.
1111

12-
## License file directory description
12+
## 1.License file directory description
1313

1414
License related can be divided into 3 parts
1515
- The main scenarios that need to be paid attention to are: in the project source code, the resources are directly included in the project (such as the direct use of video files, sample files, code JAVA of other projects, additions, icons, audio sources) and other files, and modifications made on the basis )
@@ -49,7 +49,7 @@ License related can be divided into 3 parts
4949
````
5050

5151

52-
## How to legally use third-party open source software on Linkis
52+
## 2.How to legally use third-party open source software on Linkis
5353

5454
When the code you submit has the following scenarios:
5555

@@ -62,7 +62,7 @@ When the code you submit has the following scenarios:
6262
We need to know the NOTICE/LICENSE of the files introduced by our project or jar dependencies, (most open source projects will have NOTICE files), these must be reflected in our project. In Apache's words, "Work" shall be mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a
6363
copyright notice that is included in or attached to the work.
6464
65-
### Example Scenario 1
65+
### 2.1 Example Scenario 1
6666
For example, the third-party file `linkis-engineconn-plugins/python/src/main/py4j/py4j-0.10.7-src.zip` is introduced into the source code
6767
6868
Find the source branch of the version corresponding to py4j-0.10.7-src.zip, if there is no `LICENSE/NOTICE` file in the corresponding version branch, select the main branch
@@ -74,7 +74,7 @@ The license information of `py4j-0.10.7-src.zip` needs to be specified in the `l
7474
The detailed license.txt file corresponding to `py4j-0.10.7-src.zip` is placed in the same level directory `linkis-engineconn-plugins/python/src/main/py4j/LICENSE-py4j-0.10 .7-src.txt`
7575
Since https://github.com/bartdag/py4j/tree/0.10.7/py4j-python does not have a NOTICE file, there is no need to append to the `linkis/NOTICE` file.
7676
77-
### Example Scene 2
77+
### 2.2 Example Scene 2
7878
7979
The compilation of the project depends on `org.apache.ant:ant:1.9.1`, and ant-1.9.1.jar will be compiled and installed in the final package `target/apache-linkis-xxx-incubating-bin/linkis-package/lib `medium
8080
You can decompress ant-1.9.1.jar and extract the LICENSE/NOTICE file from the jar package. If not, you need to find the corresponding version source code
@@ -89,7 +89,7 @@ The detailed notice.txt corresponding to `ant-1.9.1.jar` is appended to the `NOT
8989
9090
Regarding the specific open source protocol usage protocols, I will not introduce them one by one here. If you are interested, you can check them yourself.
9191
92-
## License detection rules
92+
## 3.License detection rules
9393
We build a license-check script for our own project to ensure that we can avoid license problems as soon as we use it.
9494
9595
When we need to add new Jars or other external resources, we need to follow these steps:
@@ -125,7 +125,7 @@ In this case, we will get the error message of check dependency license fail in
125125
Follow the steps to add jar to add it.
126126
127127
128-
## Appendix
128+
## 4.Appendix
129129
Attachment: Mail format of new jar
130130
````
131131
[VOTE][New/Remove Jar] jetcd-core(registry plugin support etcd3 )
@@ -160,6 +160,6 @@ https://mvnrepository.com/artifact/io.etcd/jetcd-core
160160
https://mvnrepository.com/artifact/io.etcd/jetcd-launcher
161161
````
162162
163-
## Reference articles
163+
## 5.Reference articles
164164
* [COMMUNITY-LED DEVELOPMENT "THE APACHE WAY"](https://apache.org/dev/licensing-howto.html)
165165
* [ASF 3RD PARTY LICENSE POLICY](https://apache.org/legal/resolved.html)

community/development-specification/mapper-xml.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_position: 10
55

66
> Contributor contributes new data tables to Apache Linkis. When writing Mapper XML, the following specifications must be followed for development.
77
8-
## Basically follow the specifications
8+
## 1.Basically follow the specifications
99
- In mapper.xml namespace is equal to java interface address
1010
- The method name in the java interface is the same as the id of the statement in XML
1111
- The input parameter type of the method in the java interface is the same as the type specified by the parameterType of the statement in XML
@@ -16,7 +16,7 @@ sidebar_position: 10
1616
- For placeholders, use #{name} instead of ${name}. Fuzzy query can use CONCAT('%',#{sname},'%')
1717
- For sql statement writing, no annotation method is used, and it is uniformly written in the XML file
1818

19-
## Method name specification
19+
## 2.Method name specification
2020

2121
|Method Name|Description|Core Points|Recommendations|
2222
|:---- |:--- |:--- |:--- |
@@ -28,9 +28,9 @@ sidebar_position: 10
2828
|queryListByParam | Query data list according to input conditions | Multi-parameter query list | |
2929
|queryCountByParam | The total number of queries based on input conditions | The number of multi-parameter queries | |
3030

31-
## parameterType specification
31+
## 3.parameterType specification
3232
The java interface must contain @Param, and the XML can not contain parameterType
33-
### basic type
33+
### 3.1 basic type
3434
````java
3535
// java interface
3636
User selectUserById(@Param("id") Integer id);
@@ -41,7 +41,7 @@ User selectUserById(@Param("id") Integer id);
4141
where id = #{id}
4242
</select>
4343
````
44-
### Collection type
44+
### 3.2 Collection type
4545
````java
4646
// java interface
4747
List<User> userListByIds(@Param("ids") List<Integer> ids);
@@ -55,7 +55,7 @@ List<User> userListByIds(@Param("ids") List<Integer> ids);
5555
</foreach>
5656
</select>
5757
````
58-
### Map type
58+
### 3.3 Map type
5959
````java
6060
// java interface
6161
User queryByParams(@Param("map") Map<String, Object> parasms);
@@ -66,7 +66,7 @@ User queryByParams(@Param("map") Map<String, Object> parasms);
6666
where id = #{map.id} and name = #{map.name}
6767
</select>
6868
````
69-
### Entity Type
69+
### 3.4 Entity Type
7070
````java
7171
// java interface
7272
User queryByUser(@Param("user") User user);
@@ -77,7 +77,7 @@ User queryByUser(@Param("user") User user);
7777
where id = #{user.id} and name = #{user.name}
7878
</select>
7979
````
80-
### Multiple parameter types
80+
### 3.5 Multiple parameter types
8181
````java
8282
// java interface
8383
User queryByIdAndName(@Param("id") Integer id, @Param("name") String name);
@@ -88,7 +88,7 @@ User queryByIdAndName(@Param("id") Integer id, @Param("name") String name);
8888
where id = #{id} and name = #{name}
8989
</select>
9090
````
91-
## XML file writing example
91+
## 4.XML file writing example
9292
Use spaces and indentation reasonably to enhance readability. Examples of various types of SQL statements are as follows
9393
```sql
9494
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

community/how-to-ask-for-help.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ step2 Copy the template content
1919
-->
2020

2121

22-
## Method 1 Github-issue ask questions (recommended)
22+
## 1.Method 1 Github-issue ask questions (recommended)
2323

24-
### Precautions
24+
### 1.1 Precautions
2525
:::caution note
2626
- Please ask questions in a standardized format, so that the community students can answer them. After asking questions, please continue to pay attention to your questions.
2727
- Please note that in addition to screenshots, please <font color="red">paste the error log into </font> in text form, only the problem of the picture log will not be given priority to answer
@@ -30,7 +30,7 @@ step2 Copy the template content
3030
- If it is an error during the running phase, please attach a screenshot of the Eureka registry service list
3131
:::
3232

33-
### Attachment & image upload
33+
### 1.2 Attachment & image upload
3434
If you want to attach a file attachment, drag and drop it into the comment box. Or click the bar at the bottom of the comment box to browse, select, and add files from your computer.
3535
![img](/Images/community/upload-file.png)
3636

@@ -41,7 +41,7 @@ In many browsers you can copy and paste the image directly into the box
4141
The log file should not exceed 25MB
4242
:::
4343

44-
### Completion instructions
44+
### 2.Completion instructions
4545
- Entry: https://github.com/apache/incubator-linkis/issues
4646

4747
** Step1: Enter the issue column, click to create issue **
@@ -66,7 +66,7 @@ The log file should not exceed 25MB
6666

6767

6868

69-
## Method 2 email consultation
69+
## 3.Method 2 email consultation
7070

7171
Email Question Process
7272

docs/architecture/commons/rpc.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ title: RPC Module
33
sidebar_position: 2
44
---
55

6-
## 1 Overview
6+
## 1.Overview
77
The call of HTTP interface between Feign-based microservices can only satisfy a simple A microservice instance that randomly selects a service instance in B microservices according to simple rules, and if this B microservice instance wants to asynchronously return information To the caller, it is simply impossible to achieve.
88
At the same time, because Feign only supports simple service selection rules, it cannot forward the request to the specified microservice instance, and cannot broadcast a request to all instances of the recipient microservice.
99

1010
## 2. Architecture description
11-
## 2.1. Architecture design diagram
11+
### 2.1 Architecture design diagram
1212
![Linkis RPC architecture diagram](/Images/Architecture/Commons/linkis-rpc.png)
13-
## 2.2. Module description
13+
### 2.2 Module description
1414
The functions of the main modules are introduced as follows:
1515
* Eureka: service registration center, user management service, service discovery.
1616
* Sender: Service request interface, the sender uses Sender to request service from the receiver.

docs/architecture/commons/variable.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ sidebar_position: 1
44
---
55

66
## 1. General
7-
### Requirements Background
7+
### 1.1 Requirements Background
88
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Users want to be able to define some common variables when writing code and then replace them during execution. For example, users run the same sql in batches every day, and need to specify the partition time of the previous day. If based on sql It will be more complicated to write if the system provides a variable of run_date which will be very convenient to use.
9-
### Target
9+
### 1.2 Target
1010
1. Support variable substitution of task code
1111
2. Support custom variables, support users to define custom variables in scripts and task parameters submitted to Linkis, support simple +, - and other calculations
1212
3. Preset system variables: run_date, run_month, run_today and other system variables
@@ -19,7 +19,7 @@ sidebar_position: 1
1919

2020
![var_arc](/Images/Architecture/Commons/var_arc.png)
2121

22-
### 3 Function introduction
22+
## 3.Function introduction
2323
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The variable types supported by Linkis are divided into custom variables and system built-in variables. The internal variables are predefined by Linkis and can be used directly. Then different variable types support different calculation formats: String supports +, integer decimal supports +-*/, date supports +-.
2424

2525
### 3.1 Built-in variables

docs/architecture/computation-governance-services/job-submission-preparation-and-execution-process.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The task status is now queued
8787

8888
### 2.2 Job preparation stage
8989
&nbsp;&nbsp;&nbsp;&nbsp;Entrance's scheduler will generate different consumers to consume tasks according to the Label in the Job. When the task is consumed and modified to Running, it will enter the preparation state, and the task will be prepared after the corresponding task. Phase begins. It mainly involves the following services: Entrance, LinkisMaster, EnginepluginServer, EngineConnManager, and EngineConn. The following services will be introduced separately.
90-
### 2.2.1 Entrance steps:
90+
#### 2.2.1 Entrance steps:
9191
1. The consumer (FIFOUserConsumer) consumes the supported concurrent number configured by the corresponding tag, and schedules the task consumption to the Orchestrator for execution
9292
2. First, Orchestrator arranges the submitted tasks. For ordinary hive and Spark single-engine tasks, it is mainly task parsing, label checking and verification. For multi-data source mixed computing scenarios, different tasks will be split and submitted to Different data sources for execution, etc.
9393
3. In the preparation phase, another important thing for the Orchestrator is to request the LinkisMaster to obtain the EngineConn for executing the task. If LinkisMaster has a corresponding EngineConn that can be reused, it will return directly, if not, create an EngineConn.
@@ -110,7 +110,7 @@ DefaultCodeExecTaskExecutorManager: EngineConn responsible for managing code typ
110110
ComputationEngineConnManager: Responsible for LinkisMaster to connect, request and release ENgineConn
111111
````
112112

113-
### 2.2.2 LinkisMaster steps:
113+
#### 2.2.2 LinkisMaster steps:
114114

115115
1. LinkisMaster receives the request EngineConn request from the Entrance service for processing
116116
2. Determine if there is an EngineConn that can be reused by the corresponding Label, and return directly if there is

0 commit comments

Comments
 (0)