@@ -149,9 +149,9 @@ public boolean validateTableStatusFunction(Properties props, Logger log, RefExec
149
149
}).collect (Collectors .toList ());
150
150
boolean flag = allCheckRes .stream ().allMatch (res -> res .equals (true ));
151
151
if (flag ) {
152
- log .info ("=============================Data Check End,check result:true ==========================================" );
152
+ log .info ("=============================Data Check End==========================================" );
153
153
if (null != action .getExecutionRequestRefContext ()) {
154
- action .getExecutionRequestRefContext ().appendLog ("=============================Data Check End,check result:true ==========================================" );
154
+ action .getExecutionRequestRefContext ().appendLog ("=============================Data Check End==========================================" );
155
155
}
156
156
return true ;
157
157
}
@@ -160,9 +160,9 @@ public boolean validateTableStatusFunction(Properties props, Logger log, RefExec
160
160
throw new RuntimeException ("get DataChecker result failed" , e );
161
161
}
162
162
163
- log .info ("=============================Data Check End,check result:false ==========================================" );
163
+ log .info ("=============================Data Check End==========================================" );
164
164
if (null != action .getExecutionRequestRefContext ()) {
165
- action .getExecutionRequestRefContext ().appendLog ("=============================Data Check End,,check result:false ==========================================" );
165
+ action .getExecutionRequestRefContext ().appendLog ("=============================Data Check End==========================================" );
166
166
}
167
167
return false ;
168
168
}
@@ -210,26 +210,22 @@ private boolean getDataCheckResult(Map<String, String> proObjectMap,
210
210
if (null != action .getExecutionRequestRefContext ()){
211
211
action .getExecutionRequestRefContext ().appendLog ("start to check hive meta" );
212
212
}
213
- log .info ("start to check hive meta" );
214
213
proObjectMap .put (DataChecker .SOURCE_TYPE , HIVE_SOURCE_TYPE );
215
214
normalCheck = getJobTotalCount (dataObject , jobConn , log ) > 0 ;
216
215
if (null != action .getExecutionRequestRefContext ()){
217
216
action .getExecutionRequestRefContext ().appendLog ("check hive meta end,check result:" +normalCheck );
218
217
}
219
- log .info ("check hive meta end,check result:" +normalCheck );
220
218
221
219
} else {
222
220
if (isCheckMask .test (proObjectMap )) {
223
221
if (null != action .getExecutionRequestRefContext ()){
224
222
action .getExecutionRequestRefContext ().appendLog ("start to check maskis" );
225
223
}
226
- log .info ("start to check maskis" );
227
224
proObjectMap .put (DataChecker .SOURCE_TYPE , MASK_SOURCE_TYPE );
228
225
normalCheck = (getBdpTotalCount (dataObject , bdpConn , log , props ) > 0 || "success" .equals (fetchMaskCode (dataObject , log , props ).get ("maskStatus" )));
229
226
if (null != action .getExecutionRequestRefContext ()){
230
227
action .getExecutionRequestRefContext ().appendLog ("check maskis end,check result:" +normalCheck );
231
228
}
232
- log .info ("check maskis end,check result:" +normalCheck );
233
229
}else {
234
230
normalCheck = false ;
235
231
}
@@ -459,21 +455,15 @@ private int checkDops(CheckDataObject dataObject, Connection conn, Logger log){
459
455
private boolean checkQualitisData (String objectNum ,CheckDataObject dataObject , Logger log , RefExecutionAction action ,Properties props ,Connection conn , QualitisUtil qualitisUtil ) {
460
456
boolean systemCheck = Boolean .valueOf (props .getProperty (DataChecker .QUALITIS_SWITCH ));
461
457
String userCheckDefault =props .getProperty (DataChecker .QUALITIS_CHECK_DEFAULT );
462
- String userCheckStr = StringUtils .isBlank (props .getProperty (DataChecker .QUALITIS_CHECK )) ?
463
- userCheckDefault :
464
- props .getProperty (DataChecker .QUALITIS_CHECK );
465
- boolean userCheck = Boolean .valueOf (userCheckStr );
466
- log .info ("systemCheck:{},userCheckDefault:{},userCheck:{}" ,systemCheck ,userCheckDefault ,userCheck );
458
+ boolean userCheck = Boolean .valueOf (props .getProperty (DataChecker .QUALITIS_CHECK , userCheckDefault ));
467
459
if (systemCheck && userCheck ) {
468
460
if (null != action .getExecutionRequestRefContext ()){
469
461
action .getExecutionRequestRefContext ().appendLog ("start to check dops" );
470
462
}
471
- log .info ("start to check dops" );
472
463
int dopsState =checkDops (dataObject ,conn ,log );
473
464
if (null != action .getExecutionRequestRefContext ()){
474
465
action .getExecutionRequestRefContext ().appendLog ("check dops end,check result:" +dopsState );
475
466
}
476
- log .info ("check dops end,check result:" +dopsState );
477
467
if (dopsState ==0 ){
478
468
//没找到记录,直接通过校验
479
469
return true ;
@@ -483,7 +473,7 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
483
473
}
484
474
// 其他情况,继续走qualitis校验
485
475
if (null != action .getExecutionRequestRefContext ()){
486
- action .getExecutionRequestRefContext ().appendLog ("Data Check Qualitis Start " );
476
+ action .getExecutionRequestRefContext ().appendLog ("start to check qualitis " );
487
477
}
488
478
log .info (
489
479
"=============================Data Check Qualitis Start==========================================" );
@@ -519,22 +509,20 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
519
509
if (null != action .getExecutionRequestRefContext ()){
520
510
action .getExecutionRequestRefContext ().appendLog ("check qualitis end,check result:true" );
521
511
}
522
- log .info ("check qualitis end,check result:true" );
523
512
return true ;
524
513
default :
525
514
if (null != action .getExecutionRequestRefContext ()){
526
515
action .getExecutionRequestRefContext ().appendLog ("check qualitis end,check result:false" );
527
516
}
528
- log .info ("check qualitis end,check result:false" );
529
517
return false ;
530
518
}
531
519
532
520
}
533
521
if (null != action .getExecutionRequestRefContext ()){
534
- action .getExecutionRequestRefContext ().appendLog ("Data Check Qualitis time out,check result set to false" );
522
+ action .getExecutionRequestRefContext ().appendLog ("check qualitis time out,check result set to false" );
535
523
}
536
524
log .info (
537
- "=============================Data Check Qualitis time out,check result set to false ==========================================" );
525
+ "=============================Data Check Qualitis time out==========================================" );
538
526
return false ;
539
527
} catch (Exception e ) {
540
528
if (null != action .getExecutionRequestRefContext ()){
0 commit comments