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

[Bug]: Java SDK Sampling Data from PCollection at the Source is redundant, since the Source already has a perfect estimate of per element size. #28832

Open
1 of 16 tasks
priyansndesai opened this issue Oct 4, 2023 · 1 comment

Comments

@priyansndesai
Copy link
Contributor

priyansndesai commented Oct 4, 2023

What happened?

While working on a Dataflow Runner V2 bug, we discovered that there is some extra sampling done by the Java SDK.

Basically SDK side PCollection sampling is done on a per bundle basis, because we "technically" don't know if a given bundle is the only instance of this PCollection or not.

But that ignores that SDKs re-use execution plans and naively just reads the first element of a pcollection in a bundle.

This will lead to extra reads for pipelines with 1 key only, which is the hotkey.

Issue Priority

Priority: 3 (minor)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@lostluck lostluck changed the title [Bug]: Sampling Data from PCollection at the Source is redundant, since the Source already has a perfect estimate of per element size. [Bug]: Java SDK Sampling Data from PCollection at the Source is redundant, since the Source already has a perfect estimate of per element size. Oct 4, 2023
@liferoad
Copy link
Collaborator

liferoad commented Oct 4, 2023

cc: @Abacn

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