Skip to content

Conversation

@techaddict
Copy link
Contributor

@techaddict techaddict commented Jun 2, 2016

What changes were proposed in this pull request?

Fix Java Lint errors introduced by #13286 and #13280

  1. remove unused imports
  2. Add exception for Append and Complete in lint-java

How was this patch tested?

Existing tests

@SparkQA
Copy link

SparkQA commented Jun 2, 2016

Test build #59833 has finished for PR 13464 at commit 09486b1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@techaddict
Copy link
Contributor Author

cc: @tdas @srowen

@SparkQA
Copy link

SparkQA commented Jun 2, 2016

Test build #59843 has finished for PR 13464 at commit 2eb12af.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jun 2, 2016

Oh, shouldn't we just fix that method name? I don't see why it was named Append() CC @tdas?

<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<!-- Exclude Append and Complete were added in SPARK-15517 -->
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$|Append|Complete"/>
Copy link
Member

@dongjoon-hyun dongjoon-hyun Jun 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @techaddict .
When you need to exclude something from the rules, please use dev/checkstyle-suppressions.xml instead of changing the rules.

@andrewor14
Copy link
Contributor

This is not the right fix. Please close this PR.

@techaddict
Copy link
Contributor Author

techaddict commented Jun 3, 2016

@andrewor14 between making it lowercase(which was my first fix, 09486b1) or adding an
exception in check style suppression, please let me know what is the other way
here

On Friday 3 June 2016, andrewor14 [email protected] wrote:

This is not the right fix. Please close this PR.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#13464 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABUJw7L7gVmt9GNG6MKKT-pD2FaEWhxuks5qH0eygaJpZM4IsPqi
.

@techaddict techaddict closed this Jun 3, 2016
@andrewor14
Copy link
Contributor

I believe it is intended to be upper case to match scala; it's just that for java it must be a method so that's failing the style. @srowen is there anyway to turn off the lint checks for a part of the code like scalastyle:off?

@techaddict
Copy link
Contributor Author

@andrewor14 As @dongjoon-hyun has suggested simply added the file to dev/checkstyle-suppressions.xml should work

@srowen
Copy link
Member

srowen commented Jun 3, 2016

@andrewor14 ah OK if that was on purpose, this can just be suppressed.

@techaddict
Copy link
Contributor Author

created a updated PR with couple of more java lint fixes #13559

asfgit pushed a commit that referenced this pull request Jun 8, 2016
## What changes were proposed in this pull request?

revived #13464

Fix Java Lint errors introduced by #13286 and #13280
Before:
```
Using `mvn` from path: /Users/pichu/Project/spark/build/apache-maven-3.3.9/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Checkstyle checks failed at following occurrences:
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[340,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[341,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[342,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[343,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[41,28] (naming) MethodName: Method name 'Append' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[52,28] (naming) MethodName: Method name 'Complete' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[61,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.PrimitiveType.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[62,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.Type.
```

## How was this patch tested?
ran `dev/lint-java` locally

Author: Sandeep Singh <[email protected]>

Closes #13559 from techaddict/minor-3.
asfgit pushed a commit that referenced this pull request Jun 8, 2016
## What changes were proposed in this pull request?

revived #13464

Fix Java Lint errors introduced by #13286 and #13280
Before:
```
Using `mvn` from path: /Users/pichu/Project/spark/build/apache-maven-3.3.9/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Checkstyle checks failed at following occurrences:
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[340,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[341,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[342,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[343,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[41,28] (naming) MethodName: Method name 'Append' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[52,28] (naming) MethodName: Method name 'Complete' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[61,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.PrimitiveType.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[62,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.Type.
```

## How was this patch tested?
ran `dev/lint-java` locally

Author: Sandeep Singh <[email protected]>

Closes #13559 from techaddict/minor-3.

(cherry picked from commit f958c1c)
Signed-off-by: Sean Owen <[email protected]>
zjffdu pushed a commit to zjffdu/spark that referenced this pull request Jun 10, 2016


## What changes were proposed in this pull request?

revived apache#13464

Fix Java Lint errors introduced by apache#13286 and apache#13280
Before:
```
Using `mvn` from path: /Users/pichu/Project/spark/build/apache-maven-3.3.9/bin/mvn
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Checkstyle checks failed at following occurrences:
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[340,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[341,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[342,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/launcher/LauncherServer.java:[343,5] (whitespace) FileTabCharacter: Line contains a tab character.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[41,28] (naming) MethodName: Method name 'Append' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/streaming/OutputMode.java:[52,28] (naming) MethodName: Method name 'Complete' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9_]*$'.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[61,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.PrimitiveType.
[ERROR] src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java:[62,8] (imports) UnusedImports: Unused import - org.apache.parquet.schema.Type.
```

## How was this patch tested?
ran `dev/lint-java` locally

Author: Sandeep Singh <[email protected]>

Closes apache#13559 from techaddict/minor-3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants