Skip to content

Commit cc5e1f2

Browse files
committed
datachecker 支持 qualitis v10
1 parent 561d4fd commit cc5e1f2

File tree

1 file changed

+3
-2
lines changed
  • dss-appconn/appconns/dss-datachecker-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/datachecker/connector

1 file changed

+3
-2
lines changed

dss-appconn/appconns/dss-datachecker-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/datachecker/connector/DataCheckerDao.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public boolean validateTableStatusFunction(Properties props, Logger log, DataChe
102102
return false;
103103
}
104104
}
105-
if (dopsDS == null) {
105+
boolean systemCheck = Boolean.valueOf(props.getProperty(DataChecker.QUALITIS_SWITCH));
106+
if (systemCheck && dopsDS == null) {
106107
dopsDS = DataDruidFactory.getDopsInstance(props, log);//通过alibaba的druid数据库连接池获取JOB数据库连接
107108
if (dopsDS == null) {
108109
log.error("Error getting Druid DataSource instance");
@@ -132,7 +133,7 @@ public boolean validateTableStatusFunction(Properties props, Logger log, DataChe
132133
QualitisUtil qualitisUtil = new QualitisUtil(props);
133134
try (Connection jobConn = jobDS.getConnection();
134135
Connection bdpConn = bdpDS.getConnection();
135-
Connection dopsConn=dopsDS.getConnection()) {
136+
Connection dopsConn = dopsDS != null ? dopsDS.getConnection() : null) {
136137
List<Boolean> allCheckRes = dataObjectList
137138
.parallelStream()
138139
.map(proObjectMap -> {

0 commit comments

Comments
 (0)