in flink_sink_adbpg_datastream/src/main/java/Adb4PgTableSink.java [318:334]
public void writeAddRecord(Row row) throws IOException {
inputCount++;
if (null != row) {
synchronized (mapBuffer) {
mapBuffer.add(new Tuple2<Boolean, Row>(true, row));
}
}
if (inputCount >= batchSize) {
sync();
} else if (System.currentTimeMillis() - this.lastWriteTime > this.batchWriteTimeout) {
if (LOG.isDebugEnabled()) {
LOG.debug("reach timeout: " + this.batchWriteTimeout + "ms, buffer=" + mapBuffer.size());
}
sync();
}
}