private synchronized void flush() {
        try {
            if (session.isClosed()) {
                throw new IllegalStateException("Session is closed! Flush data error!");
            }

            // At AUTO_FLUSH_SYNC mode, kudu automatically flush once session apply operation
            if (flushMode.equalsIgnoreCase(SessionConfiguration.FlushMode.AUTO_FLUSH_SYNC.name())) {
                return;
            }
            session.flush().forEach(this::dealResponse);
            // clear
            rowCount.set(0);
        } catch (KuduException kuduException) {
            LOG.error("flush data error!", kuduException);
            throw new RuntimeException(kuduException);
        }
    }
Flush data with session, then deal the responses of operations and reset rowCount.
Detail of flush see {@link KuduSession#flush()}
kudu/kudu-sink/src/main/java/com/dtstack/flink/sql/sink/kudu/KuduOutputFormat.java