How does the AfterProcessingTime.pastFirstElementInPane () data stream fire?

In the streaming world of data flow.

My understanding when I say:

Window.into(FixedWindows.of(Duration.standardHours(1)))
  .triggering(AfterProcessingTime.pastFirstElementInPane()
      .plusDelayOf(Duration.standardMinutes(15))

consists in the fact that for a fixed window at one o'clock the trigger waits or breaks elements after it saw the first element.

But when I say:

Window.into(FixedWindows.of(Duration.standardHours(1)))
  .triggering(AfterProcessingTime.pastFirstElementInPane()

Does it fire every time the first time it sees the first element, or does it implicitly execute batch elements? because shooting at each element overloads the system.

+4
source share
1 answer

With both of these triggers, the window will be launched once, and all other elements will be discarded. You can use Repeatedly.forever(...)to run several times.

, , , .

, , , .

Repeatedly.forever(AfterProcessingTime.pastFirstElementInPane()
    .plusDelayOf(Duration.standardMinutes(15)))

.

Repeatedly.forever(AfterProcessingTime.pastFirstElementInPane())
+4

Source: https://habr.com/ru/post/1676865/


All Articles