private void initScheduledTask(Long batchWaitInterval) {
        try {
            if (batchWaitInterval != 0) {
                this.scheduler = new ScheduledThreadPoolExecutor(1,
                        new DTThreadFactory("impala-upsert-output-format"));
                this.scheduledFuture = this.scheduler.scheduleWithFixedDelay(() -> {
                    synchronized (ImpalaOutputFormat.this) {
                        flush();
                    }
                }, batchWaitInterval, batchWaitInterval, TimeUnit.MILLISECONDS);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
Date: 2020/10/14
Company: www.dtstack.com

@author tiezhu
impala/impala-sink/src/main/java/com/dtstack/flink/sql/sink/impala/ImpalaOutputFormat.java