Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14868][BUILD] Enable NewLineAtEofChecker in checkstyle and fix lint-java errors - #12632
[SPARK-14868][BUILD] Enable NewLineAtEofChecker in checkstyle and fix lint-java errors#12632dongjoon-hyun wants to merge 3 commits into
Conversation
SparkQA
commented
Apr 23, 2016
Test build #56783 has finished for PR 12632 at commit
|
There was a problem hiding this comment.
Oh, it's definitely final. It's just RedundantModifier error since the class SignedPrefixComparator is already final.
dongjoon-hyun
commented
Apr 24, 2016
Hi, @rxin . Thank you for review. FYI, here is the result of spark:master$ dev/lint-java Using `mvn` from path: /usr/local/bin/mvn
Checkstyle checks failed at following occurrences:
[ERROR] src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java:[259] (sizes) LineLength: Line is longer than 100 characters (found 103).
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[25,8] (imports) UnusedImports: Unused import - org.apache.spark.util.Utils.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[72,17] (modifier) ModifierOrder: 'abstract' modifier out of order with the JLS suggestions.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[85,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[86,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[88,12] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[94,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[95,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[97,12] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[103,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[104,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[106,12] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[112,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[113,22] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java:[115,12] (modifier) RedundantModifier: Redundant 'final' modifier.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java:[19] (regexp) RegexpSingleline: No trailing whitespace allowed.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java:[230] (regexp) RegexpSingleline: No trailing whitespace allowed.
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java:[215] (sizes) LineLength: Line is longer than 100 characters (found 103).
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[41,8] (imports) UnusedImports: Unused import - org.apache.hadoop.fs.FileSystem.
[ERROR] src/test/java/org/apache/spark/ml/classification/JavaRandomForestClassifierSuite.java:[84,26] (misc) ArrayTypeStyle: Array brackets at illegal position.
[ERROR] src/test/java/org/apache/spark/ml/classification/JavaRandomForestClassifierSuite.java:[88,29] (misc) ArrayTypeStyle: Array brackets at illegal position.
[ERROR] src/test/java/org/apache/spark/ml/classification/JavaRandomForestClassifierSuite.java:[92,29] (misc) ArrayTypeStyle: Array brackets at illegal position.
[ERROR] src/test/java/org/apache/spark/ml/regression/JavaRandomForestRegressorSuite.java:[84,26] (misc) ArrayTypeStyle: Array brackets at illegal position.
[ERROR] src/test/java/org/apache/spark/ml/regression/JavaRandomForestRegressorSuite.java:[88,29] (misc) ArrayTypeStyle: Array brackets at illegal position.
[ERROR] src/test/java/org/apache/spark/ml/regression/JavaRandomForestRegressorSuite.java:[92,29] (misc) ArrayTypeStyle: Array brackets at illegal position. |
rxin
commented
Apr 24, 2016
Can we turn lint-java on for Jenkins in this pr? |
dongjoon-hyun
commented
Apr 24, 2016
Sure! It's just one line change. May I turn it one right now? |
SparkQA
commented
Apr 24, 2016
Test build #56837 has finished for PR 12632 at commit
|
dongjoon-hyun
commented
Apr 24, 2016
Interesting. @rxin . Jenkins is trying to use Maven 3.1.1 due to the mismatch between Actually, my PR #12631 aims to handle that bug. Could you review that too? |
dongjoon-hyun
commented
Apr 24, 2016
I reverted the last commit about Jenkins Java Linter. |
SparkQA
commented
Apr 24, 2016
Test build #56838 has finished for PR 12632 at commit
|
dongjoon-hyun
commented
Apr 24, 2016
It seems irrelevant errors. I'll rebase this to trigger again. |
SparkQA
commented
Apr 24, 2016
Test build #56856 has finished for PR 12632 at commit
|
dongjoon-hyun
commented
Apr 24, 2016
Since the failed tests are disabled at 0c8e533, I rebased again. |
SparkQA
commented
Apr 25, 2016
Test build #56864 has finished for PR 12632 at commit
|
dongjoon-hyun
commented
Apr 25, 2016
Hi, @rxin . |
rxin
commented
Apr 25, 2016
Merging in master. |
dongjoon-hyun
commented
Apr 25, 2016
Thank you, @rxin . |
What changes were proposed in this pull request?
Spark uses
NewLineAtEofCheckerrule in Scala by ScalaStyle. And, most Java code also comply with the rule. This PR aims to enforce the same ruleNewlineAtEndOfFileby CheckStyle explicitly. Also, this fixes lint-java errors since SPARK-14465. The followings are the items.How was this patch tested?
After the Jenkins test succeeds,
dev/lint-javashould pass. (Currently, Jenkins dose not run lint-java.)$ dev/lint-java Using `mvn` from path: /usr/local/bin/mvn Checkstyle checks passed.