Hi Tomasz The API fromCollection() would record the number of elements emitted [1] in snapshot state, and restore them to remember as elements to skip [2], that is to say not all elements would be read again.
But frankly speaking, once fromCollection is completed, the source task would finish and no more savepoint could be triggered. [1] https://github.com/apache/flink/blob/c354f7bd679b9fa8c1e0d75feb3827ccca7f317b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java#L67 [2] https://github.com/apache/flink/blob/c354f7bd679b9fa8c1e0d75feb3827ccca7f317b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java#L123 Best Yun Tang ________________________________ From: Tomasz Dudziak <t.dudz...@mwam.com> Sent: Wednesday, November 25, 2020 18:22 To: user@flink.apache.org <user@flink.apache.org> Subject: fromCollection() and savepoints Hi, What is the behaviour of fromCollection() when restarting from a savepoint? Will the elements of the collection get fed into the resulting stream again or not? What if the contents of the underlying collection change? Thanks, Tomasz Tomasz Dudziak | Marshall Wace LLP, George House, 131 Sloane Street, London, SW1X 9AT | E-mail: t.dudz...@mwam.com<mailto:t.dudz...@mwam.com> | Tel: +44 207 024 7061 This e-mail and any attachments are confidential to the addressee(s) and may contain information that is legally privileged and/or confidential. If you are not the intended recipient of this e-mail you are hereby notified that any dissemination, distribution, or copying of its content is strictly prohibited. If you have received this message in error, please notify the sender by return e-mail and destroy the message and all copies in your possession. To find out more details about how we may collect, use and share your personal information, please see https://www.mwam.com/privacy-policy. This includes details of how calls you make to us may be recorded in order for us to comply with our legal and regulatory obligations. To the extent that the contents of this email constitutes a financial promotion, please note that it is issued only to and/or directed only at persons who are professional clients or eligible counterparties as defined in the FCA Rules. Any investment products or services described in this email are available only to professional clients and eligible counterparties. Persons who are not professional clients or eligible counterparties should not rely or act on the contents of this email. Marshall Wace LLP is authorised and regulated by the Financial Conduct Authority. Marshall Wace LLP is a limited liability partnership registered in England and Wales with registered number OC302228 and registered office at George House, 131 Sloane Street, London, SW1X 9AT. If you are receiving this e-mail as a client, or an investor in an investment vehicle, managed or advised by Marshall Wace North America L.P., the sender of this e-mail is communicating with you in the sender's capacity as an associated or related person of Marshall Wace North America L.P. ("MWNA"), which is registered with the US Securities and Exchange Commission ("SEC") as an investment adviser. Registration with the SEC does not imply that MWNA or its employees possess a certain level of skill or training.