@Override
    public synchronized void writeRecord(Tuple2<Boolean, Row> tuple2) throws IOException {
        checkConnectionOpen();
        if (outRecords.getCount() % RECEIVEDATA_PRINT_FREQUENTY == 0 || LOG.isDebugEnabled()) {
            LOG.info("Receive data : {}", tuple2);
        }
        // Receive data
        outRecords.inc();

        jdbcWriter.addRecord(tuple2);
        batchCount++;
        if (batchCount >= flushMaxSize) {
            flush();
        }
    }
Connects to the target database and initializes the prepared statement.

@param taskNumber The number of the parallel instance.
@throws IOException Thrown, if the output could not be opened due to an
                    I/O problem.
rdb/rdb-sink/src/main/java/com/dtstack/flink/sql/sink/rdb/format/JDBCUpsertOutputFormat.java