Skip to content

Commit 2ddda62

Browse files
authored
Merge pull request #178 from Tangjiafeng/branch-1.0.0
Branch 1.0.0
2 parents 833bc80 + 30acccd commit 2ddda62

File tree

1,467 files changed

+129670
-92065
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,467 files changed

+129670
-92065
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
22

3-
English | [中文](/README_zh.md)
3+
English | [中文](docs/zh_CN/ch1/README.md)
44

55
## Overview
66
Qualitis is a data quality management platform that supports quality verification, notification, and management for various datasource. It is used to solve various data quality problems caused by data processing.
77

8-
Based on Spring Boot, Qualitis submits quality model task to [Linkis](https://github.com/apache/incubator-linkis) platform. It provides functions such as data quality model construction, data quality model execution, data quality verification, reports of data quality generation and so on.
9-
10-
At the same time, Qualitis provides enterprise-level features of financial-level resource isolation, management and access control. It is also guaranteed working well under high-concurrency, high-performance and high-availability scenarios.
8+
Based on Spring Boot, Qualitis submits quality model task to [Linkis](https://github.com/WeBankFinTech/Linkis) platform. It provides functions such as data quality model construction, data quality model execution, data quality verification, reports of data quality generation and so on. At the same time, Qualitis provides enterprise-level features of financial-level resource isolation, management and access control. It is also guaranteed working well under high-concurrency, high-performance and high-availability scenarios.
119

1210
## Features
1311
- **Define Data Quality Model**
@@ -34,14 +32,13 @@ Supports workflow
3432
Workflow needs [DataSphereStudio](https://github.com/WeBankFinTech/DataSphereStudio).
3533

3634
- **Administrator Console**
37-
Administrator console provided.
38-
And it also supports personnel management, access control management, privilege control management, metadata management and so on.
35+
Administrator console provided. And it also supports personnel management, access control management, privilege control management, metadata management and so on.
3936

4037
## Compared with similar systems
4138
![](images/en_US/ch1/CompareSimilarSystem.png)
4239

4340
## Documents
44-
[Quick Deploy](docs/en_US/ch1/QuickDeploy.md)
41+
[Quick Deploy](docs/en_US/ch1/Quick%20Deploy%20Standalone.md)
4542
[User Manual](docs/en_US/ch1/User%20Manual.md)
4643
[Architecture Design](docs/en_US/ch1/Architecture%20Design.md)
4744
<br/>
@@ -67,12 +64,15 @@ Supports generating data quality reports with optional latitude.
6764
### 4. Support intelligent discovery of data quality problems
6865
<br/>
6966

67+
**If you have any needs, please send us an issue and we will reply to you in time.**
68+
69+
## Contributing
70+
Community partners are very welcome to contribute new engines and codes to us!
71+
7072
## Communication
7173
If you desire immediate response, please kindly raise issues to us or scan the below QR code by WeChat and QQ to join our group:
7274
![](images/en_US/ch1/ContractUs.png)
7375

7476
## License
7577
**Qualitis is under the Apache 2.0 license. See the [LICENSE](/LICENSE) file for details.**
7678

77-
## Tips
78-
The front-end code of Qualitis adopts the front-end framework FES self-developed by WeBank. The FES framework is currently open source, and the source code can be downloaded through the ui folder in the root directory. Of course, it can also be used directly by downloading the release. The default front-end compilation package is installed in Qualitis-x.x.x/conf/static.

README_zh.md

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

appconn/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<groupId>org.apache.linkis</groupId>
8080
<artifactId>linkis-cs-common</artifactId>
8181
<version>${linkis.version}</version>
82-
<scope>compile</scope>
82+
<scope>provided</scope>
8383
</dependency>
8484
<dependency>
8585
<artifactId>linkis-bml-client</artifactId>
@@ -99,6 +99,7 @@
9999
<groupId>org.apache.linkis</groupId>
100100
<artifactId>linkis-httpclient</artifactId>
101101
<version>${linkis.version}</version>
102+
<scope>provided</scope>
102103
<exclusions>
103104
<exclusion>
104105
<artifactId>linkis-common</artifactId>
@@ -130,9 +131,13 @@
130131
<version>${dss.version}</version>
131132
<scope>provided</scope>
132133
</dependency>
134+
<dependency>
135+
<groupId>com.fasterxml.jackson.core</groupId>
136+
<artifactId>jackson-databind</artifactId>
137+
<version>2.14.1</version>
138+
</dependency>
133139
</dependencies>
134140

135-
136141
<build>
137142
<plugins>
138143
<plugin>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<svg t="1572510532353" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22979" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30"> <path d="M512 11.324L82.824 154.323V583.56A429.116 429.116 0 0 0 512 1012.616a429.116 429.116 0 0 0 429.176-429.177V154.443L512 11.264zM860.762 583.56a348.762 348.762 0 0 1-697.524 0V214.679L512 91.799l348.762 122.88v368.82zM362.616 470.679a40.117 40.117 0 0 0-56.862 0 40.117 40.117 0 0 0 0 56.922L450.32 672.166l2.41 2.41a37.948 37.948 0 0 0 53.73 0l249.795-249.797a37.948 37.948 0 0 0 0-53.79l-3.132-3.132a37.948 37.948 0 0 0-53.73 0L479.533 587.595 362.677 470.74z" p-id="22980" fill="#339999"/> </svg>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<svg t="1572510532353" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22979" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30"> <path d="M512 11.324L82.824 154.323V583.56A429.116 429.116 0 0 0 512 1012.616a429.116 429.116 0 0 0 429.176-429.177V154.443L512 11.264zM860.762 583.56a348.762 348.762 0 0 1-697.524 0V214.679L512 91.799l348.762 122.88v368.82zM362.616 470.679a40.117 40.117 0 0 0-56.862 0 40.117 40.117 0 0 0 0 56.922L450.32 672.166l2.41 2.41a37.948 37.948 0 0 0 53.73 0l249.795-249.797a37.948 37.948 0 0 0 0-53.79l-3.132-3.132a37.948 37.948 0 0 0-53.73 0L479.533 587.595 362.677 470.74z" p-id="22980" fill="#339999"/> </svg>

appconn/src/main/java/com/webank/wedatasphere/dss/appconn/qualitis/execution/QualitisRefExecutionOperation.java

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.webank.wedatasphere.dss.standard.app.development.listener.core.LongTermRefExecutionOperation;
2626
import com.webank.wedatasphere.dss.standard.app.development.listener.core.Killable;
2727
import com.webank.wedatasphere.dss.standard.app.development.listener.core.Procedure;
28-
import com.webank.wedatasphere.dss.standard.app.development.service.DevelopmentService;
2928
import com.webank.wedatasphere.dss.standard.app.development.listener.ref.ExecutionResponseRef;
3029
import com.webank.wedatasphere.dss.standard.app.development.listener.ref.RefExecutionRequestRef;
3130
import com.webank.wedatasphere.dss.standard.common.exception.operation.ExternalOperationFailedException;
@@ -53,23 +52,25 @@
5352
*/
5453
public class QualitisRefExecutionOperation extends LongTermRefExecutionOperation<RefExecutionRequestRef.RefExecutionProjectWithContextRequestRef>
5554
implements Killable, Procedure {
56-
private static final String SUBMIT_TASK_PATH = "qualitis/outer/api/v1/execution";
57-
private static final String GET_TASK_STATUS_PATH = "qualitis/outer/api/v1/application/{applicationId}/status/";
58-
private static final String GET_TASK_RESULT_PATH = "qualitis/outer/api/v1/application/{applicationId}/result/";
59-
private static final String KILL_TASK_PATH = "qualitis/outer/api/v1/execution/application/kill/{applicationId}/{executionUser}";
55+
56+
private static Logger LOGGER = LoggerFactory.getLogger(QualitisRefExecutionOperation.class);
57+
58+
private static final String FILTER = "filter";
6059
private static final String NODE_NAME_KEY = "nodeName";
6160
private static final String RULEGROUPID = "ruleGroupId";
6261
private static final String RULE_GROUP_ID = "rule_group_id";
6362
private static final String EXECUTION_USER_KEY = "executionUser";
6463
private static final String WDS_SUBMIT_USER_KEY = "wds.dss.workflow.submit.user";
64+
private static final String SUBMIT_TASK_PATH = "qualitis/outer/api/v1/execution";
65+
private static final String GET_TASK_LOG_PATH = "qualitis/outer/api/v1/application/{applicationId}/log";
66+
private static final String GET_TASK_STATUS_PATH = "qualitis/outer/api/v1/application/{applicationId}/status/";
67+
private static final String GET_TASK_RESULT_PATH = "qualitis/outer/api/v1/application/{applicationId}/result/";
68+
private static final String KILL_TASK_PATH = "qualitis/outer/api/v1/execution/application/kill/{applicationId}/{executionUser}";
6569

66-
private static Logger LOGGER = LoggerFactory.getLogger(QualitisRefExecutionOperation.class);
6770

6871
private String appId = "linkis_id";
6972
private String appToken = "***REMOVED***";
7073

71-
private static final String FILTER = "filter";
72-
7374
@Override
7475
protected String getAppConnName() {
7576
return QualitisAppConn.QUALITIS_APPCONN_NAME;
@@ -254,7 +255,7 @@ public RefExecutionState state(RefExecutionAction action) {
254255
}
255256
LOGGER.info("Start to check job. url: {}, method: {}, body: {}", url, HttpMethod.GET, entity);
256257
Map<String, Object> response = restTemplate.getForEntity(url, Map.class).getBody();
257-
String finishLog = String.format("Succeed to submit job to qualitis. response: %s", response);
258+
String finishLog = String.format("Succeed to check job. response: %s", response);
258259
LOGGER.info(finishLog);
259260

260261
if (response == null) {
@@ -265,7 +266,7 @@ public RefExecutionState state(RefExecutionAction action) {
265266

266267
if (! checkResponse(response)) {
267268
String message = (String) response.get("message");
268-
String errorMsg = String.format("Error! Can not submit job, exception: %s", message);
269+
String errorMsg = String.format("Error! Can not check job, exception: %s", message);
269270
LOGGER.error(errorMsg);
270271
return null;
271272
}
@@ -362,7 +363,7 @@ public ExecutionResponseRef result(RefExecutionAction action) {
362363
}
363364
LOGGER.info("Start to get job result. url: {}, method: {}, body: {}", url, HttpMethod.GET, entity);
364365
Map<String, Object> response = restTemplate.getForEntity(url, Map.class).getBody();
365-
String finishLog = String.format("Succeed to submit job to qualitis. response: %s", response);
366+
String finishLog = String.format("Succeed to get job result. response: %s", response);
366367
LOGGER.info(finishLog);
367368

368369
if (response == null) {
@@ -373,7 +374,7 @@ public ExecutionResponseRef result(RefExecutionAction action) {
373374

374375
if (! checkResponse(response)) {
375376
String message = (String) response.get("message");
376-
String errorMsg = String.format("Error! Can not submit job, exception: %s", message);
377+
String errorMsg = String.format("Error! Can not get job result, exception: %s", message);
377378
LOGGER.error(errorMsg);
378379
return null;
379380
}
@@ -388,6 +389,13 @@ public ExecutionResponseRef result(RefExecutionAction action) {
388389
LOGGER.info(taskMsg);
389390
LOGGER.info(resultMessage);
390391

392+
try {
393+
action.getExecutionRequestRefContext().appendLog(this.log(action));
394+
} catch (Exception e) {
395+
LOGGER.error("Get qualitis log failed.");
396+
LOGGER.error(e.getMessage(), e);
397+
}
398+
391399
if (failedNum != 0) {
392400
return ExecutionResponseRef.newBuilder().error();
393401
} else {
@@ -403,6 +411,50 @@ public float progress(RefExecutionAction action) {
403411

404412
@Override
405413
public String log(RefExecutionAction action) {
406-
return "";
414+
if (null == action) {
415+
return "";
416+
}
417+
418+
QualitisRefExecutionAction qualitisRefExecutionAction = (QualitisRefExecutionAction) action;
419+
String applicationId = qualitisRefExecutionAction.getApplicationId();
420+
String executionUser = qualitisRefExecutionAction.getExecutionUser();
421+
LOGGER.info("Qualitis application ID: {}", applicationId);
422+
LOGGER.info("Qualitis execution user: {}", executionUser);
423+
if (StringUtils.isEmpty(applicationId) || StringUtils.isEmpty(executionUser)) {
424+
return "";
425+
}
426+
HttpHeaders headers = new HttpHeaders();
427+
headers.setContentType(MediaType.APPLICATION_JSON);
428+
429+
HttpEntity<Object> entity = new HttpEntity<>(headers);
430+
431+
RestTemplate restTemplate = new RestTemplate();
432+
String url = null;
433+
try {
434+
url = HttpUtils.buildUrI(getBaseUrl(), GET_TASK_LOG_PATH.replace("{applicationId}", applicationId), appId, appToken, RandomStringUtils.randomNumeric(5), String.valueOf(System.currentTimeMillis())).toString();
435+
} catch (NoSuchAlgorithmException e) {
436+
LOGGER.info("Qualitis no signature algor.", e);
437+
} catch (URISyntaxException e) {
438+
LOGGER.error("Qualitis uri syntax exception.", e);
439+
}
440+
LOGGER.info("Start to get job log. url: {}, method: {}, body: {}", url, HttpMethod.GET, entity);
441+
Map<String, Object> response = restTemplate.getForEntity(url, Map.class).getBody();
442+
String finishLog = String.format("Succeed to get job log.");
443+
LOGGER.info(finishLog);
444+
445+
if (response == null) {
446+
String errorMsg = "Error! Can not get job log, response is null";
447+
LOGGER.error(errorMsg);
448+
return "";
449+
}
450+
451+
if (! checkResponse(response)) {
452+
String message = (String) response.get("message");
453+
String errorMsg = String.format("Error! Can not get job log, exception: %s", message);
454+
LOGGER.error(errorMsg);
455+
return "";
456+
}
457+
458+
return (String) response.get("data");
407459
}
408460
}

appconn/src/main/java/com/webank/wedatasphere/dss/appconn/qualitis/project/QualitisCheckTemplateSearchOperation.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@
55
import com.webank.wedatasphere.dss.appconn.qualitis.ref.entity.QualitisTemplate;
66
import com.webank.wedatasphere.dss.appconn.qualitis.utils.HttpUtils;
77
import com.webank.wedatasphere.dss.standard.app.structure.StructureRequestRef;
8-
import com.webank.wedatasphere.dss.standard.app.structure.StructureRequestRefImpl;
98
import com.webank.wedatasphere.dss.standard.app.structure.optional.AbstractOptionalOperation;
10-
import com.webank.wedatasphere.dss.standard.app.structure.project.ref.ProjectResponseRef;
11-
import com.webank.wedatasphere.dss.standard.common.entity.ref.RequestRefImpl;
129
import com.webank.wedatasphere.dss.standard.common.entity.ref.ResponseRef;
1310
import com.webank.wedatasphere.dss.standard.common.entity.ref.ResponseRefImpl;
1411
import com.webank.wedatasphere.dss.standard.common.exception.operation.ExternalOperationFailedException;
15-
import org.apache.commons.collections.CollectionUtils;
12+
import java.net.URISyntaxException;
13+
import java.security.NoSuchAlgorithmException;
14+
import java.util.Arrays;
15+
import java.util.HashMap;
16+
import java.util.List;
17+
import java.util.Map;
1618
import org.apache.commons.lang.RandomStringUtils;
1719
import org.apache.linkis.common.conf.CommonVars;
1820
import org.apache.linkis.server.BDPJettyServerHelper;
1921
import org.slf4j.Logger;
2022
import org.slf4j.LoggerFactory;
21-
import org.springframework.http.*;
23+
import org.springframework.http.HttpEntity;
24+
import org.springframework.http.HttpHeaders;
25+
import org.springframework.http.HttpMethod;
26+
import org.springframework.http.HttpStatus;
27+
import org.springframework.http.MediaType;
2228
import org.springframework.web.client.RestTemplate;
2329

24-
import java.net.URISyntaxException;
25-
import java.security.NoSuchAlgorithmException;
26-
import java.util.*;
27-
2830
/**
2931
* @author leebai
3032
* @date 2022/5/19 17:00

0 commit comments

Comments
 (0)