-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-27680][CORE][SQL][GRAPHX] Remove usage of Traversable #24584
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,15 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging with Seria | |
| } | ||
|
|
||
| /** Set multiple parameters together */ | ||
| def setAll(settings: Iterable[(String, String)]): SparkConf = { | ||
| settings.foreach { case (k, v) => set(k, v) } | ||
| this | ||
| } | ||
|
|
||
| /** | ||
| * Set multiple parameters together | ||
| */ | ||
| @deprecated("Use setAll(Iterable) instead", "3.0.0") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, is it even worth keeping and deprecating this and removing it later? It'll be source compatible already and binary compatibility isn't guaranteed; one would have to go out of one's way to call the deprecated method at all, with a cast or with some odd custom collection
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One reason I put this forth is that the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can see setAll() is being used though. but maybe it won't work even after a rebuild (bin compat)?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calls to |
||
| def setAll(settings: Traversable[(String, String)]): SparkConf = { | ||
| settings.foreach { case (k, v) => set(k, v) } | ||
| this | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,7 +183,7 @@ trait Block extends TreeNode[Block] with JavaCode { | |
| def doTransform(arg: Any): AnyRef = arg match { | ||
| case e: ExprValue => transform(e) | ||
| case Some(value) => Some(doTransform(value)) | ||
| case seq: Traversable[_] => seq.map(doTransform) | ||
| case seq: Iterable[_] => seq.map(doTransform) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only part of the change that is of concern. It's internal, but this now only matches |
||
| case other: AnyRef => other | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any caller is almost certainly passing an object that is
Iterableas well asTraversable, but this maintains binary compatibility for now.