Skip to content

Commit bff14f6

Browse files
committed
All interfaces of DSS can be changed into spring MVC #445
Version 1.0.1 of DSS is adapted to Apache of linkis #444
1 parent 721effe commit bff14f6

File tree

386 files changed

+3881
-1809
lines changed

Some content is hidden

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

386 files changed

+3881
-1809
lines changed

assembly/config/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ EMAIL_PASSWORD=xxxxx
7676
EMAIL_PROTOCOL=smtp
7777
############## ############## dss_appconn_instance configuration end ############## ##############
7878

79-
DSS_VERSION=1.0.0
79+
DSS_VERSION=1.0.1
8080

8181
DSS_FILE_NAME="dss-$DSS_VERSION"

assembly/dss-package/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
<parent>
2222
<artifactId>dss</artifactId>
2323
<groupId>com.webank.wedatasphere.dss</groupId>
24-
<version>1.0.0</version>
24+
<version>1.0.1</version>
2525
</parent>
2626
<modelVersion>4.0.0</modelVersion>
2727
<artifactId>dss-package</artifactId>
2828
<dependencies>
2929
<dependency>
30-
<groupId>com.webank.wedatasphere.linkis</groupId>
30+
<groupId>org.apache.linkis</groupId>
3131
<artifactId>linkis-rpc</artifactId>
3232
<version>${linkis.version}</version>
3333
<exclusions>
@@ -88,7 +88,7 @@
8888
</dependency>
8989

9090
<dependency>
91-
<groupId>com.webank.wedatasphere.linkis</groupId>
91+
<groupId>org.apache.linkis</groupId>
9292
<artifactId>linkis-hadoop-common</artifactId>
9393
<version>${linkis.version}</version>
9494
</dependency>
@@ -111,12 +111,12 @@
111111
</dependency>
112112

113113
<dependency>
114-
<groupId>com.webank.wedatasphere.linkis</groupId>
114+
<groupId>org.apache.linkis</groupId>
115115
<artifactId>linkis-mybatis</artifactId>
116116
<version>${linkis.version}</version>
117117
</dependency>
118118
<dependency>
119-
<groupId>com.webank.wedatasphere.linkis</groupId>
119+
<groupId>org.apache.linkis</groupId>
120120
<artifactId>linkis-storage</artifactId>
121121
<version>${linkis.version}</version>
122122
</dependency>

assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<artifactId>dss</artifactId>
2323
<groupId>com.webank.wedatasphere.dss</groupId>
24-
<version>1.0.0</version>
24+
<version>1.0.1</version>
2525
</parent>
2626
<packaging>pom</packaging>
2727
<modelVersion>4.0.0</modelVersion>

conf/dss-flow-execution-server.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ spring.server.port=9205
2020
spring.spring.application.name=dss-flow-entrance
2121

2222
##mybatis
23-
wds.linkis.server.mybatis.mapperLocations=classpath*:com/webank/wedatasphere/dss/flow/execution/entrance/dao/impl/*.xml,classpath*:com/webank/wedatasphere/linkis/jobhistory/dao/impl/*.xml
23+
wds.linkis.server.mybatis.mapperLocations=classpath*:com/webank/wedatasphere/dss/flow/execution/entrance/dao/impl/*.xml,classpath*:org/apache/linkis/jobhistory/dao/impl/*.xml
2424

2525
wds.linkis.server.mybatis.typeAliasesPackage=
2626

27-
wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.dss.flow.execution.entrance.dao,com.webank.wedatasphere.linkis.jobhistory.dao
27+
wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.dss.flow.execution.entrance.dao,org.apache.linkis.jobhistory.dao
2828

2929

30-
wds.linkis.server.restful.scan.packages=com.webank.wedatasphere.linkis.entrance.restful,com.webank.wedatasphere.dss.flow.execution.entrance.restful
30+
wds.linkis.server.restful.scan.packages=org.apache.linkis.entrance.restful,com.webank.wedatasphere.dss.flow.execution.entrance.restful
3131

32-
#wds.linkis.server.component.exclude.classes=com.webank.wedatasphere.linkis.DataWorkCloudApplication
32+
#wds.linkis.server.component.exclude.classes=org.apache.linkis.DataWorkCloudApplication
3333

3434
wds.linkis.engine.application.name=flowExecutionEngine
3535
wds.linkis.enginemanager.application.name=flowExecution
@@ -45,9 +45,9 @@ wds.linkis.server.socket.mode=true
4545
wds.linkis.client.flow.adminuser=ws
4646
wds.linkis.client.flow.author.user.token=172.0.0.1
4747

48-
wds.linkis.server.component.exclude.classes=com.webank.wedatasphere.linkis.entranceclient.conf.ClientForEntranceSpringConfiguration,com.webank.wedatasphere.linkis.entranceclient.conf.ClientSpringConfiguration
48+
wds.linkis.server.component.exclude.classes=org.apache.linkis.entranceclient.conf.ClientForEntranceSpringConfiguration,org.apache.linkis.entranceclient.conf.ClientSpringConfiguration
4949

50-
wds.linkis.server.component.exclude.packages=com.webank.wedatasphere.linkis.entrance.restful.
50+
wds.linkis.server.component.exclude.packages=org.apache.linkis.entrance.restful.
5151
spring.spring.main.allow-bean-definition-overriding=true
5252

5353
wds.linkis.entrance.config.log.path=file:///appcom/tmp/dss/

conf/dss.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ wds.linkis.server.mybatis.datasource.username=
2727
wds.dss.esb.appid=
2828
wds.dss.esb.token=
2929

30-
wds.dss.appconn.scheduler.job.label=dev
30+
wds.dss.appconn.scheduler.job.label=dev
31+
32+
33+
wds.linkis.reflect.scan.package=org.apache.linkis,com.webank.wedatasphere.dss
34+
spring.spring.mvc.servlet.path=/api/rest_j/v1
35+
spring.spring.servlet.multipart.max-file-size=200MB
36+
spring.spring.servlet.multipart.max-request-size=200MB

dss-appconn/appconns/dss-datachecker-appconn/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<artifactId>dss</artifactId>
2323
<groupId>com.webank.wedatasphere.dss</groupId>
24-
<version>1.0.0</version>
24+
<version>1.0.1</version>
2525
<relativePath>../../../pom.xml</relativePath>
2626
</parent>
2727
<modelVersion>4.0.0</modelVersion>
@@ -38,7 +38,7 @@
3838
<exclusions>
3939
<exclusion>
4040
<artifactId>linkis-common</artifactId>
41-
<groupId>com.webank.wedatasphere.linkis</groupId>
41+
<groupId>org.apache.linkis</groupId>
4242
</exclusion>
4343
<exclusion>
4444
<artifactId>json4s-jackson_2.11</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.appconn.datachecker;
18+
19+
20+
import com.webank.wedatasphere.dss.appconn.datachecker.connector.DataCheckerDao;
21+
import com.webank.wedatasphere.dss.standard.app.development.listener.common.RefExecutionAction;
22+
import com.webank.wedatasphere.dss.standard.app.development.listener.common.RefExecutionState;
23+
import org.apache.log4j.Logger;
24+
25+
import java.util.Properties;
26+
27+
public class DataChecker {
28+
public final static String SOURCE_TYPE = "source.type";
29+
public final static String DATA_OBJECT = "check.object";
30+
public final static String WAIT_TIME = "max.check.hours";
31+
public final static String QUERY_FREQUENCY = "query.frequency";
32+
public final static String TIME_SCAPE = "time.scape";
33+
public final static String MASK_URL = "bdp.mask.url";
34+
public final static String MASK_APP_ID = "bdp.mask.app.id";
35+
public final static String MASK_APP_TOKEN = "bdp.mask.app.token";
36+
37+
private Properties p;
38+
private static final Logger logger = Logger.getRootLogger();
39+
DataCheckerDao wbDao = DataCheckerDao.getInstance();
40+
DataCheckerExecutionAction dataCheckerAction = null;
41+
public long maxWaitTime;
42+
public int queryFrequency;
43+
44+
public DataChecker(Properties p, DataCheckerExecutionAction action) {
45+
this.p = p;
46+
dataCheckerAction = action;
47+
maxWaitTime = Long.valueOf(p.getProperty(DataChecker.WAIT_TIME, "1")) * 3600 * 1000;
48+
//test over time
49+
// maxWaitTime = Long.valueOf(p.getProperty(DataChecker.WAIT_TIME, "1")) * 120 * 1000;
50+
queryFrequency = Integer.valueOf(p.getProperty(DataChecker.QUERY_FREQUENCY, "30000"));
51+
52+
}
53+
54+
public void run() {
55+
dataCheckerAction.setState(RefExecutionState.Running);
56+
try {
57+
if(p == null) {
58+
throw new RuntimeException("Properties is null. Can't continue");
59+
}
60+
if (!p.containsKey(SOURCE_TYPE)) {
61+
logger.info("Properties " + SOURCE_TYPE + " value is Null !");
62+
}
63+
if (!p.containsKey(DATA_OBJECT)) {
64+
logger.info("Properties " + DATA_OBJECT + " value is Null !");
65+
}
66+
begineCheck(dataCheckerAction);
67+
}catch (Exception ex){
68+
dataCheckerAction.setState(RefExecutionState.Failed);
69+
throw new RuntimeException("get DataChecker result failed", ex);
70+
}
71+
72+
}
73+
74+
public void begineCheck(RefExecutionAction action){
75+
boolean success=false;
76+
try {
77+
success= wbDao.validateTableStatusFunction(p, logger,action);
78+
}catch (Exception ex){
79+
dataCheckerAction.setState(RefExecutionState.Failed);
80+
logger.error("datacheck error",ex);
81+
throw new RuntimeException("get DataChecker result failed", ex);
82+
}
83+
if(success) {
84+
dataCheckerAction.setState(RefExecutionState.Success);
85+
}else {
86+
dataCheckerAction.setState(RefExecutionState.Running);
87+
}
88+
}
89+
90+
public void cancel() {
91+
}
92+
93+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.appconn.datachecker;
18+
19+
import com.webank.wedatasphere.dss.appconn.datachecker.standard.DataCheckerDevelopmentStandard;
20+
import com.webank.wedatasphere.dss.appconn.core.ext.OnlyDevelopmentAppConn;
21+
import com.webank.wedatasphere.dss.appconn.core.impl.AbstractAppConn;
22+
import com.webank.wedatasphere.dss.standard.app.development.standard.DevelopmentIntegrationStandard;
23+
24+
public class DataCheckerAppConn extends AbstractAppConn implements OnlyDevelopmentAppConn {
25+
26+
private DataCheckerDevelopmentStandard standard;
27+
28+
@Override
29+
protected void initialize() {
30+
standard = new DataCheckerDevelopmentStandard();
31+
}
32+
33+
@Override
34+
public DevelopmentIntegrationStandard getOrCreateDevelopmentStandard() {
35+
return standard;
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.appconn.datachecker;
18+
19+
import com.webank.wedatasphere.dss.standard.app.development.listener.common.CompletedExecutionResponseRef;
20+
21+
import java.util.Map;
22+
23+
public class DataCheckerCompletedExecutionResponseRef extends CompletedExecutionResponseRef {
24+
25+
private Exception exception;
26+
public void setException(Exception exception) {
27+
this.exception = exception;
28+
}
29+
30+
31+
32+
public DataCheckerCompletedExecutionResponseRef(int status) {
33+
super(status);
34+
}
35+
36+
public DataCheckerCompletedExecutionResponseRef(String responseBody, int status) {
37+
super(responseBody, status);
38+
}
39+
40+
public void setStatus(int status){
41+
this.status = status;
42+
}
43+
44+
45+
@Override
46+
public Map<String, Object> toMap() {
47+
return null;
48+
}
49+
50+
}

dss-commons/dss-common/src/main/scala/com/webank/wedatasphere/linkis/common/conf/DSSConfiguration.scala renamed to dss-appconn/appconns/dss-datachecker-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/datachecker/common/MaskCheckNotExistException.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,11 @@
1414
*
1515
*/
1616

17-
package com.webank.wedatasphere.linkis.common.conf
17+
package com.webank.wedatasphere.dss.appconn.datachecker.common;
1818

19-
import java.util.Properties
20-
21-
/**
22-
* @author allenlliu
23-
* @date 2021/3/10 17:32
24-
*/
25-
object DSSConfiguration {
26-
27-
def getAllProperties: Properties = BDPConfiguration.properties
19+
public class MaskCheckNotExistException extends Exception {
2820

21+
public MaskCheckNotExistException(final String message) {
22+
super(message);
23+
}
2924
}

0 commit comments

Comments
 (0)