SourceVertexDataFetcher(final SourceVertex dataSource, final Readable readable, final OutputCollector outputCollector) { super(dataSource, outputCollector); this.readable = readable; this.readable.prepare(); this.bounded = dataSource.isBounded(); if (!bounded) { this.watermarkTriggerService = Executors.newScheduledThreadPool(1); this.watermarkTriggerService.scheduleAtFixedRate(() -> { watermarkTriggered = true; }, WATERMARK_PERIOD, WATERMARK_PERIOD, TimeUnit.MILLISECONDS); } else { this.watermarkTriggerService = null; } }
SourceVertexDataFetcher(final SourceVertex dataSource, final Readable readable, final OutputCollector outputCollector) { super(dataSource, outputCollector); this.readable = readable; this.readable.prepare(); this.bounded = dataSource.isBounded(); if (!bounded) { this.watermarkTriggerService = Executors.newScheduledThreadPool(1); this.watermarkTriggerService.scheduleAtFixedRate(() -> { watermarkTriggered = true; }, WATERMARK_PERIOD, WATERMARK_PERIOD, TimeUnit.MILLISECONDS); } else { this.watermarkTriggerService = null; } }