5151import java .util .concurrent .ScheduledFuture ;
5252import java .util .concurrent .ThreadPoolExecutor ;
5353import java .util .concurrent .TimeUnit ;
54- import java .util .concurrent .atomic .AtomicLong ;
5554
5655/**
5756 * All interfaces inherit naming rules: type + "AsyncReqRow" such as == "MysqlAsyncReqRow
@@ -65,7 +64,6 @@ public abstract class BaseAsyncReqRow extends RichAsyncFunction<CRow, CRow> impl
6564 private static final Logger LOG = LoggerFactory .getLogger (BaseAsyncReqRow .class );
6665 private static final long serialVersionUID = 2098635244857937717L ;
6766 private RuntimeContext runtimeContext ;
68- private final static AtomicLong FAIL_NUM = new AtomicLong (0 );
6967 private static int TIMEOUT_LOG_FLUSH_NUM = 10 ;
7068 private int timeOutNum = 0 ;
7169 protected BaseSideInfo sideInfo ;
@@ -258,9 +256,9 @@ protected void cancelTimerWhenComplete(ResultFuture<CRow> resultFuture, Schedule
258256 }
259257
260258 protected void dealFillDataError (CRow input , ResultFuture <CRow > resultFuture , Throwable e ) {
261- if (FAIL_NUM .incrementAndGet () > sideInfo .getSideTableInfo ().getAsyncFailMaxNum (Long .MAX_VALUE )){
259+ parseErrorRecords .inc ();
260+ if (parseErrorRecords .getCount () > sideInfo .getSideTableInfo ().getAsyncFailMaxNum (Long .MAX_VALUE )){
262261 LOG .info ("dealFillDataError" , e );
263- parseErrorRecords .inc ();
264262 resultFuture .completeExceptionally (e );
265263 } else {
266264 dealMissKey (input , resultFuture );
0 commit comments