-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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-4297 [BUILD] Build warning fixes omnibus #3157
Conversation
Test build #23054 has started for PR 3157 at commit
|
Test build #23054 has finished for PR 3157 at commit
|
Test FAILed. |
Test build #23055 has started for PR 3157 at commit
|
Test build #23055 has finished for PR 3157 at commit
|
Test PASSed. |
@@ -63,7 +62,7 @@ object StreamingKMeans { | |||
val trainingData = ssc.textFileStream(args(0)).map(Vectors.parse) | |||
val testData = ssc.textFileStream(args(1)).map(LabeledPoint.parse) | |||
|
|||
val model = new StreamingKMeans() |
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.
Why was this change needed?
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.
This was fixed in [https://github.com//pull/3568] by renaming the example. My apologies for not seeing this PR before submitting 3568!
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.
Got it, I will undo this bit, and rebase too for good measure.
The object and the MLlib class have the same name so one was shadowing the other. It was correct but generated a warning IIRC. This just disambiguates. |
Test build #23727 has started for PR 3157 at commit
|
Test build #23727 has finished for PR 3157 at commit
|
Test PASSed. |
Test build #24100 has started for PR 3157 at commit
|
Test build #24100 has finished for PR 3157 at commit
|
Test PASSed. |
@srowen With my settings, comparing warnings between master and this PR merged with master shows this PR eliminates 2 warnings (TaskResultGetter, ParquetTypes). The others don't appear (for my settings). Hopefully someone else can check too. |
@jkbradley No there should be many more. Here's what I see on master now: https://gist.github.com/srowen/ddf5e606ba9cb888999f Not all of these are addressed in the PR and some are spurious. But maybe the difference is that several of the warnings are from the build (i.e. antrun plugin), test code, and Java code? |
@srowen I hadn't checked the test build. With that, I think I've verified all the warning fixes/suppressions expected, except for JavaRowSuite (for which I don't see any warnings in master or your PR). Hopefully someone else can check, but FWIW, this LGTM |
Test build #24376 has started for PR 3157 at commit
|
@jkbradley I rebased just now. Hm, JavaRowSuite shows a warning in IntelliJ for an unchecked generic array creation, and I see this if I compile without the annotation:
I'm going to fix a few more new, easy warnings and push. Take a look in a minute. |
Test build #24377 has started for PR 3157 at commit
|
Test build #24376 has finished for PR 3157 at commit
|
Test PASSed. |
Test build #24377 has finished for PR 3157 at commit
|
Test PASSed. |
+1 on this kind of cleanup work. |
Sorry for the slow response; testing now, but it will take a bit longer to finish |
Test build #24642 has started for PR 3157 at commit
|
Sorry for the noise on this one. I couldn't figure out why the test was failing after a rebase, but I figured it out. I think that, in the process of fixing the warning, it actually fixed the test, and, reveals a small problem in the test. In https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/parquet/ParquetQuerySuite.scala#L487 it looks like it should really be
instead of
@liancheng does that make sense to you? I think this was the commit with the test: |
Test build #24642 has finished for PR 3157 at commit
|
Test FAILed. |
Hm, I can't see how the Hive test failure here is related to this PR. It doesn't occur for me locally and I can't see any relevant change that would cause a |
@srowen Sorry for the late reply, missed this thread. Yes, the On the other hand, |
Oh I see you fixed the type erasure issue, thanks :) I'm looking into the Hive test failures. |
The This behavior left both versions of datanucleus-core in the I've seen this error once several days before right after the most recent Jenkins upgrade. Not sure why this issue wasn't detected before. |
Just ran $ find . -name "datanucleus-*"
./lib_managed/jars/datanucleus-api-jdo-3.2.1.jar
./lib_managed/jars/datanucleus-api-jdo-3.2.6.jar
./lib_managed/jars/datanucleus-core-3.2.10.jar
./lib_managed/jars/datanucleus-core-3.2.2.jar
./lib_managed/jars/datanucleus-rdbms-3.2.1.jar
./lib_managed/jars/datanucleus-rdbms-3.2.9.jar |
@liancheng Ah, good catch. Yeah sounds like a separate issue. I think this PR is good to go then, if that was the only error. |
Opened #3756 to fix the datanucleus issue. |
This PR tries to fix the Hive tests failure encountered in PR #3157 by cleaning `lib_managed` before building assembly jar against Hive 0.13.1 in `dev/run-tests`. Otherwise two sets of datanucleus jars would be left in `lib_managed` and may mess up class paths while executing Hive test suites. Please refer to [this thread] [1] for details. A clean build would be even safer, but we only clean `lib_managed` here to save build time. This PR also takes the chance to clean up some minor typos and formatting issues in the comments. [1]: #3157 (comment) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/apache/spark/3756) <!-- Reviewable:end --> Author: Cheng Lian <lian@databricks.com> Closes #3756 from liancheng/clean-lib-managed and squashes the following commits: e2bd21d [Cheng Lian] Adds lib_managed to clean set c9f2f3e [Cheng Lian] Cleans lib_managed before compiling with Hive 0.13.1 (cherry picked from commit 395b771) Signed-off-by: Josh Rosen <joshrosen@databricks.com>
This PR tries to fix the Hive tests failure encountered in PR #3157 by cleaning `lib_managed` before building assembly jar against Hive 0.13.1 in `dev/run-tests`. Otherwise two sets of datanucleus jars would be left in `lib_managed` and may mess up class paths while executing Hive test suites. Please refer to [this thread] [1] for details. A clean build would be even safer, but we only clean `lib_managed` here to save build time. This PR also takes the chance to clean up some minor typos and formatting issues in the comments. [1]: #3157 (comment) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/apache/spark/3756) <!-- Reviewable:end --> Author: Cheng Lian <lian@databricks.com> Closes #3756 from liancheng/clean-lib-managed and squashes the following commits: e2bd21d [Cheng Lian] Adds lib_managed to clean set c9f2f3e [Cheng Lian] Cleans lib_managed before compiling with Hive 0.13.1
Jenkins, retest this please. |
Test build #24747 has started for PR 3157 at commit
|
Test build #24747 has finished for PR 3157 at commit
|
Test PASSed. |
Yay, the tests passed! @srowen it looks like I could merge this now, but are there any other updates / changes that you want to make? Also, should this be pulled into any branches other than |
@JoshRosen No, probably enough for now. I'll have another look at cleaning up warnings in a couple months. |
@@ -1012,7 +1012,7 @@ public void testPairToPairFlatMapWithChangingTypes() { // Maps pair -> pair | |||
} | |||
}); | |||
JavaTestUtils.attachTestOutputStream(flatMapped); | |||
List<List<Tuple2<String, Integer>>> result = JavaTestUtils.runStreams(ssc, 2, 2); | |||
List<List<Tuple2<Integer, String>>> result = JavaTestUtils.runStreams(ssc, 2, 2); |
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.
Wait, how did this even compile before if you were able to swap the type parameters to Tuple2
?
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.
The generic types are wrong, but the underlying objects are fine. JavaTestUtils.runStreams
returns a List<List<V>>
so happily binds the Tuple2
type to whatever the caller says. The reason the comparison compiled was that assertEquals(Object, Object)
accepts anything. The ultimate List.equals()
method doesn't care about types and compares values which are in fact correct and of the right type and equal.
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.
Ah, that makes sense.
This looks good to me. Since @liancheng and @jkbradley have done a pretty extensive pass through the changes, too, I'm going to merge this into |
There are a number of warnings generated in a normal, successful build right now. They're mostly Java unchecked cast warnings, which can be suppressed. But there's a grab bag of other Scala language warnings and so on that can all be easily fixed. The forthcoming PR fixes about 90% of the build warnings I see now.