private void startIngest() {
        synchronized (ingestThreadLock) {
            if (ingestThread != null && ingestThread.isAlive()) {
                return;
            }
            DelayRepeatTask task = new DelayRepeatTask() {
                @Override
                public long run() {
                    Long nextPeriod = Try.on(
                            RealtimeTable.this::ingest,
                            1, logger,
                            String.format("Ingest failed. [table: %s]", tableName));
                    return nextPeriod == null ? ingestRetryPeriod : nextPeriod;
                }

                @Override
                public void onStart() {
                    logger.info("Ingest progress start. [table: {}]", tableName);
                }

                @Override
                public void onComplete() {
                    logger.info("Ingest progress exit. [table: {}]", tableName);
                }
            };

            IngestThread thread = new IngestThread(
                    () -> DelayRepeatTask.runTaskInThread(task, 0),
                    tableName);
            thread.start();
            this.ingestThread = thread;
        }
    }
Close this realtime table. Job is done.
This method only called before process exit.
indexr-segment/src/main/java/io/indexr/segment/rt/RealtimeTable.java