You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/12/01 19:09:25 UTC

[41/50] [abbrv] storm git commit: Address review comments

Address review comments

1. Removed reference to storm starter
2. Updated README


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/aa1e1ed8
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/aa1e1ed8
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/aa1e1ed8

Branch: refs/heads/STORM-1040
Commit: aa1e1ed8df065dea361d86995b31be3674f8eebe
Parents: 69b9cf5
Author: Arun Mahadevan <ai...@hortonworks.com>
Authored: Thu Nov 26 10:55:18 2015 +0530
Committer: Arun Mahadevan <ai...@hortonworks.com>
Committed: Thu Nov 26 11:08:43 2015 +0530

----------------------------------------------------------------------
 external/flux/flux-examples/README.md           |  9 +++++
 .../storm/flux/examples/TestPrintBolt.java      | 39 ++++++++++++++++++++
 .../src/main/resources/simple_windowing.yaml    |  2 +-
 3 files changed, 49 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/aa1e1ed8/external/flux/flux-examples/README.md
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/README.md b/external/flux/flux-examples/README.md
index 0a7085e..a6afec2 100644
--- a/external/flux/flux-examples/README.md
+++ b/external/flux/flux-examples/README.md
@@ -64,3 +64,12 @@ To run the `simple_hbase.yaml` example, copy the `hbase_bolt.properties` file to
 ```bash
 storm jar ./target/flux-examples-*.jar org.apache.storm.flux.Flux --local ./src/main/resources/simple_hbase.yaml --filter my_hbase_bolt.properties
 ```
+### [simple_windowing.yaml](src/main/resources/simple_windowing.yaml)
+
+This example illustrates how to use Flux to set up a storm topology that contains windowing operations.
+
+To run,
+
+```bash
+storm jar ./target/flux-examples-*.jar org.apache.storm.flux.Flux --local ./src/main/resources/simple_windowing.yaml
+```

http://git-wip-us.apache.org/repos/asf/storm/blob/aa1e1ed8/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestPrintBolt.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestPrintBolt.java b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestPrintBolt.java
new file mode 100644
index 0000000..7e84441
--- /dev/null
+++ b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestPrintBolt.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.storm.flux.examples;
+
+import backtype.storm.topology.BasicOutputCollector;
+import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.topology.base.BaseBasicBolt;
+import backtype.storm.tuple.Tuple;
+
+/**
+ * Prints the tuples to stdout
+ */
+public class TestPrintBolt extends BaseBasicBolt {
+
+    @Override
+    public void execute(Tuple tuple, BasicOutputCollector collector) {
+        System.out.println(tuple);
+    }
+
+    @Override
+    public void declareOutputFields(OutputFieldsDeclarer ofd) {
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/aa1e1ed8/external/flux/flux-examples/src/main/resources/simple_windowing.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/simple_windowing.yaml b/external/flux/flux-examples/src/main/resources/simple_windowing.yaml
index a005a4a..31be109 100755
--- a/external/flux/flux-examples/src/main/resources/simple_windowing.yaml
+++ b/external/flux/flux-examples/src/main/resources/simple_windowing.yaml
@@ -46,7 +46,7 @@ bolts:
         args: [ref: "windowLength", ref: "slidingInterval"]
     parallelism: 1
   - id: "bolt-2"
-    className: "storm.starter.bolt.PrinterBolt"
+    className: "org.apache.storm.flux.examples.TestPrintBolt"
     parallelism: 1