This is an automated email from the ASF dual-hosted git repository. srdo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push: new 1672d45 STORM-3463: examples-pmml: fix all checkstyle warnings new 237b0da Merge pull request #3081 from krichter722/checkstyle-pmml-examples 1672d45 is described below commit 1672d4553b928a02b4d397c19b16ca672c07c723 Author: Karl-Philipp Richter <krich...@posteo.de> AuthorDate: Sat Jul 6 18:23:15 2019 +0200 STORM-3463: examples-pmml: fix all checkstyle warnings --- examples/storm-pmml-examples/pom.xml | 2 +- .../org/apache/storm/pmml/JpmmlRunnerTestTopology.java | 10 +++++----- .../org/apache/storm/pmml/RawInputFromCSVSpout.java | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/examples/storm-pmml-examples/pom.xml b/examples/storm-pmml-examples/pom.xml index 174fef4..b687ac1 100644 --- a/examples/storm-pmml-examples/pom.xml +++ b/examples/storm-pmml-examples/pom.xml @@ -87,7 +87,7 @@ <artifactId>maven-checkstyle-plugin</artifactId> <!--Note - the version would be inherited--> <configuration> - <maxAllowedViolations>17</maxAllowedViolations> + <maxAllowedViolations>0</maxAllowedViolations> </configuration> </plugin> <plugin> diff --git a/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/JpmmlRunnerTestTopology.java b/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/JpmmlRunnerTestTopology.java index c330f98..95c8160 100644 --- a/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/JpmmlRunnerTestTopology.java +++ b/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/JpmmlRunnerTestTopology.java @@ -18,6 +18,8 @@ package org.apache.storm.pmml; +import com.google.common.collect.Lists; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -40,13 +42,11 @@ import org.apache.storm.topology.base.BaseBasicBolt; import org.apache.storm.tuple.Tuple; import org.apache.storm.utils.Utils; -import com.google.common.collect.Lists; - /** * Topology that loads a PMML Model and raw input data from a CSV file. The {@link RawInputFromCSVSpout} * creates a stream of tuples with raw inputs, and the {@link PMMLPredictorBolt} computes the predicted scores. * - * The location of the PMML Model and CSV files can be specified as CLI argument. Alternatively, the PMML Model can also + * <p>The location of the PMML Model and CSV files can be specified as CLI argument. Alternatively, the PMML Model can also * be uploaded to the Blobstore and used in the topology specifying the blobKey. If no arguments are given, * it loads the default example as described in the README file */ @@ -79,8 +79,8 @@ public class JpmmlRunnerTestTopology { private void parseArgs(String[] args) { if (Arrays.stream(args).anyMatch(option -> option.equals("-h"))) { printUsage(); - } else if (Arrays.stream(args).anyMatch(option -> option.equals("-f")) && - Arrays.stream(args).anyMatch(option -> option.equals("-b"))) { + } else if (Arrays.stream(args).anyMatch(option -> option.equals("-f")) + && Arrays.stream(args).anyMatch(option -> option.equals("-b"))) { System.out.println("Please specify only one option of [-b, -f]"); printUsage(); } else { diff --git a/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/RawInputFromCSVSpout.java b/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/RawInputFromCSVSpout.java index 444837b..b5e7636 100644 --- a/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/RawInputFromCSVSpout.java +++ b/examples/storm-pmml-examples/src/main/java/org/apache/storm/pmml/RawInputFromCSVSpout.java @@ -18,14 +18,6 @@ package org.apache.storm.pmml; -import org.apache.storm.spout.SpoutOutputCollector; -import org.apache.storm.task.TopologyContext; -import org.apache.storm.topology.OutputFieldsDeclarer; -import org.apache.storm.topology.base.BaseRichSpout; -import org.apache.storm.tuple.Fields; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -37,6 +29,16 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.apache.storm.spout.SpoutOutputCollector; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseRichSpout; +import org.apache.storm.tuple.Fields; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings("checkstyle:AbbreviationAsWordInName") public class RawInputFromCSVSpout extends BaseRichSpout { private static final Logger LOG = LoggerFactory.getLogger(RawInputFromCSVSpout.class);