@@ -210,26 +210,26 @@ private boolean getDataCheckResult(Map<String, String> proObjectMap,
210
210
boolean normalCheck ;
211
211
if (isCheckMetadata .test (proObjectMap )) {
212
212
if (null != action .getExecutionRequestRefContext ()){
213
- action .getExecutionRequestRefContext ().appendLog (dataObjectStr + " start to check hive meta" );
213
+ action .getExecutionRequestRefContext ().appendLog (" start to check hive meta" );
214
214
}
215
215
log .info ("start to check hive meta" );
216
216
proObjectMap .put (DataChecker .SOURCE_TYPE , HIVE_SOURCE_TYPE );
217
217
normalCheck = getJobTotalCount (dataObject , jobConn , log ) > 0 ;
218
218
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 );
220
220
}
221
221
log .info ("check hive meta end,check result:" +normalCheck );
222
222
223
223
} else {
224
224
if (isCheckMask .test (proObjectMap )) {
225
225
if (null != action .getExecutionRequestRefContext ()){
226
- action .getExecutionRequestRefContext ().appendLog (dataObjectStr + " start to check maskis" );
226
+ action .getExecutionRequestRefContext ().appendLog (" start to check maskis" );
227
227
}
228
228
log .info ("start to check maskis" );
229
229
proObjectMap .put (DataChecker .SOURCE_TYPE , MASK_SOURCE_TYPE );
230
230
normalCheck = (getBdpTotalCount (dataObject , bdpConn , log , props ) > 0 || "success" .equals (fetchMaskCode (dataObject , log , props ).get ("maskStatus" )));
231
231
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 );
233
233
}
234
234
log .info ("check maskis end,check result:" +normalCheck );
235
235
}else {
@@ -240,10 +240,10 @@ private boolean getDataCheckResult(Map<String, String> proObjectMap,
240
240
return false ;
241
241
}
242
242
243
- boolean qualitisCheck = checkQualitisData (objectNum , dataObject , log , action , props , dopsConn , qualitisUtil , dataObjectStr );
243
+ boolean qualitisCheck = checkQualitisData (objectNum , dataObject , log , action , props , dopsConn , qualitisUtil );
244
244
if (!qualitisCheck ){
245
245
//如果是qualitis校验失败,则直接终止任务
246
- throw new RuntimeException (dataObjectStr + " does not pass qualitis check(qualitis校验未通过)" );
246
+ throw new RuntimeException (" does not pass qualitis check(qualitis校验未通过)" );
247
247
}
248
248
return qualitisCheck ;
249
249
}
@@ -465,9 +465,7 @@ private int checkDops(CheckDataObject dataObject, Connection conn, Logger log){
465
465
/**
466
466
* 从qualitis去check数据
467
467
*/
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 ) {
471
469
boolean systemCheck = Boolean .valueOf (props .getProperty (DataChecker .QUALITIS_SWITCH ));
472
470
String userCheckDefault =props .getProperty (DataChecker .QUALITIS_CHECK_DEFAULT );
473
471
String userCheckStr = StringUtils .isBlank (props .getProperty (DataChecker .QUALITIS_CHECK )) ?
@@ -477,12 +475,12 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
477
475
log .info ("systemCheck:{},userCheckDefault:{},userCheck:{}" ,systemCheck ,userCheckDefault ,userCheck );
478
476
if (systemCheck && userCheck ) {
479
477
if (null != action .getExecutionRequestRefContext ()){
480
- action .getExecutionRequestRefContext ().appendLog (dataObjectStr + " start to check dops" );
478
+ action .getExecutionRequestRefContext ().appendLog (" start to check dops" );
481
479
}
482
480
log .info ("start to check dops" );
483
481
int dopsState =checkDops (dataObject ,conn ,log );
484
482
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 );
486
484
}
487
485
log .info ("check dops end,check result:" +dopsState );
488
486
if (dopsState ==0 ){
@@ -494,7 +492,7 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
494
492
}
495
493
// 其他情况,继续走qualitis校验
496
494
if (null != action .getExecutionRequestRefContext ()){
497
- action .getExecutionRequestRefContext ().appendLog (dataObjectStr + " Data Check Qualitis Start" );
495
+ action .getExecutionRequestRefContext ().appendLog (" Data Check Qualitis Start" );
498
496
}
499
497
log .info (
500
498
"=============================Data Check Qualitis Start==========================================" );
@@ -528,28 +526,28 @@ private boolean checkQualitisData(String objectNum,CheckDataObject dataObject, L
528
526
break ;
529
527
case 4 :
530
528
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" );
532
530
}
533
531
log .info ("check qualitis end,check result:true" );
534
532
return true ;
535
533
default :
536
534
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" );
538
536
}
539
537
log .info ("check qualitis end,check result:false" );
540
538
return false ;
541
539
}
542
540
543
541
}
544
542
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" );
546
544
}
547
545
log .info (
548
546
"=============================Data Check Qualitis time out,check result set to false==========================================" );
549
547
return false ;
550
548
} catch (Exception e ) {
551
549
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 ());
553
551
}
554
552
log .error ("get datachecker result from qualitis failed" , e );
555
553
return false ;
0 commit comments