-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-9613] [CORE] Ban use of JavaConversions and migrate all existing uses to JavaConverters #8033
Conversation
Test build #40172 has finished for PR 8033 at commit
|
Test build #40291 has finished for PR 8033 at commit
|
Test build #40311 has finished for PR 8033 at commit
|
The point is to get rid of |
Nice one, since that's what I've been doing. Yes it's clear that this will end up creating some more verbose code, but one where the conversions are visible. I personally agree that's worth it. What do you think so far? I'm about 1/3 through so want to check whether it feels about right before going all the way through it. There are certainly a few places where the code can just be simplified; that's about 10% of the changes I seem to be making. |
Test build #40332 has finished for PR 8033 at commit
|
4d2de40
to
08ff887
Compare
Test build #40456 has finished for PR 8033 at commit
|
@@ -38,7 +38,7 @@ object LogisticRegressionSuite { | |||
scale: Double, | |||
nPoints: Int, | |||
seed: Int): java.util.List[LabeledPoint] = { | |||
seqAsJavaList(generateLogisticInput(offset, scale, nPoints, seed)) | |||
seqAsJavaListConverter(generateLogisticInput(offset, scale, nPoints, seed)).asJava |
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.
Do we need seqAsJavaListConverter
? asJava
should returns a Java List
when the input is a Scala Seq
.
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.
Oh! I seem to have overlooked this entirely, that the point of JavaConverters
is that the "xAsY" functions are still implicit. Well this will clean this up a lot. Thanks for pointing that out before I got too far. It won't be hard to touch this up in the changes so far.
Test build #40518 has finished for PR 8033 at commit
|
03b747b
to
7c92505
Compare
Test build #40618 has finished for PR 8033 at commit
|
Test build #40617 has finished for PR 8033 at commit
|
e1268c9
to
b57657c
Compare
Test build #40781 has finished for PR 8033 at commit
|
Test build #40863 has finished for PR 8033 at commit
|
Test build #41013 has finished for PR 8033 at commit
|
@zhzhan could I get your eyes on this change? My change is causing The failure is that the
|
@srowen It seems that the mapping got messed up, which I don't have clue yet and didn't find any obvious reason why the patch can break the test. I will dig more and let you know if I have any new findings. |
@zhzhan if you have a moment to look I'd be grateful. I am a little stuck. I suspect these lines at the moment: https://github.com/apache/spark/pull/8033/files#diff-287b5c238371c028d6c21fb5c2ebe4bcR205 |
@srowen Probably you can revert back the change in sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala |
Test build #41141 timed out for PR 8033 at commit |
Test build #1650 has finished for PR 8033 at commit
|
Test build #41222 has finished for PR 8033 at commit
|
Test build #1668 has finished for PR 8033 at commit
|
Test build #41256 has finished for PR 8033 at commit
|
Test build #41258 has finished for PR 8033 at commit
|
Test build #41317 timed out for PR 8033 at commit |
Test build #1674 has finished for PR 8033 at commit
|
Test build #41324 has finished for PR 8033 at commit
|
Test build #41364 timed out for PR 8033 at commit |
Test build #1679 has finished for PR 8033 at commit
|
@JoshRosen wanted to call your attention to this PR since it's ready for a look. It is complete and passes tests -- usually. It needs constant rebasing though, so wanted to get it reviewed in a passing state that just needs a minor rebase. |
Test build #41409 has finished for PR 8033 at commit
|
Test build #1684 timed out for PR 8033 at commit |
Test build #1687 has finished for PR 8033 at commit
|
I think this PR is clearly passing, and as I understand several people are in favor of the general idea. I think I've implemented it correctly. I am going to merge for master / 1.6 the next time it passes since it frequently needs rebasing, and is evidently passing in general already. |
Test build #41528 timed out for PR 8033 at commit |
I'm going to merge this on the grounds that it has passed in its current form (modulo rebases) several times now; the last test run showed all Java/Scala/Python 2.6 tests succeed (and merely timed out at the end with Python 3.4.) It will only go into |
…ng uses to JavaConverters Replace `JavaConversions` implicits with `JavaConverters` Most occurrences I've seen so far are necessary conversions; a few have been avoidable. None are in critical code as far as I see, yet. Author: Sean Owen <[email protected]> Closes #8033 from srowen/SPARK-9613.
Replace
JavaConversions
implicits withJavaConverters
Most occurrences I've seen so far are necessary conversions; a few have been avoidable. None are in critical code as far as I see, yet.