-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-21259] More rules for scalastyle #18471
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
8712f08
abf2994
d509834
ffbcbbb
3acc1d3
d1b4bbe
05084a9
fd5bde5
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 |
---|---|---|
|
@@ -68,7 +68,9 @@ class Accumulable[R, T] private ( | |
} | ||
|
||
private[spark] def this(initialValue: R, param: AccumulableParam[R, T], name: Option[String]) = { | ||
// scalastyle:off | ||
this(initialValue, param, name, false /* countFailedValues */) | ||
// scalastyle:on | ||
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 believe we could enable and disable via 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. Oh, nvm. I just read your commit log ... |
||
} | ||
|
||
def this(initialValue: R, param: AccumulableParam[R, T]) = this(initialValue, param, None) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,8 @@ private[spark] class BroadcastManager( | |
|
||
private val nextBroadcastId = new AtomicLong(0) | ||
|
||
def newBroadcast[T: ClassTag](value_ : T, isLocal: Boolean): Broadcast[T] = { | ||
broadcastFactory.newBroadcast[T](value_, isLocal, nextBroadcastId.getAndIncrement()) | ||
def newBroadcast[T: ClassTag](_value: T, isLocal: Boolean): Broadcast[T] = { | ||
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 am not sure of this naming change. I mean the change does not look particulaily better to me. I believe we have a open PR - databricks/scala-style-guide#52 which appearntly stays against some cases here. 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 think it's not about adding 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 am fine if we prefer a specific way. My only worry is we happen to fix it back again in the future but no one stays against because they don't know which way is preferred... 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. Maybe, this can be an example other contributors like me can refer in the future BTW. |
||
broadcastFactory.newBroadcast[T](_value, isLocal, nextBroadcastId.getAndIncrement()) | ||
} | ||
|
||
def unbroadcast(id: Long, removeFromDriver: Boolean, blocking: Boolean) { | ||
|
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.
nit:
countFailedValues = false
is better, this style is only useful for java