-
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-13583][CORE][STREAMING] Remove unused imports and add checkstyle rule #11438
Conversation
I'm OK with this. Can we enforce this in Scala too? Since we've bothered to fail the build if imports aren't in the right order I think it's reasonable to enforce removal of unused imports everywhere too. @dongjoon-hyun I think you could add that too if you feel so inclined. If you're busy I might add it to https://issues.apache.org/jira/browse/SPARK-13423 but I like your focused PR here. |
Jenkins, test this please |
Thank you, @srowen ! By the way, your SPARK-13423 looks great. |
Hi, @srowen . |
FYI because |
Oh, thank you for informing that, @zsxwing . By the way,
|
@srowen , for the scala code, should we take advantage of |
@dongjoon-hyun I mean |
Oh, I see. Then, this PR will not enforce automatically, just helps developers to check before pushing PR. Thank you, @zsxwing ! |
Hi, @srowen . |
Test build #52203 has finished for PR 11438 at commit
|
It seems that Jenkins fails due to irrelevant things like the following.
Other PRs' test fail with similar logs. Should we wait for a while and re-trigger to test? |
Rebased to trigger the Jenkins test. |
If you're willing, I think you're welcome to also remove unused Scala imports, even if you can't enforce it. IDEs can make this easy. Yes the test failure looks unrelated. |
Jenkins, retest this please |
Test build #52233 has finished for PR 11438 at commit
|
Thank you for the testing, @srowen . Unfortunately, it still fails. |
ok to test |
Thank you, @zsxwing ! |
Test build #52254 has finished for PR 11438 at commit
|
Hi, @srowen . |
I've compared the Jenkins logs. My PR hangs at the following test.
Other PR passing this test looks like the following.
Up to now, I cannot figure out how to make this PR pass the Jenkins. Could you give me some clue? |
Yeah I think it's worth biting the bullet and cleaning up imports in one big go for 2.0. |
Test build #52313 has finished for PR 11438 at commit
|
Test build #52310 has finished for PR 11438 at commit
|
Thank you. I see. I rebased to test one more time. |
Test build #52323 has finished for PR 11438 at commit
|
After SPARK-6990, `dev/lint-java` keeps Java code healthy and helps PR review by saving much time. This issue aims to enforce `UnusedImports` rule by adding a `UnusedImports` rule to `checkstyle.xml` and fixing all existing unused imports. ./build/sbt compile ./dev/lint-java
Test build #52333 has finished for PR 11438 at commit
|
Test build #52340 has finished for PR 11438 at commit
|
UnusedImports
Java checkstyle rule
It passes the test finally. I updated the title and description of this PR and JIRA.
Thanks to your advice and help, I can finish this PR. |
Merged to master |
Thank you for merging! |
…le rule ## What changes were proposed in this pull request? After SPARK-6990, `dev/lint-java` keeps Java code healthy and helps PR review by saving much time. This issue aims remove unused imports from Java/Scala code and add `UnusedImports` checkstyle rule to help developers. ## How was this patch tested? ``` ./dev/lint-java ./build/sbt compile ``` Author: Dongjoon Hyun <dongjoon@apache.org> Closes apache#11438 from dongjoon-hyun/SPARK-13583.
…rame decoder apache#12038 [EXT][SPARK-13583][CORE][STREAMING] Remove unused imports and add checkstyle rule apache#11438
What changes were proposed in this pull request?
After SPARK-6990,
dev/lint-java
keeps Java code healthy and helps PR review by saving much time.This issue aims remove unused imports from Java/Scala code and add
UnusedImports
checkstyle rule to help developers.How was this patch tested?