Skip to content

Commit

Permalink
Merge 5765f2d into db919a5
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyuzhong committed Aug 31, 2016
2 parents db919a5 + 5765f2d commit 9b6769b
Show file tree
Hide file tree
Showing 87 changed files with 569 additions and 584 deletions.
56 changes: 30 additions & 26 deletions flink-contrib/flink-storm-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ under the License.
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-starter</artifactId>
<version>0.9.4</version>
<version>1.0.0</version>

<!-- remove storm dependency - it should be drawn only (with proper
customization) via the 'flink-storm' dependency -->
Expand Down Expand Up @@ -138,7 +138,7 @@ under the License.
<artifactItem>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>0.9.4</version>
<version>1.0.0</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
Expand Down Expand Up @@ -197,15 +197,16 @@ under the License.

<includes>
<!-- from storm-core -->
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<include>org/apache/storm/topology/*.class</include>
<include>org/apache/storm/spout/*.class</include>
<include>org/apache/storm/task/*.class</include>
<include>org/apache/storm/tuple/*.class</include>
<include>org/apache/storm/generated/*.class</include>
<include>org/apache/storm/metric/**/*.class</include>
<include>org/apache/storm/thrift/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<include>org/apache/storm/shade/**/*.class</include>
<!-- compatibility layer -->
<include>org/apache/flink/storm/api/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
Expand Down Expand Up @@ -243,15 +244,16 @@ under the License.

<includes>
<!-- from storm-core -->
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<include>org/apache/storm/topology/*.class</include>
<include>org/apache/storm/spout/*.class</include>
<include>org/apache/storm/task/*.class</include>
<include>org/apache/storm/tuple/*.class</include>
<include>org/apache/storm/generated/*.class</include>
<include>org/apache/storm/metric/**/*.class</include>
<include>org/apache/storm/thrift/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<include>org/apache/storm/shade/**/*.class</include>
<!-- compatibility layer -->
<include>org/apache/flink/storm/api/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
Expand Down Expand Up @@ -322,20 +324,22 @@ under the License.
<artifact>org.apache.storm:storm-core</artifact>
<includes>
<include>defaults.yaml</include>
<include>backtype/storm/*.class</include>
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>backtype/storm/utils/*.class</include>
<include>backtype/storm/serialization/*.class</include>
<include>org/apache/storm/*.class</include>
<include>org/apache/storm/topology/*.class</include>
<include>org/apache/storm/spout/*.class</include>
<include>org/apache/storm/task/*.class</include>
<include>org/apache/storm/tuple/*.class</include>
<include>org/apache/storm/generated/*.class</include>
<include>org/apache/storm/metric/**/*.class</include>
<include>org/apache/storm/utils/*.class</include>
<include>org/apache/storm/serialization/*.class</include>
<include>org/apache/storm/curator/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<include>org/apache/storm/grouping/**/*.class</include>
<include>org/apache/storm/thrift/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<include>org/yaml/snakeyaml/**/*.class</include>
<include>org/apache/storm/shade/**/*.class</include>
</includes>
</filter>
<filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

package org.apache.flink.storm.exclamation;

import backtype.storm.Config;
import backtype.storm.topology.TopologyBuilder;
import org.apache.storm.Config;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.flink.storm.api.FlinkLocalCluster;
import org.apache.flink.storm.api.FlinkTopology;
import org.apache.flink.storm.exclamation.operators.ExclamationBolt;

/**
* Implements the "Exclamation" program that attaches five exclamation mark to every line of a text files in a streaming
* fashion. The program is constructed as a regular {@link backtype.storm.generated.StormTopology} and submitted to
* Flink for execution in the same way as to a Storm {@link backtype.storm.LocalCluster}.
* fashion. The program is constructed as a regular {@link org.apache.storm.generated.StormTopology} and submitted to
* Flink for execution in the same way as to a Storm {@link org.apache.storm.LocalCluster}.
* <p>
* This example shows how to run program directly within Java, thus it cannot be used to submit a
* {@link backtype.storm.generated.StormTopology} via Flink command line clients (ie, bin/flink).
* {@link org.apache.storm.generated.StormTopology} via Flink command line clients (ie, bin/flink).
* <p>
* The input is a plain text file with lines separated by newline characters.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.flink.storm.exclamation;

import backtype.storm.topology.TopologyBuilder;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.flink.examples.java.wordcount.util.WordCountData;
import org.apache.flink.storm.exclamation.operators.ExclamationBolt;
import org.apache.flink.storm.util.BoltFileSink;
Expand All @@ -29,7 +29,7 @@

/**
* Implements the "Exclamation" program that attaches two exclamation marks to every line of a text files in a streaming
* fashion. The program is constructed as a regular {@link backtype.storm.generated.StormTopology}.
* fashion. The program is constructed as a regular {@link org.apache.storm.generated.StormTopology}.
* <p>
* The input is a plain text file with lines separated by newline characters.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.apache.flink.storm.exclamation;

import backtype.storm.utils.Utils;
import org.apache.storm.utils.Utils;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.typeutils.TypeExtractor;
import org.apache.flink.examples.java.wordcount.util.WordCountData;
Expand All @@ -30,7 +30,7 @@

/**
* Implements the "Exclamation" program that attaches 3+x exclamation marks to every line of a text files in a streaming
* fashion. The program is constructed as a regular {@link backtype.storm.generated.StormTopology}.
* fashion. The program is constructed as a regular {@link org.apache.storm.generated.StormTopology}.
* <p>
* The input is a plain text file with lines separated by newline characters.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.apache.flink.storm.exclamation;

import backtype.storm.utils.Utils;
import org.apache.storm.utils.Utils;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.typeutils.TypeExtractor;
import org.apache.flink.examples.java.wordcount.util.WordCountData;
Expand All @@ -31,7 +31,7 @@

/**
* Implements the "Exclamation" program that attaches six exclamation marks to every line of a text files in a streaming
* fashion. The program is constructed as a regular {@link backtype.storm.generated.StormTopology}.
* fashion. The program is constructed as a regular {@link org.apache.storm.generated.StormTopology}.
* <p>
* The input is a plain text file with lines separated by newline characters.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

package org.apache.flink.storm.exclamation.operators;

import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichBolt;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.IRichBolt;
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
*/
package org.apache.flink.storm.join;

import backtype.storm.Config;
import backtype.storm.testing.FeederSpout;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;
import org.apache.storm.Config;
import org.apache.storm.testing.FeederSpout;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Values;

import org.apache.flink.storm.api.FlinkLocalCluster;
import org.apache.flink.storm.api.FlinkTopology;
import org.apache.flink.storm.util.BoltFileSink;
import org.apache.flink.storm.util.NullTerminatingSpout;
import org.apache.flink.storm.util.TupleOutputFormatter;

import storm.starter.bolt.PrinterBolt;
import storm.starter.bolt.SingleJoinBolt;
import org.apache.storm.starter.bolt.PrinterBolt;
import org.apache.storm.starter.bolt.SingleJoinBolt;


public class SingleJoinExample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

package org.apache.flink.storm.print;

import backtype.storm.Config;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.utils.Utils;
import org.apache.storm.Config;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.utils.Utils;
import org.apache.flink.storm.api.FlinkLocalCluster;
import org.apache.flink.storm.api.FlinkTopology;
import storm.starter.bolt.PrinterBolt;
import storm.starter.spout.TwitterSampleSpout;
import org.apache.storm.starter.bolt.PrinterBolt;
import org.apache.storm.starter.spout.TwitterSampleSpout;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
*/
package org.apache.flink.storm.split.operators;

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.apache.storm.tuple.Values;

import java.util.Map;
import java.util.Random;

import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichSpout;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;

public class RandomSpout extends BaseRichSpout {
private static final long serialVersionUID = -3978554318742509334L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
*/
package org.apache.flink.storm.split.operators;

import java.util.Map;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichBolt;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;
import org.apache.storm.tuple.Values;

import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichBolt;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import java.util.Map;

public class VerifyAndEnrichBolt extends BaseRichBolt {
private static final long serialVersionUID = -7277395570966328721L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package org.apache.flink.storm.util;

import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichBolt;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Tuple;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.IRichBolt;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.tuple.Tuple;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

package org.apache.flink.storm.util;

import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import org.apache.storm.spout.SpoutOutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.IRichSpout;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.tuple.Fields;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.flink.storm.util;

import backtype.storm.task.TopologyContext;
import org.apache.storm.task.TopologyContext;

import java.io.BufferedWriter;
import java.io.FileWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.flink.storm.util;

import backtype.storm.task.TopologyContext;
import org.apache.storm.task.TopologyContext;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package org.apache.flink.storm.util;

import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.tuple.Values;
import org.apache.storm.spout.SpoutOutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.tuple.Values;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/
package org.apache.flink.storm.util;

import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.tuple.Values;
import org.apache.storm.spout.SpoutOutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.tuple.Values;

import java.io.IOException;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.flink.storm.util;

import backtype.storm.tuple.Values;
import org.apache.storm.tuple.Values;

/**
* Implements a Spout that reads data stored in memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.apache.flink.storm.util;

import backtype.storm.tuple.Tuple;
import org.apache.storm.tuple.Tuple;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.apache.flink.storm.util;

import backtype.storm.tuple.Tuple;
import org.apache.storm.tuple.Tuple;

public class SimpleOutputFormatter implements OutputFormatter {
private static final long serialVersionUID = 6349573860144270338L;
Expand Down
Loading

0 comments on commit 9b6769b

Please sign in to comment.