Re: [Structured Streaming] Reuse computation result
There is no way to solve this within spark.
One option you could do is break up your application into multiple application. First application can filter and write the filtered results into a kafka queue. Second application can read from queue and sum. Third application can read from
queue and do count.
With spark streaming, we can apply persist() on rdd to reuse the df computation result, when we call persist() after filter() map().filter() operator only run once.
With SS, we can’t apply persist() direct on dataframe. query1 and query2 will not reuse result after filter. map/filter run twice. So is there a way to solve this.
Shu li Zheng
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.