Skip to content

Commit 6d9534b

Browse files
committed
Revert "datachecker 支持 qualitis v9"
This reverts commit 4c2539f.
1 parent c877e20 commit 6d9534b

File tree

1 file changed

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

1 file changed

+14
-16
lines changed

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,26 +210,26 @@ private boolean getDataCheckResult(Map<String, String> proObjectMap,
210210
boolean normalCheck;
211211
if (isCheckMetadata.test(proObjectMap)) {
212212
if (null != action.getExecutionRequestRefContext()){
213-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" start to check hive meta");
213+
action.getExecutionRequestRefContext().appendLog("start to check hive meta");
214214
}
215215
log.info("start to check hive meta");
216216
proObjectMap.put(DataChecker.SOURCE_TYPE, HIVE_SOURCE_TYPE);
217217
normalCheck= getJobTotalCount(dataObject, jobConn, log) > 0;
218218
if (null != action.getExecutionRequestRefContext()){
219-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check hive meta end,check result:"+normalCheck);
219+
action.getExecutionRequestRefContext().appendLog("check hive meta end,check result:"+normalCheck);
220220
}
221221
log.info("check hive meta end,check result:"+normalCheck);
222222

223223
} else {
224224
if (isCheckMask.test(proObjectMap)) {
225225
if (null != action.getExecutionRequestRefContext()){
226-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" start to check maskis");
226+
action.getExecutionRequestRefContext().appendLog("start to check maskis");
227227
}
228228
log.info("start to check maskis");
229229
proObjectMap.put(DataChecker.SOURCE_TYPE, MASK_SOURCE_TYPE);
230230
normalCheck= (getBdpTotalCount(dataObject, bdpConn, log, props) > 0 || "success".equals(fetchMaskCode(dataObject, log, props).get("maskStatus")));
231231
if (null != action.getExecutionRequestRefContext()){
232-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check maskis end,check result:"+normalCheck);
232+
action.getExecutionRequestRefContext().appendLog("check maskis end,check result:"+normalCheck);
233233
}
234234
log.info("check maskis end,check result:"+normalCheck);
235235
}else {
@@ -240,10 +240,10 @@ private boolean getDataCheckResult(Map<String, String> proObjectMap,
240240
return false;
241241
}
242242

243-
boolean qualitisCheck = checkQualitisData(objectNum, dataObject, log, action, props, dopsConn, qualitisUtil, dataObjectStr );
243+
boolean qualitisCheck = checkQualitisData(objectNum, dataObject, log, action, props, dopsConn, qualitisUtil);
244244
if(!qualitisCheck){
245245
//如果是qualitis校验失败,则直接终止任务
246-
throw new RuntimeException(dataObjectStr+ " does not pass qualitis check(qualitis校验未通过)");
246+
throw new RuntimeException("does not pass qualitis check(qualitis校验未通过)");
247247
}
248248
return qualitisCheck;
249249
}
@@ -465,9 +465,7 @@ private int checkDops(CheckDataObject dataObject, Connection conn, Logger log){
465465
/**
466466
* 从qualitis去check数据
467467
*/
468-
private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, Logger log,
469-
DataCheckerExecutionAction action,Properties props,Connection conn,
470-
QualitisUtil qualitisUtil,String dataObjectStr ) {
468+
private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, Logger log, RefExecutionAction action,Properties props,Connection conn, QualitisUtil qualitisUtil) {
471469
boolean systemCheck = Boolean.valueOf(props.getProperty(DataChecker.QUALITIS_SWITCH));
472470
String userCheckDefault=props.getProperty(DataChecker.QUALITIS_CHECK_DEFAULT);
473471
String userCheckStr = StringUtils.isBlank(props.getProperty(DataChecker.QUALITIS_CHECK)) ?
@@ -477,12 +475,12 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
477475
log.info("systemCheck:{},userCheckDefault:{},userCheck:{}",systemCheck,userCheckDefault,userCheck);
478476
if (systemCheck && userCheck ) {
479477
if (null != action.getExecutionRequestRefContext()){
480-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" start to check dops");
478+
action.getExecutionRequestRefContext().appendLog("start to check dops");
481479
}
482480
log.info("start to check dops");
483481
int dopsState=checkDops(dataObject,conn,log);
484482
if (null != action.getExecutionRequestRefContext()){
485-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check dops end,check result:"+dopsState);
483+
action.getExecutionRequestRefContext().appendLog("check dops end,check result:"+dopsState);
486484
}
487485
log.info("check dops end,check result:"+dopsState);
488486
if(dopsState==0){
@@ -494,7 +492,7 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
494492
}
495493
// 其他情况,继续走qualitis校验
496494
if (null != action.getExecutionRequestRefContext()){
497-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" Data Check Qualitis Start");
495+
action.getExecutionRequestRefContext().appendLog("Data Check Qualitis Start");
498496
}
499497
log.info(
500498
"=============================Data Check Qualitis Start==========================================");
@@ -528,28 +526,28 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
528526
break;
529527
case 4:
530528
if (null != action.getExecutionRequestRefContext()){
531-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check qualitis end,check result:true");
529+
action.getExecutionRequestRefContext().appendLog("check qualitis end,check result:true");
532530
}
533531
log.info("check qualitis end,check result:true");
534532
return true;
535533
default:
536534
if (null != action.getExecutionRequestRefContext()){
537-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check qualitis end,check result:false");
535+
action.getExecutionRequestRefContext().appendLog("check qualitis end,check result:false");
538536
}
539537
log.info("check qualitis end,check result:false");
540538
return false;
541539
}
542540

543541
}
544542
if (null != action.getExecutionRequestRefContext()){
545-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" Data Check Qualitis time out,check result set to false");
543+
action.getExecutionRequestRefContext().appendLog("Data Check Qualitis time out,check result set to false");
546544
}
547545
log.info(
548546
"=============================Data Check Qualitis time out,check result set to false==========================================");
549547
return false;
550548
} catch (Exception e) {
551549
if (null != action.getExecutionRequestRefContext()){
552-
action.getExecutionRequestRefContext().appendLog(dataObjectStr+" check qualitis failed,check result set to false.cause by:"+e.getMessage());
550+
action.getExecutionRequestRefContext().appendLog("check qualitis failed,check result set to false.cause by:"+e.getMessage());
553551
}
554552
log.error("get datachecker result from qualitis failed", e);
555553
return false;

0 commit comments

Comments
 (0)