You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: community/development-specification/commit-message.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,22 @@ sidebar_position: 2
4
4
---
5
5
>This article is quoted from https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/contribute/join/commit-message.html
6
6
7
-
### Preface
7
+
### 1.Preface
8
8
9
9
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.
10
10
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.
11
11
12
-
### Commit Message RIP
12
+
### 2.Commit Message RIP
13
13
14
-
#### 1:Clearly modify the content
14
+
#### 2.1 Clearly modify the content
15
15
16
16
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.
17
17
18
-
#### 2:Associate the corresponding Pull Request or Issue
18
+
#### 2.2 Associate the corresponding Pull Request or Issue
19
19
20
20
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.
21
21
22
-
#### 3:Unified format
22
+
#### 2.3 Unified format
23
23
24
24
The formatted CommitMessage can help provide more historical information for quick browsing, and it can also generate a Change Log directly from commit.
25
25
@@ -89,7 +89,7 @@ If the current commit is for a certain issue, you can close the issue in the Foo
Copy file name to clipboardexpand all lines: community/development-specification/how-to-write-unit-test-code.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: How to Write Unit Test Code
3
3
sidebar_position: 10
4
4
---
5
5
6
-
## Frame Selection
6
+
## 1.Frame Selection
7
7
8
8
Junit5 + mockito + Jacobo + H2 local database
9
9
@@ -13,7 +13,7 @@ Idea enhancement plugin
13
13
- Create the allnewset object and set the default value for allnewset
14
14
- The association mapping between mybatisx DAO and mapper is easy to view
15
15
16
-
### Configure the Template of JUnit in Idea
16
+
### 1.1 Configure the Template of JUnit in Idea
17
17
18
18
```properties
19
19
@@ -136,9 +136,9 @@ public class $testClass {
136
136
137
137
138
138
139
-
## Unit Test Criteria
139
+
## 2.Unit Test Criteria
140
140
141
-
### Catalogue And Naming Citeria
141
+
### 2.1 Catalogue And Naming Citeria
142
142
143
143
-1. Unit test code directory
144
144
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 {
156
156
-4. Specification for naming and defining test cases: use test as the prefix of method names
157
157
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.
158
158
159
-
### Unit Coding Specifications
159
+
### 2.2 Unit Coding Specifications
160
160
161
161
-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.
162
162
@@ -173,7 +173,7 @@ public class $testClass {
173
173
-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).
174
174
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.
175
175
176
-
## Use of Assertions
176
+
## 3.Use of Assertions
177
177
178
178
The result verification of all test cases must use the assertion pattern
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
270
270
@@ -299,9 +299,9 @@ Example of mock simulation data:
299
299
.thenReturn(pageInfo);
300
300
```
301
301
302
-
## Compilation of Unit Test
302
+
## 5.Compilation of Unit Test
303
303
304
-
### Class Division
304
+
### 5.1 Class Division
305
305
306
306
It can be roughly classified according to the major functions of the class
307
307
@@ -314,7 +314,7 @@ It can be roughly classified according to the major functions of the class
314
314
-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)
315
315
316
316
317
-
### Unit Test of Controller class
317
+
### 5.2 Unit Test of Controller class
318
318
Using mockmvc
319
319
320
320
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
350
350
351
351
```
352
352
353
-
### Unit Test of Server class
353
+
### 5.3 Unit Test of Server class
354
354
//todo
355
355
356
-
### Unit Test of Dao class
356
+
### 5.4 Unit Test of Dao class
357
357
358
358
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
Copy file name to clipboardexpand all lines: community/development-specification/license.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ sidebar_position: 0.1
9
9
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,
10
10
This article will explain the ASF-License and how to avoid the license risk when participating in the Linkis project development.
11
11
12
-
## License file directory description
12
+
## 1.License file directory description
13
13
14
14
License related can be divided into 3 parts
15
15
- 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
49
49
````
50
50
51
51
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
53
53
54
54
When the code you submit has the following scenarios:
55
55
@@ -62,7 +62,7 @@ When the code you submit has the following scenarios:
62
62
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
63
63
copyright notice that is included in or attached to the work.
64
64
65
-
### Example Scenario 1
65
+
### 2.1 Example Scenario 1
66
66
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
67
67
68
68
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
74
74
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`
75
75
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.
76
76
77
-
### Example Scene 2
77
+
### 2.2 Example Scene 2
78
78
79
79
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
80
80
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
89
89
90
90
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.
91
91
92
-
## License detection rules
92
+
## 3.License detection rules
93
93
We build a license-check script for our own project to ensure that we can avoid license problems as soon as we use it.
94
94
95
95
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
125
125
Follow the steps to add jar to add it.
126
126
127
127
128
-
## Appendix
128
+
## 4.Appendix
129
129
Attachment: Mail format of new jar
130
130
````
131
131
[VOTE][New/Remove Jar] jetcd-core(registry plugin support etcd3 )
- 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.
27
27
- Please note that in addition to screenshots, please <fontcolor="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
30
30
- If it is an error during the running phase, please attach a screenshot of the Eureka registry service list
31
31
:::
32
32
33
-
### Attachment & image upload
33
+
### 1.2 Attachment & image upload
34
34
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.
35
35

36
36
@@ -41,7 +41,7 @@ In many browsers you can copy and paste the image directly into the box
Copy file name to clipboardexpand all lines: docs/architecture/commons/rpc.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@ title: RPC Module
3
3
sidebar_position: 2
4
4
---
5
5
6
-
## 1Overview
6
+
## 1.Overview
7
7
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.
8
8
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.
Copy file name to clipboardexpand all lines: docs/architecture/commons/variable.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ sidebar_position: 1
4
4
---
5
5
6
6
## 1. General
7
-
### Requirements Background
7
+
### 1.1 Requirements Background
8
8
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
10
10
1. Support variable substitution of task code
11
11
2. Support custom variables, support users to define custom variables in scripts and task parameters submitted to Linkis, support simple +, - and other calculations
12
12
3. Preset system variables: run_date, run_month, run_today and other system variables
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 +-.
Copy file name to clipboardexpand all lines: docs/architecture/computation-governance-services/job-submission-preparation-and-execution-process.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ The task status is now queued
87
87
88
88
### 2.2 Job preparation stage
89
89
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:
91
91
1. The consumer (FIFOUserConsumer) consumes the supported concurrent number configured by the corresponding tag, and schedules the task consumption to the Orchestrator for execution
92
92
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.
93
93
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
110
110
ComputationEngineConnManager: Responsible for LinkisMaster to connect, request and release ENgineConn
111
111
````
112
112
113
-
### 2.2.2 LinkisMaster steps:
113
+
####2.2.2 LinkisMaster steps:
114
114
115
115
1. LinkisMaster receives the request EngineConn request from the Entrance service for processing
116
116
2. Determine if there is an EngineConn that can be reused by the corresponding Label, and return directly if there is
0 commit comments