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

Support setting numShards > 1 in SMB transforms #5151

Open
clairemcginty opened this issue Jan 10, 2024 · 0 comments
Open

Support setting numShards > 1 in SMB transforms #5151

clairemcginty opened this issue Jan 10, 2024 · 0 comments
Labels
enhancement New feature or request SMB

Comments

@clairemcginty
Copy link
Contributor

Number of output buckets in SMB transform can be configured using TargetParallelism:

sc.sortMergeTransform(
      classOf[String],
      read,
      TargetParallelism.of(1024) // Writes 1024 output buckets
    )
   .to(...)
   .via(...)

But in the case of skewed data, there's currently no way to set number of output shards--it's always hardcoded to 1.

We'd have to do some thinking on how to implement this -- since all shards would be written from the same worker core, we'd have to implement a round-robin type algorithm to assign shards, and maintain numShards open file handles while writing.

@clairemcginty clairemcginty added enhancement New feature or request SMB labels Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SMB
Projects
None yet
Development

No branches or pull requests

1 participant