Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample() stage #21

Open
ktoso opened this issue Jun 6, 2016 · 1 comment
Open

Sample() stage #21

ktoso opened this issue Jun 6, 2016 · 1 comment

Comments

@ktoso
Copy link
Member

ktoso commented Jun 6, 2016

An operation which "drops every n-th element", useful when for example you just want to log some progress every 1000 elements etc: broadcast to the logging stream then sample().log()

Another use case: I want to migrate my data from X to Y, the migration is resumable, writes are idempotent, I sometimes need to write my offset, every 100 writes or so. sample().map(e => store(e.offset) (also known as mini-spark)

@drewhk
Copy link
Member

drewhk commented Jun 7, 2016

Rather, take every n-th element, or take an element in every T period (both are useful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants