diff options
author | Weiqing Yang <yangweiqing001@gmail.com> | 2016-08-24 10:12:44 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-08-24 10:12:44 +0100 |
commit | 673a80d2230602c9e6573a23e35fb0f6b832bfca (patch) | |
tree | d22c82e4ae0c57a4acc09cd9e772d22cbd729b08 /examples/src | |
parent | 52fa45d62a5a0bc832442f38f9e634c5d8e29e08 (diff) | |
download | spark-673a80d2230602c9e6573a23e35fb0f6b832bfca.tar.gz spark-673a80d2230602c9e6573a23e35fb0f6b832bfca.tar.bz2 spark-673a80d2230602c9e6573a23e35fb0f6b832bfca.zip |
[MINOR][BUILD] Fix Java CheckStyle Error
## What changes were proposed in this pull request?
As Spark 2.0.1 will be released soon (mentioned in the spark dev mailing list), besides the critical bugs, it's better to fix the code style errors before the release.
Before:
```
./dev/lint-java
Checkstyle checks failed at following occurrences:
[ERROR] src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java:[525] (sizes) LineLength: Line is longer than 100 characters (found 119).
[ERROR] src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java:[64] (sizes) LineLength: Line is longer than 100 characters (found 103).
```
After:
```
./dev/lint-java
Using `mvn` from path: /usr/local/bin/mvn
Checkstyle checks passed.
```
## How was this patch tested?
Manual.
Author: Weiqing Yang <yangweiqing001@gmail.com>
Closes #14768 from Sherry302/fixjavastyle.
Diffstat (limited to 'examples/src')
-rw-r--r-- | examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java b/examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java index c913ee0658..5f342e1ead 100644 --- a/examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java +++ b/examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java @@ -61,11 +61,12 @@ public final class JavaStructuredNetworkWordCount { .load(); // Split the lines into words - Dataset<String> words = lines.as(Encoders.STRING()).flatMap(new FlatMapFunction<String, String>() { - @Override - public Iterator<String> call(String x) { - return Arrays.asList(x.split(" ")).iterator(); - } + Dataset<String> words = lines.as(Encoders.STRING()) + .flatMap(new FlatMapFunction<String, String>() { + @Override + public Iterator<String> call(String x) { + return Arrays.asList(x.split(" ")).iterator(); + } }, Encoders.STRING()); // Generate running word count |