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 f446246 STORM-3460: examples-opentsdb: fix all checkstyle warnings new f5ddeb2 Merge pull request #3078 from krichter722/checkstyle-opentsdb-examples f446246 is described below commit f44624685ca5c12963c2939ca58eb0db10fbeb24 Author: Karl-Philipp Richter <krich...@posteo.de> AuthorDate: Sat Jul 6 17:59:31 2019 +0200 STORM-3460: examples-opentsdb: fix all checkstyle warnings --- examples/storm-opentsdb-examples/pom.xml | 2 +- .../org/apache/storm/opentsdb/MetricGenBatchSpout.java | 14 ++++++++------ .../java/org/apache/storm/opentsdb/MetricGenSpout.java | 10 ++++++---- .../apache/storm/opentsdb/SampleOpenTsdbBoltTopology.java | 3 ++- .../storm/opentsdb/SampleOpenTsdbTridentTopology.java | 3 ++- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/examples/storm-opentsdb-examples/pom.xml b/examples/storm-opentsdb-examples/pom.xml index fba4737..90e9d76 100644 --- a/examples/storm-opentsdb-examples/pom.xml +++ b/examples/storm-opentsdb-examples/pom.xml @@ -87,7 +87,7 @@ <artifactId>maven-checkstyle-plugin</artifactId> <!--Note - the version would be inherited--> <configuration> - <maxAllowedViolations>18</maxAllowedViolations> + <maxAllowedViolations>0</maxAllowedViolations> </configuration> </plugin> <plugin> diff --git a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenBatchSpout.java b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenBatchSpout.java index 4e57d9a..85b2fb2 100644 --- a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenBatchSpout.java +++ b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenBatchSpout.java @@ -16,14 +16,10 @@ * specific language governing permissions and limitations * under the License. */ + package org.apache.storm.opentsdb; import com.google.common.collect.Lists; -import org.apache.storm.Config; -import org.apache.storm.task.TopologyContext; -import org.apache.storm.trident.operation.TridentCollector; -import org.apache.storm.trident.spout.IBatchSpout; -import org.apache.storm.tuple.Fields; import java.util.ArrayList; import java.util.Collections; @@ -32,6 +28,12 @@ import java.util.List; import java.util.Map; import java.util.Random; +import org.apache.storm.Config; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.trident.operation.TridentCollector; +import org.apache.storm.trident.spout.IBatchSpout; +import org.apache.storm.tuple.Fields; + /** * BatchSpout implementation for metrics generation. */ @@ -52,7 +54,7 @@ public class MetricGenBatchSpout implements IBatchSpout { @Override public void emitBatch(long batchId, TridentCollector collector) { List<List<Object>> values; - if(batches.containsKey(batchId)) { + if (batches.containsKey(batchId)) { values = batches.get(batchId); } else { values = new ArrayList<>(); diff --git a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenSpout.java b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenSpout.java index 09904ee..b963261 100644 --- a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenSpout.java +++ b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/MetricGenSpout.java @@ -16,9 +16,15 @@ * specific language governing permissions and limitations * under the License. */ + package org.apache.storm.opentsdb; import com.google.common.collect.Lists; + +import java.util.Collections; +import java.util.Map; +import java.util.Random; + import org.apache.storm.opentsdb.bolt.TupleOpenTsdbDatapointMapper; import org.apache.storm.spout.SpoutOutputCollector; import org.apache.storm.task.TopologyContext; @@ -26,10 +32,6 @@ import org.apache.storm.topology.OutputFieldsDeclarer; import org.apache.storm.topology.base.BaseRichSpout; import org.apache.storm.tuple.Fields; -import java.util.Collections; -import java.util.Map; -import java.util.Random; - /** * Spout to generate tuples containing metric data. */ diff --git a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbBoltTopology.java b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbBoltTopology.java index 009366f..23a086c 100644 --- a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbBoltTopology.java +++ b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbBoltTopology.java @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.apache.storm.opentsdb; import java.util.Collections; @@ -33,7 +34,7 @@ import org.apache.storm.topology.TopologyBuilder; public class SampleOpenTsdbBoltTopology { public static void main(String[] args) throws Exception { - if(args.length == 0) { + if (args.length == 0) { throw new IllegalArgumentException("There should be at least one argument. Run as `SampleOpenTsdbBoltTopology <tsdb-url>`"); } diff --git a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbTridentTopology.java b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbTridentTopology.java index 8ac950b..1b1a2cf 100644 --- a/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbTridentTopology.java +++ b/examples/storm-opentsdb-examples/src/main/java/org/apache/storm/opentsdb/SampleOpenTsdbTridentTopology.java @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + package org.apache.storm.opentsdb; import java.util.Collections; @@ -40,7 +41,7 @@ public class SampleOpenTsdbTridentTopology { private static final Logger LOG = LoggerFactory.getLogger(SampleOpenTsdbTridentTopology.class); public static void main(String[] args) throws Exception { - if(args.length == 0) { + if (args.length == 0) { throw new IllegalArgumentException("There should be at least one argument. Run as `SampleOpenTsdbTridentTopology <tsdb-url>`"); }