-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[MINOR] Revert removing explicit typing (changed in some examples and StatFunctions) #12452
Conversation
cc @rxin |
Thanks! LGTM. |
Actually, shouldn't we maybe a bit wait for arriving at conclusion? I am leaning toward that this change ( I meant reverting this) is correct but feel like some think not although it is a tiny minor change. +As said here, I also agree to just merge this if you feel strongly this is correct. |
Test build #56046 has finished for PR 12452 at commit
|
@@ -116,7 +116,7 @@ object RecoverableNetworkWordCount { | |||
val lines = ssc.socketTextStream(ip, port) | |||
val words = lines.flatMap(_.split(" ")) | |||
val wordCounts = words.map((_, 1)).reduceByKey(_ + _) | |||
wordCounts.foreachRDD { (rdd, time) => | |||
wordCounts.foreachRDD { (rdd: RDD[(String, Int)], time: Time) => |
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.
FWIW I'm fine with putting this back, myself, but it's not consistent with all of the other examples -- streaming ones yes but not the non-streaming ones. Not a big deal. I think it's worth just getting this resolved.
retest this please |
Test build #56055 has finished for PR 12452 at commit
|
retest this please |
Test build #56060 has finished for PR 12452 at commit
|
retest this please |
test this please |
(The tests |
Test build #56076 has finished for PR 12452 at commit
|
Test build #2814 has finished for PR 12452 at commit
|
OK i'm just going to merge this. It's actually not that big of a deal, but I wanted to make a point about avoiding changing code for the sake of changing code. Thanks a lot for bearing with me @HyukjinKwon . |
… StatFunctions) ## What changes were proposed in this pull request? This PR reverts some changes in apache#12413. (please see the discussion in that PR). from ```scala words.foreachRDD { (rdd, time) => ... ``` to ```scala words.foreachRDD { (rdd: RDD[String], time: Time) => ... ``` Also, this was discussed in dev-mailing list, [here](http://apache-spark-developers-list.1001551.n3.nabble.com/Question-about-Scala-style-explicit-typing-within-transformation-functions-and-anonymous-val-td17173.html) ## How was this patch tested? This was tested with `sbt scalastyle`. Author: hyukjinkwon <gurwls223@gmail.com> Closes apache#12452 from HyukjinKwon/revert-explicit-typing.
What changes were proposed in this pull request?
This PR reverts some changes in #12413. (please see the discussion in that PR).
from
words.foreachRDD { (rdd, time) => ...
to
Also, this was discussed in dev-mailing list, here
How was this patch tested?
This was tested with
sbt scalastyle
.