Re: Arbitrary stateful aggregation: updating state without setting timeout

2020-10-06 Thread Yuri Oleynikov (‫יורי אולייניקוב‬‎)
Hi Jungtaek Thank you very much for clarification > 5 окт. 2020 г., в 15:17, Jungtaek Lim > написал(а): > >  > Hi, > > That's not explained in the SS guide doc but explained in the scala API doc. > http://spark.apache.org/docs/latest/api/scala/org/apache/spark/sql/streaming/GroupState.html >

Re: Arbitrary stateful aggregation: updating state without setting timeout

2020-10-05 Thread Jungtaek Lim
Hi, That's not explained in the SS guide doc but explained in the scala API doc. http://spark.apache.org/docs/latest/api/scala/org/apache/spark/sql/streaming/GroupState.html The statement being quoted from the scala API doc answers your question. The timeout is reset every time the function is c

Arbitrary stateful aggregation: updating state without setting timeout

2020-10-05 Thread יורי אולייניקוב
Hi all, I have following question: What happens to the state (in terms of expiration) if I’m updating the state without setting timeout? E.g. in FlatMapGroupsWithStateFunction 1. first batch: state.update(myObj) state.setTimeoutDuration(timeout) 1. second batch: state.update(myObj)