You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/04/05 23:19:21 UTC
[18/23] storm git commit: STORM-2453 Move non-connectors into the top
directory
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/pom.xml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/pom.xml b/external/flux/flux-examples/pom.xml
deleted file mode 100644
index ef56ebd..0000000
--- a/external/flux/flux-examples/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.storm</groupId>
- <artifactId>flux</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>flux-examples</artifactId>
- <packaging>jar</packaging>
-
- <name>flux-examples</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>flux-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>flux-wrappers</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>storm-hdfs</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-yarn-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>storm-hbase</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>servlet-api-2.5</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>storm-kafka</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>${storm.kafka.artifact.id}</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <configuration>
- <createDependencyReducedPom>true</createDependencyReducedPom>
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.sf</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.dsa</exclude>
- <exclude>META-INF/*.RSA</exclude>
- <exclude>META-INF/*.rsa</exclude>
- <exclude>META-INF/*.EC</exclude>
- <exclude>META-INF/*.ec</exclude>
- <exclude>META-INF/MSFTSIG.SF</exclude>
- <exclude>META-INF/MSFTSIG.RSA</exclude>
- </excludes>
- </filter>
- </filters>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.apache.storm.flux.Flux</mainClass>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/StatefulWordCounter.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/StatefulWordCounter.java b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/StatefulWordCounter.java
deleted file mode 100644
index 5534888..0000000
--- a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/StatefulWordCounter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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 org.apache.storm.state.KeyValueState;
-import org.apache.storm.task.OutputCollector;
-import org.apache.storm.task.TopologyContext;
-import org.apache.storm.topology.base.BaseStatefulBolt;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.tuple.Fields;
-import org.apache.storm.tuple.Tuple;
-import org.apache.storm.tuple.Values;
-
-import java.util.Map;
-
-public class StatefulWordCounter extends BaseStatefulBolt<KeyValueState<String, Long>> {
-
- private KeyValueState<String, Long> wordCounts;
- private OutputCollector collector;
-
- @SuppressWarnings("rawtypes")
- @Override
- public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
- this.collector = collector;
- }
-
- @Override
- public void initState(KeyValueState<String, Long> state) {
- wordCounts = state;
- }
-
- @Override
- public void execute(Tuple tuple) {
- String word = tuple.getString(0);
-
- Long count = wordCounts.get(word, 0L);
- count++;
- wordCounts.put(word, count);
-
- collector.emit(tuple, new Values(word, count));
- collector.ack(tuple);
- }
-
- @Override
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- declarer.declare(new Fields("word", "count"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/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
deleted file mode 100644
index 137e354..0000000
--- a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestPrintBolt.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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 org.apache.storm.topology.BasicOutputCollector;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.topology.base.BaseBasicBolt;
-import org.apache.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) {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestWindowBolt.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestWindowBolt.java b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestWindowBolt.java
deleted file mode 100644
index 8c904d9..0000000
--- a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/TestWindowBolt.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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 org.apache.storm.task.OutputCollector;
-import org.apache.storm.task.TopologyContext;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.topology.base.BaseWindowedBolt;
-import org.apache.storm.tuple.Fields;
-import org.apache.storm.tuple.Values;
-import org.apache.storm.windowing.TupleWindow;
-
-import java.util.Map;
-
-public class TestWindowBolt extends BaseWindowedBolt {
- private OutputCollector collector;
-
- @Override
- public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
- this.collector = collector;
- }
-
- @Override
- public void execute(TupleWindow inputWindow) {
- collector.emit(new Values(inputWindow.get().size()));
- }
-
- @Override
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- declarer.declare(new Fields("count"));
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCountClient.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCountClient.java b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCountClient.java
deleted file mode 100644
index eb4fb7a..0000000
--- a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCountClient.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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 org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HTable;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.util.Bytes;
-
-import java.io.FileInputStream;
-import java.util.Properties;
-
-/**
- * Connects to the 'WordCount' HBase table and prints counts for each word.
- *
- * Assumes you have run (or are running) the YAML topology definition in
- * <code>simple_hbase.yaml</code>
- *
- * You will also need to modify `src/main/resources/hbase-site.xml`
- * to point to your HBase instance, and then repackage with `mvn package`.
- * This is a known issue.
- *
- */
-public class WordCountClient {
-
- public static void main(String[] args) throws Exception {
- Configuration config = HBaseConfiguration.create();
- if(args.length == 1){
- Properties props = new Properties();
- props.load(new FileInputStream(args[0]));
- System.out.println("HBase configuration:");
- for(Object key : props.keySet()) {
- System.out.println(key + "=" + props.get(key));
- config.set((String)key, props.getProperty((String)key));
- }
- } else {
- System.out.println("Usage: WordCountClient <hbase_config.properties>");
- System.exit(1);
- }
-
- HTable table = new HTable(config, "WordCount");
- String[] words = new String[] {"nathan", "mike", "jackson", "golda", "bertels"};
-
- for (String word : words) {
- Get get = new Get(Bytes.toBytes(word));
- Result result = table.get(get);
-
- byte[] countBytes = result.getValue(Bytes.toBytes("cf"), Bytes.toBytes("count"));
- byte[] wordBytes = result.getValue(Bytes.toBytes("cf"), Bytes.toBytes("word"));
-
- String wordStr = Bytes.toString(wordBytes);
- long count = Bytes.toLong(countBytes);
- System.out.println("Word: '" + wordStr + "', Count: " + count);
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCounter.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCounter.java b/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCounter.java
deleted file mode 100644
index 7093105..0000000
--- a/external/flux/flux-examples/src/main/java/org/apache/storm/flux/examples/WordCounter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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 org.apache.storm.task.TopologyContext;
-import org.apache.storm.topology.BasicOutputCollector;
-import org.apache.storm.topology.IBasicBolt;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.topology.base.BaseBasicBolt;
-import org.apache.storm.tuple.Fields;
-import org.apache.storm.tuple.Tuple;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-import static org.apache.storm.utils.Utils.tuple;
-
-/**
- * This bolt is used by the HBase example. It simply emits the first field
- * found in the incoming tuple as "word", with a "count" of `1`.
- *
- * In this case, the downstream HBase bolt handles the counting, so a value
- * of `1` will just increment the HBase counter by one.
- */
-public class WordCounter extends BaseBasicBolt {
- private static final Logger LOG = LoggerFactory.getLogger(WordCounter.class);
-
-
-
- @SuppressWarnings("rawtypes")
- public void prepare(Map stormConf, TopologyContext context) {
- }
-
- /*
- * Just output the word value with a count of 1.
- * The HBaseBolt will handle incrementing the counter.
- */
- public void execute(Tuple input, BasicOutputCollector collector) {
- collector.emit(tuple(input.getValues().get(0), 1));
- }
-
- public void cleanup() {
-
- }
-
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- declarer.declare(new Fields("word", "count"));
- }
-
- @Override
- public Map<String, Object> getComponentConfiguration() {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/hbase_bolt.properties
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/hbase_bolt.properties b/external/flux/flux-examples/src/main/resources/hbase_bolt.properties
deleted file mode 100644
index f8ed50c..0000000
--- a/external/flux/flux-examples/src/main/resources/hbase_bolt.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-hbase.rootdir=hdfs://hadoop:54310/hbase
-hbase.zookeeper.quorum=hadoop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/hdfs_bolt.properties
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/hdfs_bolt.properties b/external/flux/flux-examples/src/main/resources/hdfs_bolt.properties
deleted file mode 100644
index 7bcbe7a..0000000
--- a/external/flux/flux-examples/src/main/resources/hdfs_bolt.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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.
-
-
-# The HDFS url
-hdfs.url=hdfs://hadoop:54310
-
-# The HDFS directory where the bolt will write incoming data
-hdfs.write.dir=/incoming
-
-# The HDFS directory where files will be moved once the bolt has
-# finished writing to it.
-hdfs.dest.dir=/complete
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/kafka_spout.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/kafka_spout.yaml b/external/flux/flux-examples/src/main/resources/kafka_spout.yaml
deleted file mode 100644
index 7533ce4..0000000
--- a/external/flux/flux-examples/src/main/resources/kafka_spout.yaml
+++ /dev/null
@@ -1,136 +0,0 @@
-# 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.
-
-
-# Test ability to wire together shell spouts/bolts
----
-
-# topology definition
-# name to be used when submitting
-name: "kafka-topology"
-
-# Components
-# Components are analagous to Spring beans. They are meant to be used as constructor,
-# property(setter), and builder arguments.
-#
-# for the time being, components must be declared in the order they are referenced
-components:
- - id: "stringScheme"
- className: "org.apache.storm.kafka.StringScheme"
-
- - id: "stringMultiScheme"
- className: "org.apache.storm.spout.SchemeAsMultiScheme"
- constructorArgs:
- - ref: "stringScheme"
-
- - id: "zkHosts"
- className: "org.apache.storm.kafka.ZkHosts"
- constructorArgs:
- - "localhost:2181"
-
-# Alternative kafka config
-# - id: "kafkaConfig"
-# className: "org.apache.storm.kafka.KafkaConfig"
-# constructorArgs:
-# # brokerHosts
-# - ref: "zkHosts"
-# # topic
-# - "myKafkaTopic"
-# # clientId (optional)
-# - "myKafkaClientId"
-
- - id: "spoutConfig"
- className: "org.apache.storm.kafka.SpoutConfig"
- constructorArgs:
- # brokerHosts
- - ref: "zkHosts"
- # topic
- - "myKafkaTopic"
- # zkRoot
- - "/kafkaSpout"
- # id
- - "myId"
- properties:
- - name: "ignoreZkOffsets"
- value: true
- - name: "scheme"
- ref: "stringMultiScheme"
-
-
-
-# NOTE: We may want to consider some level of spring integration. For example, allowing component references
-# to a spring `ApplicationContext`.
-
-# topology configuration
-# this will be passed to the submitter as a map of config options
-#
-config:
- topology.workers: 1
- # ...
-
-# spout definitions
-spouts:
- - id: "kafka-spout"
- className: "org.apache.storm.kafka.KafkaSpout"
- constructorArgs:
- - ref: "spoutConfig"
-
-# bolt definitions
-bolts:
- - id: "splitsentence"
- className: "org.apache.storm.flux.wrappers.bolts.FluxShellBolt"
- constructorArgs:
- # command line
- - ["python", "splitsentence.py"]
- # output fields
- - ["word"]
- parallelism: 1
- # ...
-
- - id: "log"
- className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
- parallelism: 1
- # ...
-
- - id: "count"
- className: "org.apache.storm.testing.TestWordCounter"
- parallelism: 1
- # ...
-
-#stream definitions
-# stream definitions define connections between spouts and bolts.
-# note that such connections can be cyclical
-# custom stream groupings are also supported
-
-streams:
- - name: "kafka --> split" # name isn't used (placeholder for logging, UI, etc.)
- from: "kafka-spout"
- to: "splitsentence"
- grouping:
- type: SHUFFLE
-
- - name: "split --> count"
- from: "splitsentence"
- to: "count"
- grouping:
- type: FIELDS
- args: ["word"]
-
- - name: "count --> log"
- from: "count"
- to: "log"
- grouping:
- type: SHUFFLE
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/multilang.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/multilang.yaml b/external/flux/flux-examples/src/main/resources/multilang.yaml
deleted file mode 100644
index aaab5d3..0000000
--- a/external/flux/flux-examples/src/main/resources/multilang.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-# 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.
-
-# Test ability to wire together shell spouts/bolts
----
-
-# topology definition
-# name to be used when submitting
-name: "shell-topology"
-
-# topology configuration
-# this will be passed to the submitter as a map of config options
-#
-config:
- topology.workers: 1
- # ...
-
-# spout definitions
-spouts:
- - id: "sentence-spout"
- className: "org.apache.storm.flux.wrappers.spouts.FluxShellSpout"
- # shell spout constructor takes 2 arguments: String[], String[]
- constructorArgs:
- # command line
- - ["node", "randomsentence.js"]
- # output fields
- - ["word"]
- parallelism: 1
- # ...
-
-# bolt definitions
-bolts:
- - id: "splitsentence"
- className: "org.apache.storm.flux.wrappers.bolts.FluxShellBolt"
- constructorArgs:
- # command line
- - ["python", "splitsentence.py"]
- # output fields
- - ["word"]
- parallelism: 1
- # ...
-
- - id: "log"
- className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
- parallelism: 1
- # ...
-
- - id: "count"
- className: "org.apache.storm.testing.TestWordCounter"
- parallelism: 1
- # ...
-
-#stream definitions
-# stream definitions define connections between spouts and bolts.
-# note that such connections can be cyclical
-# custom stream groupings are also supported
-
-streams:
- - name: "spout --> split" # name isn't used (placeholder for logging, UI, etc.)
- from: "sentence-spout"
- to: "splitsentence"
- grouping:
- type: SHUFFLE
-
- - name: "split --> count"
- from: "splitsentence"
- to: "count"
- grouping:
- type: FIELDS
- args: ["word"]
-
- - name: "count --> log"
- from: "count"
- to: "log"
- grouping:
- type: SHUFFLE
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/simple_hbase.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/simple_hbase.yaml b/external/flux/flux-examples/src/main/resources/simple_hbase.yaml
deleted file mode 100644
index 93a2781..0000000
--- a/external/flux/flux-examples/src/main/resources/simple_hbase.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-# 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.
----
-# NOTE: To use this example, you will need to modify `src/main/resources/hbase-site.xml`
-# to point to your HBase instance, and then repackage with `mvn package`.
-# This is a known issue.
-
-# topology definition
-# name to be used when submitting
-name: "hbase-persistent-wordcount"
-
-# Components
-components:
- - id: "columnFields"
- className: "org.apache.storm.tuple.Fields"
- constructorArgs:
- - ["word"]
-
- - id: "counterFields"
- className: "org.apache.storm.tuple.Fields"
- constructorArgs:
- - ["count"]
-
- - id: "mapper"
- className: "org.apache.storm.hbase.bolt.mapper.SimpleHBaseMapper"
- configMethods:
- - name: "withRowKeyField"
- args: ["word"]
- - name: "withColumnFields"
- args: [ref: "columnFields"]
- - name: "withCounterFields"
- args: [ref: "counterFields"]
- - name: "withColumnFamily"
- args: ["cf"]
-
-# topology configuration
-# this will be passed to the submitter as a map of config options
-config:
- topology.workers: 1
- hbase.conf:
- hbase.rootdir: "${hbase.rootdir}"
- hbase.zookeeper.quorum: "${hbase.zookeeper.quorum}"
-
-# spout definitions
-spouts:
- - id: "word-spout"
- className: "org.apache.storm.testing.TestWordSpout"
- parallelism: 1
-
-# bolt definitions
-
-bolts:
- - id: "count-bolt"
- className: "org.apache.storm.flux.examples.WordCounter"
- parallelism: 1
-
- - id: "hbase-bolt"
- className: "org.apache.storm.hbase.bolt.HBaseBolt"
- constructorArgs:
- - "WordCount" # HBase table name
- - ref: "mapper"
- configMethods:
- - name: "withConfigKey"
- args: ["hbase.conf"]
- parallelism: 1
-
-streams:
- - name: "" # name isn't used (placeholder for logging, UI, etc.)
- from: "word-spout"
- to: "count-bolt"
- grouping:
- type: SHUFFLE
-
- - name: "" # name isn't used (placeholder for logging, UI, etc.)
- from: "count-bolt"
- to: "hbase-bolt"
- grouping:
- type: FIELDS
- args: ["word"]
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/simple_hdfs.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/simple_hdfs.yaml b/external/flux/flux-examples/src/main/resources/simple_hdfs.yaml
deleted file mode 100644
index b8d4020..0000000
--- a/external/flux/flux-examples/src/main/resources/simple_hdfs.yaml
+++ /dev/null
@@ -1,105 +0,0 @@
-# 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.
-
-# Test ability to wire together shell spouts/bolts
----
-
-# topology definition
-# name to be used when submitting
-name: "hdfs-topology"
-
-# Components
-# Components are analagous to Spring beans. They are meant to be used as constructor,
-# property(setter), and builder arguments.
-#
-# for the time being, components must be declared in the order they are referenced
-components:
- - id: "syncPolicy"
- className: "org.apache.storm.hdfs.bolt.sync.CountSyncPolicy"
- constructorArgs:
- - 1000
- - id: "rotationPolicy"
- className: "org.apache.storm.hdfs.bolt.rotation.TimedRotationPolicy"
- constructorArgs:
- - 30
- - SECONDS
-
- - id: "fileNameFormat"
- className: "org.apache.storm.hdfs.bolt.format.DefaultFileNameFormat"
- configMethods:
- - name: "withPath"
- args: ["${hdfs.write.dir}"]
- - name: "withExtension"
- args: [".txt"]
-
- - id: "recordFormat"
- className: "org.apache.storm.hdfs.bolt.format.DelimitedRecordFormat"
- configMethods:
- - name: "withFieldDelimiter"
- args: ["|"]
-
- - id: "rotationAction"
- className: "org.apache.storm.hdfs.common.rotation.MoveFileAction"
- configMethods:
- - name: "toDestination"
- args: ["${hdfs.dest.dir}"]
-
-# spout definitions
-spouts:
- - id: "spout-1"
- className: "org.apache.storm.testing.TestWordSpout"
- parallelism: 1
- # ...
-
-# bolt definitions
-
-bolts:
- - id: "bolt-1"
- className: "org.apache.storm.hdfs.bolt.HdfsBolt"
- configMethods:
- - name: "withConfigKey"
- args: ["hdfs.config"]
- - name: "withFsUrl"
- args: ["${hdfs.url}"]
- - name: "withFileNameFormat"
- args: [ref: "fileNameFormat"]
- - name: "withRecordFormat"
- args: [ref: "recordFormat"]
- - name: "withRotationPolicy"
- args: [ref: "rotationPolicy"]
- - name: "withSyncPolicy"
- args: [ref: "syncPolicy"]
- - name: "addRotationAction"
- args: [ref: "rotationAction"]
- parallelism: 1
- # ...
-
- - id: "bolt-2"
- className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
- parallelism: 1
-
-streams:
- - name: "" # name isn't used (placeholder for logging, UI, etc.)
- from: "spout-1"
- to: "bolt-1"
- grouping:
- type: SHUFFLE
-
- - name: "" # name isn't used (placeholder for logging, UI, etc.)
- from: "spout-1"
- to: "bolt-2"
- grouping:
- type: SHUFFLE
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/simple_stateful_wordcount.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/simple_stateful_wordcount.yaml b/external/flux/flux-examples/src/main/resources/simple_stateful_wordcount.yaml
deleted file mode 100644
index 14b9b3a..0000000
--- a/external/flux/flux-examples/src/main/resources/simple_stateful_wordcount.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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.
-
----
-
-# topology definition
-# name to be used when submitting
-name: "stateful-wordcount-topology"
-
-# topology configuration
-# this will be passed to the submitter as a map of config options
-#
-config:
- topology.workers: 1
-
-# spout definitions
-spouts:
- - id: "spout-1"
- className: "org.apache.storm.testing.TestWordSpout"
- parallelism: 1
-
-# bolt definitions
-bolts:
- - id: "bolt-1"
- className: "org.apache.storm.flux.examples.StatefulWordCounter"
- parallelism: 1
-
- - id: "bolt-2"
- className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
- parallelism: 1
-
-#stream definitions
-# stream definitions define connections between spouts and bolts.
-# note that such connections can be cyclical
-streams:
- - name: "spout-1 --> bolt-1" # name isn't used (placeholder for logging, UI, etc.)
- from: "spout-1"
- to: "bolt-1"
- grouping:
- type: FIELDS
- args: ["word"]
-
- - name: "bolt-1 --> bolt2"
- from: "bolt-1"
- to: "bolt-2"
- grouping:
- type: SHUFFLE
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/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
deleted file mode 100755
index f2f74ff..0000000
--- a/external/flux/flux-examples/src/main/resources/simple_windowing.yaml
+++ /dev/null
@@ -1,69 +0,0 @@
-# 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.
-
----
-
-name: "sliding-window-topology"
-
-components:
- - id: "windowLength"
- className: "org.apache.storm.topology.base.BaseWindowedBolt$Count"
- constructorArgs:
- - 5
- - id: "slidingInterval"
- className: "org.apache.storm.topology.base.BaseWindowedBolt$Count"
- constructorArgs:
- - 3
-
-config:
- topology.workers: 1
-
-# spout definitions
-spouts:
- - id: "spout-1"
- className: "org.apache.storm.testing.TestWordSpout"
- parallelism: 1
-
-# bolt definitions
-bolts:
- - id: "bolt-1"
- className: "org.apache.storm.flux.examples.TestWindowBolt"
- configMethods:
- - name: "withWindow"
- args: [ref: "windowLength", ref: "slidingInterval"]
- parallelism: 1
- - id: "bolt-2"
- className: "org.apache.storm.flux.examples.TestPrintBolt"
- parallelism: 1
-
-
-#stream definitions
-# stream definitions define connections between spouts and bolts.
-# note that such connections can be cyclical
-streams:
- - name: "spout-1 --> bolt-1" # name isn't used (placeholder for logging, UI, etc.)
-# id: "connection-1"
- from: "spout-1"
- to: "bolt-1"
- grouping:
- type: FIELDS
- args: ["word"]
- - name: "bolt-1 --> bolt-2" # name isn't used (placeholder for logging, UI, etc.)
-# id: "connection-1"
- from: "bolt-1"
- to: "bolt-2"
- grouping:
- type: SHUFFLE
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-examples/src/main/resources/simple_wordcount.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-examples/src/main/resources/simple_wordcount.yaml b/external/flux/flux-examples/src/main/resources/simple_wordcount.yaml
deleted file mode 100644
index 6443a97..0000000
--- a/external/flux/flux-examples/src/main/resources/simple_wordcount.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-# 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.
-
----
-
-# topology definition
-# name to be used when submitting
-name: "yaml-topology"
-
-# topology configuration
-# this will be passed to the submitter as a map of config options
-#
-config:
- topology.workers: 1
-
-# spout definitions
-spouts:
- - id: "spout-1"
- className: "org.apache.storm.testing.TestWordSpout"
- parallelism: 1
-
-# bolt definitions
-bolts:
- - id: "bolt-1"
- className: "org.apache.storm.testing.TestWordCounter"
- parallelism: 1
-
- - id: "bolt-2"
- className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
- parallelism: 1
-
-#stream definitions
-# stream definitions define connections between spouts and bolts.
-# note that such connections can be cyclical
-streams:
- - name: "spout-1 --> bolt-1" # name isn't used (placeholder for logging, UI, etc.)
-# id: "connection-1"
- from: "spout-1"
- to: "bolt-1"
- grouping:
- type: FIELDS
- args: ["word"]
-
- - name: "bolt-1 --> bolt2"
- from: "bolt-1"
- to: "bolt-2"
- grouping:
- type: SHUFFLE
-
-
-
-
-
-
-
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-ui/README.md
----------------------------------------------------------------------
diff --git a/external/flux/flux-ui/README.md b/external/flux/flux-ui/README.md
deleted file mode 100644
index 8b6bd5f..0000000
--- a/external/flux/flux-ui/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Flux-UI
-
-Placeholder for Flux GUI
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/pom.xml
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/pom.xml b/external/flux/flux-wrappers/pom.xml
deleted file mode 100644
index 7d97a9f..0000000
--- a/external/flux/flux-wrappers/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.storm</groupId>
- <artifactId>flux</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>flux-wrappers</artifactId>
- <packaging>jar</packaging>
-
- <name>flux-wrappers</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>multilang-javascript</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>multilang-ruby</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>multilang-python</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/FluxShellBolt.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/FluxShellBolt.java b/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/FluxShellBolt.java
deleted file mode 100644
index 05b8e7a..0000000
--- a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/FluxShellBolt.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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.wrappers.bolts;
-
-import org.apache.storm.task.ShellBolt;
-import org.apache.storm.topology.IRichBolt;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.tuple.Fields;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A generic `ShellBolt` implementation that allows you specify output fields
- * and even streams without having to subclass `ShellBolt` to do so.
- *
- */
-public class FluxShellBolt extends ShellBolt implements IRichBolt{
- private Map<String, String[]> outputFields;
- private Map<String, Object> componentConfig;
-
- /**
- * Create a ShellBolt with command line arguments
- * @param command Command line arguments for the bolt
- */
- public FluxShellBolt(String[] command){
- super(command);
- this.outputFields = new HashMap<String, String[]>();
- }
-
- /**
- * Create a ShellBolt with command line arguments and output fields
- *
- * Keep this constructor for backward compatibility.
- *
- * @param command Command line arguments for the bolt
- * @param outputFields Names of fields the bolt will emit (if any).
- */
- public FluxShellBolt(String[] command, String[] outputFields){
- this(command);
- this.setDefaultStream(outputFields);
- }
-
- /**
- * Add configuration for this bolt. This method is called from YAML file:
- *
- * ```
- * className: "org.apache.storm.flux.wrappers.bolts.FluxShellBolt"
- * constructorArgs:
- * # command line
- * - ["python", "splitsentence.py"]
- * # output fields
- * - ["word"]
- * configMethods:
- * - name: "addComponentConfig"
- * args: ["publisher.data_paths", "actions"]
- * ```
- *
- * @param key
- * @param value
- */
- public void addComponentConfig(String key, Object value) {
- if (this.componentConfig == null) {
- this.componentConfig = new HashMap<String, Object>();
- }
- this.componentConfig.put(key, value);
- }
-
- /**
- * Add configuration for this bolt. This method is called from YAML file:
- *
- * ```
- * className: "org.apache.storm.flux.wrappers.bolts.FluxShellBolt"
- * constructorArgs:
- * # command line
- * - ["python", "splitsentence.py"]
- * # output fields
- * - ["word"]
- * configMethods:
- * - name: "addComponentConfig"
- * args:
- * - "publisher.data_paths"
- * - ["actions"]
- * ```
- *
- * @param key
- * @param values
- */
- public void addComponentConfig(String key, List<Object> values) {
- if (this.componentConfig == null) {
- this.componentConfig = new HashMap<String, Object>();
- }
- this.componentConfig.put(key, values);
- }
-
- /**
- * Set default stream outputFields, this method is called from YAML file:
- *
- * ```
- * bolts:
- * - className: org.apache.storm.flux.wrappers.bolts.FluxShellBolt
- * id: my_bolt
- * constructorArgs:
- * - [python, my_bolt.py]
- * configMethods:
- * - name: setDefaultStream
- * args:
- * - [word, count]
- * ```
- *
- * @param outputFields Names of fields the bolt will emit (if any) in default stream.
- */
- public void setDefaultStream(String[] outputFields) {
- this.setNamedStream("default", outputFields);
- }
-
- /**
- * Set custom *named* stream outputFields, this method is called from YAML file:
- *
- * ```
- * bolts:
- * - className: org.apache.storm.flux.wrappers.bolts.FluxShellBolt
- * id: my_bolt
- * constructorArgs:
- * - [python, my_bolt.py]
- * configMethods:
- * - name: setNamedStream
- * args:
- * - first
- * - [word, count]
- * ```
- * @param name Name of stream the bolt will emit into.
- * @param outputFields Names of fields the bolt will emit in custom *named* stream.
- */
- public void setNamedStream(String name, String[] outputFields) {
- this.outputFields.put(name, outputFields);
- }
-
- @Override
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- Iterator it = this.outputFields.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry entryTuple = (Map.Entry)it.next();
- String key = (String)entryTuple.getKey();
- String[] value = (String[])entryTuple.getValue();
- if(key.equals("default")) {
- declarer.declare(new Fields(value));
- } else {
- declarer.declareStream(key, new Fields(value));
- }
- }
- }
-
- @Override
- public Map<String, Object> getComponentConfiguration() {
- return this.componentConfig;
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java b/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
deleted file mode 100644
index 5f0e84b..0000000
--- a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/bolts/LogInfoBolt.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.wrappers.bolts;
-
-import org.apache.storm.topology.BasicOutputCollector;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.topology.base.BaseBasicBolt;
-import org.apache.storm.tuple.Tuple;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Simple bolt that does nothing other than LOG.info() every tuple recieveed.
- *
- */
-public class LogInfoBolt extends BaseBasicBolt {
- private static final Logger LOG = LoggerFactory.getLogger(LogInfoBolt.class);
-
- @Override
- public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) {
- LOG.info("{}", tuple);
- }
-
- @Override
- public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/spouts/FluxShellSpout.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/spouts/FluxShellSpout.java b/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/spouts/FluxShellSpout.java
deleted file mode 100644
index 5fd378d..0000000
--- a/external/flux/flux-wrappers/src/main/java/org/apache/storm/flux/wrappers/spouts/FluxShellSpout.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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.wrappers.spouts;
-
-import org.apache.storm.spout.ShellSpout;
-import org.apache.storm.topology.IRichSpout;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.tuple.Fields;
-
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * A generic `ShellSpout` implementation that allows you specify output fields
- * and even streams without having to subclass `ShellSpout` to do so.
- *
- */
-public class FluxShellSpout extends ShellSpout implements IRichSpout {
- private Map<String, String[]> outputFields;
- private Map<String, Object> componentConfig;
-
- /**
- * Create a ShellSpout with command line arguments
- * @param command Command line arguments for the bolt
- */
- public FluxShellSpout(String[] command){
- super(command);
- this.outputFields = new HashMap<String, String[]>();
- }
-
- /**
- * Create a ShellSpout with command line arguments and output fields
- *
- * Keep this constructor for backward compatibility.
- *
- * @param args Command line arguments for the spout
- * @param outputFields Names of fields the spout will emit.
- */
- public FluxShellSpout(String[] args, String[] outputFields){
- this(args);
- this.setDefaultStream(outputFields);
- }
-
- /**
- * Add configuration for this spout. This method is called from YAML file:
- *
- * ```
- * className: "org.apache.storm.flux.wrappers.bolts.FluxShellSpout"
- * constructorArgs:
- * # command line
- * - ["python", "splitsentence.py"]
- * # output fields
- * - ["word"]
- * configMethods:
- * - name: "addComponentConfig"
- * args: ["publisher.data_paths", "actions"]
- * ```
- *
- * @param key
- * @param value
- */
- public void addComponentConfig(String key, Object value) {
- if (this.componentConfig == null) {
- this.componentConfig = new HashMap<String, Object>();
- }
- this.componentConfig.put(key, value);
- }
-
- /**
- * Add configuration for this spout. This method is called from YAML file:
- *
- * ```
- * className: "org.apache.storm.flux.wrappers.bolts.FluxShellSpout"
- * constructorArgs:
- * # command line
- * - ["python", "splitsentence.py"]
- * # output fields
- * - ["word"]
- * configMethods:
- * - name: "addComponentConfig"
- * args:
- * - "publisher.data_paths"
- * - ["actions"]
- * ```
- *
- * @param key
- * @param values
- */
- public void addComponentConfig(String key, List<Object> values) {
- if (this.componentConfig == null) {
- this.componentConfig = new HashMap<String, Object>();
- }
- this.componentConfig.put(key, values);
- }
-
- /**
- * Set default stream outputFields, this method is called from YAML file:
- *
- * ```
- * spouts:
- * - className: org.apache.storm.flux.wrappers.bolts.FluxShellSpout
- * id: my_spout
- * constructorArgs:
- * - [python, my_spout.py]
- * configMethods:
- * - name: setDefaultStream
- * args:
- * - [word, count]
- * ```
- *
- * @param outputFields Names of fields the spout will emit (if any) in default stream.
- */
- public void setDefaultStream(String[] outputFields) {
- this.setNamedStream("default", outputFields);
- }
-
- /**
- * Set custom *named* stream outputFields, this method is called from YAML file:
- *
- * ```
- * spouts:
- * - className: org.apache.storm.flux.wrappers.bolts.FluxShellSpout
- * id: my_spout
- * constructorArgs:
- * - [python, my_spout.py]
- * configMethods:
- * - name: setNamedStream
- * args:
- * - first
- * - [word, count]
- * ```
- * @param name Name of stream the spout will emit into.
- * @param outputFields Names of fields the spout will emit in custom *named* stream.
- */
- public void setNamedStream(String name, String[] outputFields) {
- this.outputFields.put(name, outputFields);
- }
-
- @Override
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- Iterator it = this.outputFields.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry entryTuple = (Map.Entry)it.next();
- String key = (String)entryTuple.getKey();
- String[] value = (String[])entryTuple.getValue();
- if(key.equals("default")) {
- declarer.declare(new Fields(value));
- } else {
- declarer.declareStream(key, new Fields(value));
- }
- }
- }
-
- @Override
- public Map<String, Object> getComponentConfiguration() {
- return this.componentConfig;
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/src/main/resources/resources/randomsentence.js
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/src/main/resources/resources/randomsentence.js b/external/flux/flux-wrappers/src/main/resources/resources/randomsentence.js
deleted file mode 100644
index b121915..0000000
--- a/external/flux/flux-wrappers/src/main/resources/resources/randomsentence.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * Example for storm spout. Emits random sentences.
- * The original class in java - org.apache.storm.starter.spout.RandomSentenceSpout.
- *
- */
-
-var storm = require('./storm');
-var Spout = storm.Spout;
-
-
-var SENTENCES = [
- "the cow jumped over the moon",
- "an apple a day keeps the doctor away",
- "four score and seven years ago",
- "snow white and the seven dwarfs",
- "i am at two with nature"]
-
-function RandomSentenceSpout(sentences) {
- Spout.call(this);
- this.runningTupleId = 0;
- this.sentences = sentences;
- this.pending = {};
-};
-
-RandomSentenceSpout.prototype = Object.create(Spout.prototype);
-RandomSentenceSpout.prototype.constructor = RandomSentenceSpout;
-
-RandomSentenceSpout.prototype.getRandomSentence = function() {
- return this.sentences[getRandomInt(0, this.sentences.length - 1)];
-}
-
-RandomSentenceSpout.prototype.nextTuple = function(done) {
- var self = this;
- var sentence = this.getRandomSentence();
- var tup = [sentence];
- var id = this.createNextTupleId();
- this.pending[id] = tup;
- //This timeout can be removed if TOPOLOGY_SLEEP_SPOUT_WAIT_STRATEGY_TIME_MS is configured to 100
- setTimeout(function() {
- self.emit({tuple: tup, id: id}, function(taskIds) {
- self.log(tup + ' sent to task ids - ' + taskIds);
- });
- done();
- },100);
-}
-
-RandomSentenceSpout.prototype.createNextTupleId = function() {
- var id = this.runningTupleId;
- this.runningTupleId++;
- return id;
-}
-
-RandomSentenceSpout.prototype.ack = function(id, done) {
- this.log('Received ack for - ' + id);
- delete this.pending[id];
- done();
-}
-
-RandomSentenceSpout.prototype.fail = function(id, done) {
- var self = this;
- this.log('Received fail for - ' + id + '. Retrying.');
- this.emit({tuple: this.pending[id], id:id}, function(taskIds) {
- self.log(self.pending[id] + ' sent to task ids - ' + taskIds);
- });
- done();
-}
-
-/**
- * Returns a random integer between min (inclusive) and max (inclusive)
- */
-function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
-}
-
-new RandomSentenceSpout(SENTENCES).run();
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/flux-wrappers/src/main/resources/resources/splitsentence.py
----------------------------------------------------------------------
diff --git a/external/flux/flux-wrappers/src/main/resources/resources/splitsentence.py b/external/flux/flux-wrappers/src/main/resources/resources/splitsentence.py
deleted file mode 100644
index 300105f..0000000
--- a/external/flux/flux-wrappers/src/main/resources/resources/splitsentence.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-import storm
-
-class SplitSentenceBolt(storm.BasicBolt):
- def process(self, tup):
- words = tup.values[0].split(" ")
- for word in words:
- storm.emit([word])
-
-SplitSentenceBolt().run()
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/flux/pom.xml
----------------------------------------------------------------------
diff --git a/external/flux/pom.xml b/external/flux/pom.xml
deleted file mode 100644
index b51a505..0000000
--- a/external/flux/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>flux</artifactId>
- <packaging>pom</packaging>
- <name>flux</name>
-
-
- <parent>
- <artifactId>storm</artifactId>
- <groupId>org.apache.storm</groupId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <developers>
- <developer>
- <id>ptgoetz</id>
- <name>P. Taylor Goetz</name>
- <email>ptgoetz@apache.org</email>
- </developer>
- </developers>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <!-- see comment below... This fixes an annoyance with intellij -->
- <provided.scope>provided</provided.scope>
- </properties>
-
- <profiles>
- <!--
- Hack to make intellij behave.
- If you use intellij, enable this profile in your IDE.
- It should make life easier.
- -->
- <profile>
- <id>intellij</id>
- <properties>
- <provided.scope>compile</provided.scope>
- </properties>
- </profile>
- </profiles>
-
- <modules>
- <module>flux-wrappers</module>
- <module>flux-core</module>
- <module>flux-examples</module>
- </modules>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.storm</groupId>
- <artifactId>storm-core</artifactId>
- <version>${project.version}</version>
- <scope>${provided.scope}</scope>
- </dependency>
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>${storm.kafka.artifact.id}</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/sql/README.md
----------------------------------------------------------------------
diff --git a/external/sql/README.md b/external/sql/README.md
deleted file mode 100644
index a4b44fb..0000000
--- a/external/sql/README.md
+++ /dev/null
@@ -1,207 +0,0 @@
-# Storm SQL
-
-Compile SQL queries to Storm topologies.
-
-## Usage
-
-Run the ``storm sql`` command to compile SQL statements into Trident topology, and submit it to the Storm cluster
-
-```
-$ bin/storm sql <sql-file> <topo-name>
-```
-
-In which `sql-file` contains a list of SQL statements to be executed, and `topo-name` is the name of the topology.
-
-StormSQL activates `explain mode` and shows query plan instead of submitting topology when user specifies `topo-name` as `--explain`.
-Detailed explanation is available from `Showing Query Plan (explain mode)` section.
-
-## Supported Features
-
-The following features are supported in the current repository:
-
-* Streaming from and to external data sources
-* Filtering tuples
-* Projections
-* Aggregations (Grouping)
-* User defined function (scalar and aggregate)
-* Join (Inner, Left outer, Right outer, Full outer)
-
-## Specifying External Data Sources
-
-In StormSQL data is represented by external tables. Users can specify data sources using the `CREATE EXTERNAL TABLE`
-statement. For example, the following statement specifies a Kafka spouts and sink:
-
-```
-CREATE EXTERNAL TABLE FOO (ID INT PRIMARY KEY) LOCATION 'kafka://localhost:2181/brokers?topic=test' TBLPROPERTIES '{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"org.apache.storm.kafka.IntSerializer","value.serializer":"org.apache.storm.kafka.ByteBufferSerializer"}}'
-```
-
-The syntax of `CREATE EXTERNAL TABLE` closely follows the one defined in
-[Hive Data Definition Language](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL).
-
-`PARALLELISM` is StormSQL's own keyword which describes parallelism hint for input data source. This is same as providing parallelism hint to Trident Spout.
-Downstream operators are executed with same parallelism before repartition (Aggregation triggers repartition).
-
-Default value is 1, and this option is no effect on output data source. (We might change if needed. Normally repartition is the thing to avoid.)
-
-## Plugging in External Data Sources
-
-Users plug in external data sources through implementing the `ISqlTridentDataSource` interface and registers them using
-the mechanisms of Java's service loader. The external data source will be chosen based on the scheme of the URI of the
-tables. Please refer to the implementation of `storm-sql-kafka` for more details.
-
-## Specifying User Defined Function (UDF)
-
-Users can define user defined function (scalar or aggregate) using `CREATE FUNCTION` statement.
-For example, the following statement defines `MYPLUS` function which uses `org.apache.storm.sql.TestUtils$MyPlus` class.
-
-```
-CREATE FUNCTION MYPLUS AS 'org.apache.storm.sql.TestUtils$MyPlus'
-```
-
-Storm SQL determines whether the function as scalar or aggregate by checking which methods are defined.
-If the class defines `evaluate` method, Storm SQL treats the function as `scalar`,
-and if the class defines `add` method, Storm SQL treats the function as `aggregate`.
-
-Example of class for scalar function is here:
-
-```
- public class MyPlus {
- public static Integer evaluate(Integer x, Integer y) {
- return x + y;
- }
- }
-
-```
-
-and class for aggregate function is here:
-
-```
- public class MyConcat {
- public static String init() {
- return "";
- }
- public static String add(String accumulator, String val) {
- return accumulator + val;
- }
- public static String result(String accumulator) {
- return accumulator;
- }
- }
-```
-
-If users don't define `result` method, result is the last return value of `add` method.
-Users need to define `result` method only when we need to transform accumulated value.
-
-## Example: Filtering Kafka Stream
-
-Let's say there is a Kafka stream that represents the transactions of orders. Each message in the stream contains the id
-of the order, the unit price of the product and the quantity of the orders. The goal is to filter orders where the
-transactions are significant and to insert these orders into another Kafka stream for further analysis.
-
-The user can specify the following SQL statements in the SQL file:
-
-```
-CREATE EXTERNAL TABLE ORDERS (ID INT PRIMARY KEY, UNIT_PRICE INT, QUANTITY INT) LOCATION 'kafka://localhost:2181/brokers?topic=orders' TBLPROPERTIES '{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"org.apache.storm.kafka.IntSerializer","value.serializer":"org.apache.storm.kafka.ByteBufferSerializer"}}'
-
-CREATE EXTERNAL TABLE LARGE_ORDERS (ID INT PRIMARY KEY, TOTAL INT) LOCATION 'kafka://localhost:2181/brokers?topic=large_orders' TBLPROPERTIES '{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"org.apache.storm.kafka.IntSerializer","value.serializer":"org.apache.storm.kafka.ByteBufferSerializer"}}'
-
-INSERT INTO LARGE_ORDERS SELECT ID, UNIT_PRICE * QUANTITY AS TOTAL FROM ORDERS WHERE UNIT_PRICE * QUANTITY > 50
-```
-
-The first statement defines the table `ORDER` which represents the input stream. The `LOCATION` clause specifies the
-ZkHost (`localhost:2181`), the path of the brokers in ZooKeeper (`/brokers`) and the topic (`orders`).
-The `TBLPROPERTIES` clause specifies the configuration of
-[KafkaProducer](http://kafka.apache.org/documentation.html#newproducerconfigs).
-Current implementation of `storm-sql-kafka` requires specifying both `LOCATION` and `TBLPROPERTIES` clauses even though
-the table is read-only or write-only.
-
-Similarly, the second statement specifies the table `LARGE_ORDERS` which represents the output stream. The third
-statement is a `SELECT` statement which defines the topology: it instructs StormSQL to filter all orders in the external
-table `ORDERS`, calculates the total price and inserts matching records into the Kafka stream specified by
-`LARGE_ORDER`.
-
-To run this example, users need to include the data sources (`storm-sql-kafka` in this case) and its dependency in the
-class path. Dependencies for Storm SQL are automatically handled when users run `storm sql`. Users can include data sources at the submission step like below:
-
-```
-$ bin/storm sql order_filtering.sql order_filtering --artifacts "org.apache.storm:storm-sql-kafka:2.0.0-SNAPSHOT,org.apache.storm:storm-kafka:2.0.0-SNAPSHOT,org.apache.kafka:kafka_2.10:0.8.2.2\!org.slf4j:slf4j-log4j12,org.apache.kafka:kafka-clients:0.8.2.2"
-```
-
-Above command submits the SQL statements to StormSQL. Users need to modify each artifacts' version if users are using different version of Storm or Kafka.
-
-By now you should be able to see the `order_filtering` topology in the Storm UI.
-
-## Showing Query Plan (explain mode)
-
-Like `explain` on SQL statement, StormSQL provides `explain mode` when running Storm SQL Runner. In explain mode, StormSQL analyzes each query statement (only DML) and show plan instead of submitting topology.
-
-In order to run `explain mode`, you need to provide topology name as `--explain` and run `storm sql` as same as submitting.
-
-For example, when you run the example seen above with explain mode:
-
-```
-$ bin/storm sql order_filtering.sql --explain --artifacts "org.apache.storm:storm-sql-kafka:2.0.0-SNAPSHOT,org.apache.storm:storm-kafka:2.0.0-SNAPSHOT,org.apache.kafka:kafka_2.10:0.8.2.2\!org.slf4j:slf4j-log4j12,org.apache.kafka:kafka-clients:0.8.2.2"
-```
-
-StormSQL prints out like below:
-
-```
-
-===========================================================
-query>
-CREATE EXTERNAL TABLE ORDERS (ID INT PRIMARY KEY, UNIT_PRICE INT, QUANTITY INT) LOCATION 'kafka://localhost:2181/brokers?topic=orders' TBLPROPERTIES '{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"org.apache.storm.kafka.IntSerializer","value.serializer":"org.apache.storm.kafka.ByteBufferSerializer"}}'
------------------------------------------------------------
-16:53:43.951 [main] INFO o.a.s.s.r.DataSourcesRegistry - Registering scheme kafka with org.apache.storm.sql.kafka.KafkaDataSourcesProvider@4d1bf319
-No plan presented on DDL
-===========================================================
-===========================================================
-query>
-CREATE EXTERNAL TABLE LARGE_ORDERS (ID INT PRIMARY KEY, TOTAL INT) LOCATION 'kafka://localhost:2181/brokers?topic=large_orders' TBLPROPERTIES '{"producer":{"bootstrap.servers":"localhost:9092","acks":"1","key.serializer":"org.apache.storm.kafka.IntSerializer","value.serializer":"org.apache.storm.kafka.ByteBufferSerializer"}}'
------------------------------------------------------------
-No plan presented on DDL
-===========================================================
-===========================================================
-query>
-INSERT INTO LARGE_ORDERS SELECT ID, UNIT_PRICE * QUANTITY AS TOTAL FROM ORDERS WHERE UNIT_PRICE * QUANTITY > 50
------------------------------------------------------------
-plan>
-LogicalTableModify(table=[[LARGE_ORDERS]], operation=[INSERT], updateColumnList=[[]], flattened=[true]), id = 8
- LogicalProject(ID=[$0], TOTAL=[*($1, $2)]), id = 7
- LogicalFilter(condition=[>(*($1, $2), 50)]), id = 6
- EnumerableTableScan(table=[[ORDERS]]), id = 5
-
-===========================================================
-
-```
-
-## Current Limitations
-
-- Windowing is yet to be implemented.
-- Only equi-join (single field equality) is supported for joining table.
-- Joining table only applies within each small batch that comes off of the spout.
- - Not across batches.
- - Limitation came from `join` feature of Trident.
- - Please refer this doc: `Trident API Overview` for details.
-
-## License
-
-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.
-
-## Committer Sponsors
- * Sriharsha Chintalapani ([sriharsha@apache.org](mailto:sriharsha@apache.org))
- * P. Taylor Goetz ([ptgoetz@apache.org](mailto:ptgoetz@apache.org))
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/storm/blob/e9d78338/external/sql/pom.xml
----------------------------------------------------------------------
diff --git a/external/sql/pom.xml b/external/sql/pom.xml
deleted file mode 100644
index 02264f7..0000000
--- a/external/sql/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>storm</artifactId>
- <groupId>org.apache.storm</groupId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>sql</artifactId>
- <packaging>pom</packaging>
-
- <developers>
- <developer>
- <id>haohui</id>
- <name>Haohui Mai</name>
- <email>ricetons@gmail.com</email>
- </developer>
- </developers>
-
- <modules>
- <module>storm-sql-core</module>
- <module>storm-sql-runtime</module>
- <module>storm-sql-external/storm-sql-kafka</module>
- <module>storm-sql-external/storm-sql-redis</module>
- <module>storm-sql-external/storm-sql-mongodb</module>
- <module>storm-sql-external/storm-sql-hdfs</module>
- </modules>
-</project>