Is Statefull doFn supported by google dataflow runner?

54 Views Asked by At

I cannot make a batch fn work on Dataflow. I used the one in example here in Go: https://beam.apache.org/documentation/programming-guide/#state-timers-examples

The dofn receive element and trigger the OnTimer once and then everything get stuck (I can see it with logs).

I'am in streaming mode. So my first question is do Dataflow support Timers in Go? If yes what I'm doing wrong? I literrally copied the example.

1

There are 1 best solutions below

1
boolangery On

Ok, for everyone struggling with same issue on Dataflow, you have to add this line is the OnTimer() callback:

fn.OutputState.ClearTag(tp, timer.Tag) // Clean up the fired timer tag. (Temporary workaround for a runner bug.)

(this line is present in the example on github but not in the documentation)