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

Rename DataSet.withBroadcastSet(DataSet, String) method #655

Closed
uce opened this issue Apr 2, 2014 · 6 comments
Closed

Rename DataSet.withBroadcastSet(DataSet, String) method #655

uce opened this issue Apr 2, 2014 · 6 comments

Comments

@uce
Copy link
Contributor

uce commented Apr 2, 2014

To broadcast a data set you have to do the following:

lorem.map(new MyMapper()).withBroadcastSet(toBroadcast, "toBroadcastName")

In the operator you call:

getRuntimeContext().getBroadcastVariable("toBroadcastName")

I propose to have both method names consistent, e.g.

  • withBroadcastVariable(DataSet, String), or
  • getBroadcastSet(String).
@fhueske
Copy link
Contributor

fhueske commented Apr 2, 2014

👍
I vote for BroadcastSet.

@StephanEwen
Copy link
Contributor

Here is something I was thinking about for the future:

It is a very common case that the broadcast set/variable is just a single scalar value. It would be nice to support that elegantly as well. We could therefore have:

  • getBroadcastSet(String) to get a collection of elements
  • getBroadcastVariable(String) to get a scalar value

@twalthr
Copy link
Contributor

twalthr commented Apr 8, 2014

+1
I also had the case at the Telekom, where only a scalar value sum/average needed to be broadcasted.

@uce
Copy link
Contributor Author

uce commented Apr 8, 2014

I agree. But I would propose value instead of variable, i.e. getBroadcastValue(String), which seems more natural to me (you also said "to get a scalar value" and not "scalar variable").

@fhueske
Copy link
Contributor

fhueske commented Apr 8, 2014

👍 for broadcastSet and broadcastValue

@aalexandrov
Copy link
Contributor

👍 for broadcastSet and broadcastScalar

@uce uce closed this as completed Mar 29, 2020
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

5 participants