You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by aitozi <gj...@gmail.com> on 2017/09/10 06:47:00 UTC

HeapInternalTimerService#advanceWatermark

Hi,

i have read this snip of code again and again, but i cant understand the
usage of it , can anyone explain it for me. thank you very much.

	public void advanceWatermark(long time) throws Exception {
		currentWatermark = time;

		InternalTimer<K, N> timer;

		while ((timer = eventTimeTimersQueue.peek()) != null &&
timer.getTimestamp() <= time) {

			Set<InternalTimer&lt;K, N>> timerSet =
getEventTimeTimerSetForTimer(timer);
			timerSet.remove(timer);
			eventTimeTimersQueue.remove();

			keyContext.setCurrentKey(timer.getKey());
			triggerTarget.onEventTime(timer);
		}
	}



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/