You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/01/11 20:36:26 UTC

[1/3] flink git commit: [FLINK-1386] [quickstart] Fix pom in java quickstart archetype

Repository: flink
Updated Branches:
  refs/heads/master 6b36fd20f -> 3a39352bb


[FLINK-1386] [quickstart] Fix pom in java quickstart archetype


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

Branch: refs/heads/master
Commit: 3a39352bb621f946551088210762199edb43ae2f
Parents: ecb5595
Author: Stephan Ewen <se...@apache.org>
Authored: Sun Jan 11 20:08:28 2015 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Sun Jan 11 20:09:02 2015 +0100

----------------------------------------------------------------------
 .../main/resources/archetype-resources/pom.xml  | 40 +++++++++++++-------
 1 file changed, 27 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3a39352b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
index 48afe6d..adc6ab5 100644
--- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
+++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
@@ -61,6 +61,11 @@ under the License.
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-streaming-connectors</artifactId>
+			<version>0.9-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-clients</artifactId>
 			<version>0.9-SNAPSHOT</version>
 		</dependency>
@@ -109,7 +114,6 @@ under the License.
 				</configuration>
 			</plugin>
 
-			<!-- We use the JDT compiler because it adds the generic types of methods (also lambdas) to the class files-->
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
@@ -117,22 +121,32 @@ under the License.
 				<configuration>
 					<source>1.6</source> <!-- If you want to use Java 8, change this to "1.8" -->
 					<target>1.6</target> <!-- If you want to use Java 8, change this to "1.8" -->
-					<compilerId>jdt</compilerId>
 				</configuration>
-				<dependencies>
-					<dependency>
-						<groupId>org.eclipse.tycho</groupId>
-						<artifactId>tycho-compiler-jdt</artifactId>
-						<version>0.21.0</version>
-					</dependency>
-				</dependencies>
 			</plugin>
 		</plugins>
 		
-		<!-- Eclipse should not evaluate the compiler plugin, but use its own settings -->
+			
+		<!-- If you want to use Java 8 Lambda Expressions uncomment the following lines -->
+		<!--
 		<pluginManagement>
 			<plugins>
 				<plugin>
+					<artifactId>maven-compiler-plugin</artifactId>
+					<configuration>
+						<source>1.8</source>
+						<target>1.8</target>
+						<compilerId>jdt</compilerId>
+					</configuration>
+					<dependencies>
+						<dependency>
+							<groupId>org.eclipse.tycho</groupId>
+							<artifactId>tycho-compiler-jdt</artifactId>
+							<version>0.21.0</version>
+						</dependency>
+					</dependencies>
+				</plugin>
+		
+				<plugin>
 					<groupId>org.eclipse.m2e</groupId>
 					<artifactId>lifecycle-mapping</artifactId>
 					<version>1.0.0</version>
@@ -149,7 +163,7 @@ under the License.
 										</goals>
 									</pluginExecutionFilter>
 									<action>
-										<ignore></ignore>
+										<ignore/>
 									</action>
 								</pluginExecution>
 								<pluginExecution>
@@ -159,11 +173,10 @@ under the License.
 										<versionRange>[3.1,)</versionRange>
 										<goals>
 											<goal>testCompile</goal>
-											<goal>compile</goal>
 										</goals>
 									</pluginExecutionFilter>
 									<action>
-										<ignore></ignore>
+										<ignore/>
 									</action>
 								</pluginExecution>
 							</pluginExecutions>
@@ -172,6 +185,7 @@ under the License.
 				</plugin>
 			</plugins>
 		</pluginManagement>
+		-->
 		
 	</build>
 </project>


[2/3] flink git commit: [FLINK-1358] [streaming] Streaming added to the quickstarts

Posted by se...@apache.org.
[FLINK-1358] [streaming] Streaming added to the quickstarts


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

Branch: refs/heads/master
Commit: ecb5595c5a2b75c769f50c2e7f3889f4c674cdd0
Parents: 86f8753
Author: mbalassi <mb...@apache.org>
Authored: Sat Jan 10 19:56:29 2015 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Sun Jan 11 20:09:02 2015 +0100

----------------------------------------------------------------------
 .../main/resources/archetype-resources/pom.xml  |   5 +
 .../main/java/SocketTextStreamWordCount.java    | 107 +++++++++++++++++++
 .../src/main/java/WordCount.java                |  97 +++++++++++++++++
 .../src/main/java/WordCountJob.java             |  99 -----------------
 .../main/resources/archetype-resources/pom.xml  |   5 +
 .../main/scala/SocketTextStreamWordCount.scala  |  66 ++++++++++++
 .../src/main/scala/WordCount.scala              |  55 ++++++++++
 .../src/main/scala/WordCountJob.scala           |  55 ----------
 flink-quickstart/quickstart-SNAPSHOT.sh         |   1 +
 flink-quickstart/quickstart-scala-SNAPSHOT.sh   |   1 +
 flink-quickstart/quickstart-scala.sh            |   2 +-
 flink-quickstart/quickstart.sh                  |   2 +-
 12 files changed, 339 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
index 1864a38..48afe6d 100644
--- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
+++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
@@ -56,6 +56,11 @@ under the License.
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-streaming-core</artifactId>
+			<version>0.9-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-clients</artifactId>
 			<version>0.9-SNAPSHOT</version>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/SocketTextStreamWordCount.java
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/SocketTextStreamWordCount.java b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/SocketTextStreamWordCount.java
new file mode 100644
index 0000000..3067c17
--- /dev/null
+++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/SocketTextStreamWordCount.java
@@ -0,0 +1,107 @@
+package ${package};
+
+/*
+ * 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 org.apache.flink.api.common.functions.FlatMapFunction;
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.streaming.api.datastream.DataStream;
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+import org.apache.flink.util.Collector;
+
+/**
+ * This example shows an implementation of WordCount with data from a text
+ * socket. To run the example make sure that the service providing the text data
+ * is already up and running.
+ * 
+ * <p>
+ * To start an example socket text stream on your local machine run netcat from
+ * a command line: <code>nc -lk 9999</code>, where the parameter specifies the
+ * port number.
+ * 
+ * 
+ * <p>
+ * Usage:
+ * <code>SocketTextStreamWordCount &lt;hostname&gt; &lt;port&gt; &lt;result path&gt;</code>
+ * <br>
+ * 
+ * <p>
+ * This example shows how to:
+ * <ul>
+ * <li>use StreamExecutionEnvironment.socketTextStream
+ * <li>write a simple Flink program,
+ * <li>write and use user-defined functions.
+ * </ul>
+ * 
+ * @see <a href="www.openbsd.org/cgi-bin/man.cgi?query=nc">netcat</a>
+ */
+public class SocketTextStreamWordCount {
+
+	//
+	//	Program
+	//
+
+	public static void main(String[] args) throws Exception {
+
+		String hostName = args[0];
+		Integer port = Integer.parseInt(args[1]);
+
+		// set up the execution environment
+		final StreamExecutionEnvironment env = StreamExecutionEnvironment
+				.getExecutionEnvironment();
+
+		// get input data
+		DataStream<String> text = env.socketTextStream(hostName, port);
+
+		DataStream<Tuple2<String, Integer>> counts =
+		// split up the lines in pairs (2-tuples) containing: (word,1)
+		text.flatMap(new LineSplitter())
+		// group by the tuple field "0" and sum up tuple field "1"
+				.groupBy(0)
+				.sum(1);
+
+		counts.print();
+
+		// execute program
+		env.execute("WordCount from SocketTextStream Example");
+	}
+
+	//
+	// 	User Functions
+	//
+
+	/**
+	 * Implements the string tokenizer that splits sentences into words as a user-defined
+	 * FlatMapFunction. The function takes a line (String) and splits it into
+	 * multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>).
+	 */
+	public static final class LineSplitter implements FlatMapFunction<String, Tuple2<String, Integer>> {
+
+		@Override
+		public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {
+			// normalize and split the line
+			String[] tokens = value.toLowerCase().split("\\W+");
+
+			// emit the pairs
+			for (String token : tokens) {
+				if (token.length() > 0) {
+					out.collect(new Tuple2<String, Integer>(token, 1));
+				}
+			}
+		}
+	}	
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCount.java
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCount.java b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCount.java
new file mode 100644
index 0000000..f250996
--- /dev/null
+++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCount.java
@@ -0,0 +1,97 @@
+package ${package};
+
+/**
+ * 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 org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.java.ExecutionEnvironment;
+import org.apache.flink.api.common.functions.FlatMapFunction;
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.util.Collector;
+
+/**
+ * Implements the "WordCount" program that computes a simple word occurrence histogram
+ * over some sample data
+ *
+ * <p>
+ * This example shows how to:
+ * <ul>
+ * <li>write a simple Flink program.
+ * <li>use Tuple data types.
+ * <li>write and use user-defined functions.
+ * </ul>
+ *
+ */
+public class WordCount {
+
+	//
+	//	Program
+	//
+
+	public static void main(String[] args) throws Exception {
+
+		// set up the execution environment
+		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
+
+		// get input data
+		DataSet<String> text = env.fromElements(
+				"To be, or not to be,--that is the question:--",
+				"Whether 'tis nobler in the mind to suffer",
+				"The slings and arrows of outrageous fortune",
+				"Or to take arms against a sea of troubles,"
+				);
+
+		DataSet<Tuple2<String, Integer>> counts =
+				// split up the lines in pairs (2-tuples) containing: (word,1)
+				text.flatMap(new LineSplitter())
+				// group by the tuple field "0" and sum up tuple field "1"
+				.groupBy(0)
+				.sum(1);
+
+		// emit result
+		counts.print();
+
+		// execute program
+		env.execute("WordCount Example");
+	}
+
+	//
+	// 	User Functions
+	//
+
+	/**
+	 * Implements the string tokenizer that splits sentences into words as a user-defined
+	 * FlatMapFunction. The function takes a line (String) and splits it into
+	 * multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>).
+	 */
+	public static final class LineSplitter implements FlatMapFunction<String, Tuple2<String, Integer>> {
+
+		@Override
+		public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {
+			// normalize and split the line
+			String[] tokens = value.toLowerCase().split("\\W+");
+
+			// emit the pairs
+			for (String token : tokens) {
+				if (token.length() > 0) {
+					out.collect(new Tuple2<String, Integer>(token, 1));
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java
deleted file mode 100644
index 6b25ab2..0000000
--- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package ${package};
-
-/**
- * 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 org.apache.flink.api.java.DataSet;
-import org.apache.flink.api.java.ExecutionEnvironment;
-import org.apache.flink.api.java.aggregation.Aggregations;
-import org.apache.flink.api.common.functions.FlatMapFunction;
-import org.apache.flink.api.java.tuple.Tuple2;
-import org.apache.flink.util.Collector;
-
-/**
- * Implements the "WordCount" program that computes a simple word occurrence histogram
- * over some sample data
- *
- * <p>
- * This example shows how to:
- * <ul>
- * <li>write a simple Flink program.
- * <li>use Tuple data types.
- * <li>write and use user-defined functions.
- * </ul>
- *
- */
-@SuppressWarnings("serial")
-public class WordCountJob {
-
-	//
-	//	Program.
-	//
-
-	public static void main(String[] args) throws Exception {
-
-		// set up the execution environment
-		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
-
-		// get input data
-		DataSet<String> text = env.fromElements(
-				"To be, or not to be,--that is the question:--",
-				"Whether 'tis nobler in the mind to suffer",
-				"The slings and arrows of outrageous fortune",
-				"Or to take arms against a sea of troubles,"
-				);
-
-		DataSet<Tuple2<String, Integer>> counts =
-				// split up the lines in pairs (2-tuples) containing: (word,1)
-				text.flatMap(new LineSplitter())
-				// group by the tuple field "0" and sum up tuple field "1"
-				.groupBy(0)
-				.aggregate(Aggregations.SUM, 1);
-
-		// emit result
-		counts.print();
-
-		// execute program
-		env.execute("WordCount Example");
-	}
-
-	//
-	// 	User Functions
-	//
-
-	/**
-	 * Implements the string tokenizer that splits sentences into words as a user-defined
-	 * FlatMapFunction. The function takes a line (String) and splits it into
-	 * multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>).
-	 */
-	public static final class LineSplitter implements FlatMapFunction<String, Tuple2<String, Integer>> {
-
-		@Override
-		public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {
-			// normalize and split the line
-			String[] tokens = value.toLowerCase().split("\\W+");
-
-			// emit the pairs
-			for (String token : tokens) {
-				if (token.length() > 0) {
-					out.collect(new Tuple2<String, Integer>(token, 1));
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
index fbd0e1b..49036e8 100644
--- a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
+++ b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
@@ -56,6 +56,11 @@ under the License.
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-streaming-scala</artifactId>
+			<version>0.9-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
 			<artifactId>flink-clients</artifactId>
 			<version>0.9-SNAPSHOT</version>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/SocketTextStreamWordCount.scala
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/SocketTextStreamWordCount.scala b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/SocketTextStreamWordCount.scala
new file mode 100644
index 0000000..a065807
--- /dev/null
+++ b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/SocketTextStreamWordCount.scala
@@ -0,0 +1,66 @@
+package ${package}
+
+/*
+ * 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 org.apache.flink.streaming.api.scala._
+
+/**
+ * This example shows an implementation of WordCount with data from a text socket. 
+ * To run the example make sure that the service providing the text data is already up and running.
+ *
+ * To start an example socket text stream on your local machine run netcat from a command line, 
+ * where the parameter specifies the port number:
+ *
+ * {{{
+ *   nc -lk 9999
+ * }}}
+ *
+ * Usage:
+ * {{{
+ *   SocketTextStreamWordCount <hostname> <port> <output path>
+ * }}}
+ *
+ * This example shows how to:
+ *
+ *   - use StreamExecutionEnvironment.socketTextStream
+ *   - write a simple Flink Streaming program in scala.
+ *   - write and use user-defined functions.
+ */
+object SocketTextStreamWordCount {
+
+  def main(args: Array[String]) {
+    
+    val hostName = args(0)
+    val port = args(1).toInt
+
+    val env = StreamExecutionEnvironment.getExecutionEnvironment
+
+    //Create streams for names and ages by mapping the inputs to the corresponding objects
+    val text = env.socketTextStream(hostName, port)
+    val counts = text.flatMap { _.toLowerCase.split("\\W+") filter { _.nonEmpty } }
+      .map { (_, 1) }
+      .groupBy(0)
+      .sum(1)
+
+    counts print
+
+    env.execute("Scala SocketTextStreamWordCount Example")
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCount.scala
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCount.scala b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCount.scala
new file mode 100644
index 0000000..150830f
--- /dev/null
+++ b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCount.scala
@@ -0,0 +1,55 @@
+package ${package}
+
+/**
+ * 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 org.apache.flink.api.scala._
+
+/**
+ * Implements the "WordCount" program that computes a simple word occurrence histogram
+ * over some sample data
+ *
+ * This example shows how to:
+ *
+ *   - write a simple Flink program.
+ *   - use Tuple data types.
+ *   - write and use user-defined functions.
+ */
+object WordCount {
+  def main(args: Array[String]) {
+
+    // set up the execution environment
+    val env = ExecutionEnvironment.getExecutionEnvironment
+
+    // get input data
+    val text = env.fromElements("To be, or not to be,--that is the question:--",
+      "Whether 'tis nobler in the mind to suffer", "The slings and arrows of outrageous fortune",
+      "Or to take arms against a sea of troubles,")
+
+    val counts = text.flatMap { _.toLowerCase.split("\\W+") }
+      .map { (_, 1) }
+      .groupBy(0)
+      .sum(1)
+
+    // emit result
+    counts.print()
+
+    // execute program
+    env.execute("WordCount Example")
+  }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCountJob.scala
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCountJob.scala b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCountJob.scala
deleted file mode 100644
index 6696a6a..0000000
--- a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/src/main/scala/WordCountJob.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-package ${package}
-
-/**
- * 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 org.apache.flink.api.scala._
-
-/**
- * Implements the "WordCount" program that computes a simple word occurrence histogram
- * over some sample data
- *
- * This example shows how to:
- *
- *   - write a simple Flink program.
- *   - use Tuple data types.
- *   - write and use user-defined functions.
- */
-object WordCountJob {
-  def main(args: Array[String]) {
-
-    // set up the execution environment
-    val env = ExecutionEnvironment.getExecutionEnvironment
-
-    // get input data
-    val text = env.fromElements("To be, or not to be,--that is the question:--",
-      "Whether 'tis nobler in the mind to suffer", "The slings and arrows of outrageous fortune",
-      "Or to take arms against a sea of troubles,")
-
-    val counts = text.flatMap { _.toLowerCase.split("\\W+") }
-      .map { (_, 1) }
-      .groupBy(0)
-      .sum(1)
-
-    // emit result
-    counts.print()
-
-    // execute program
-    env.execute("WordCount Example")
-  }
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/quickstart-SNAPSHOT.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-SNAPSHOT.sh b/flink-quickstart/quickstart-SNAPSHOT.sh
index 92e2263..1692880 100755
--- a/flink-quickstart/quickstart-SNAPSHOT.sh
+++ b/flink-quickstart/quickstart-SNAPSHOT.sh
@@ -43,5 +43,6 @@ echo -e "\\tImport the project there using your favorite IDE (Import it as a mav
 echo -e "\\tBuild a jar inside the directory using"
 echo -e "\\t\\t mvn clean package"
 echo -e "\\tYou will find the runnable jar in $PACKAGE/target"
+echo -e "\\tConsult our website if you have any troubles: http://flink.apache.org/community.html#mailing-lists"
 echo -e "\\n\\n"
 

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/quickstart-scala-SNAPSHOT.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-scala-SNAPSHOT.sh b/flink-quickstart/quickstart-scala-SNAPSHOT.sh
index 885be4b..d36628c 100755
--- a/flink-quickstart/quickstart-scala-SNAPSHOT.sh
+++ b/flink-quickstart/quickstart-scala-SNAPSHOT.sh
@@ -43,5 +43,6 @@ echo -e "\\tImport the project there using your favorite IDE (Import it as a mav
 echo -e "\\tBuild a jar inside the directory using"
 echo -e "\\t\\t mvn clean package"
 echo -e "\\tYou will find the runnable jar in $PACKAGE/target"
+echo -e "\\tConsult our website if you have any troubles: http://flink.apache.org/community.html#mailing-lists"
 echo -e "\\n\\n"
 

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/quickstart-scala.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-scala.sh b/flink-quickstart/quickstart-scala.sh
index 4842b55..019f6b0 100755
--- a/flink-quickstart/quickstart-scala.sh
+++ b/flink-quickstart/quickstart-scala.sh
@@ -42,6 +42,6 @@ echo -e "\\tImport the project there using your favorite IDE (Import it as a mav
 echo -e "\\tBuild a jar inside the directory using"
 echo -e "\\t\\t mvn clean package"
 echo -e "\\tYou will find the runnable jar in $PACKAGE/target"
-echo -e "\\tConsult our website if you have any troubles: http://flink.incubator.apache.org/community.html#mailing-lists"
+echo -e "\\tConsult our website if you have any troubles: http://flink.apache.org/community.html#mailing-lists"
 echo -e "\\n\\n"
 

http://git-wip-us.apache.org/repos/asf/flink/blob/ecb5595c/flink-quickstart/quickstart.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart.sh b/flink-quickstart/quickstart.sh
index 2533605..92309d4 100755
--- a/flink-quickstart/quickstart.sh
+++ b/flink-quickstart/quickstart.sh
@@ -42,7 +42,7 @@ echo -e "\\tImport the project there using your favorite IDE (Import it as a mav
 echo -e "\\tBuild a jar inside the directory using"
 echo -e "\\t\\t mvn clean package"
 echo -e "\\tYou will find the runnable jar in $PACKAGE/target"
-echo -e "\\tConsult our website if you have any troubles: http://flink.incubator.apache.org/community.html#mailing-lists"
+echo -e "\\tConsult our website if you have any troubles: http://flink.apache.org/community.html#mailing-lists"
 echo -e "\\n\\n"
 
 


[3/3] flink git commit: [FLINK-1225] Fix for quickstart packaging

Posted by se...@apache.org.
[FLINK-1225] Fix for quickstart packaging

This closes #279


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

Branch: refs/heads/master
Commit: 86f87537bfb3a88c01732352f93a0be13ac5666c
Parents: 6b36fd2
Author: mbalassi <mb...@apache.org>
Authored: Fri Dec 26 18:02:55 2014 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Sun Jan 11 20:09:02 2015 +0100

----------------------------------------------------------------------
 flink-quickstart/quickstart-SNAPSHOT.sh       | 4 ++--
 flink-quickstart/quickstart-scala-SNAPSHOT.sh | 4 ++--
 flink-quickstart/quickstart-scala.sh          | 4 ++--
 flink-quickstart/quickstart.sh                | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/86f87537/flink-quickstart/quickstart-SNAPSHOT.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-SNAPSHOT.sh b/flink-quickstart/quickstart-SNAPSHOT.sh
index 47ce1f4..92e2263 100755
--- a/flink-quickstart/quickstart-SNAPSHOT.sh
+++ b/flink-quickstart/quickstart-SNAPSHOT.sh
@@ -24,11 +24,11 @@ PACKAGE=quickstart
 mvn archetype:generate								\
   -DarchetypeGroupId=org.apache.flink				\
   -DarchetypeArtifactId=flink-quickstart-java		\
-  -DarchetypeVersion=0.8-incubating-SNAPSHOT		\
+  -DarchetypeVersion=0.9-SNAPSHOT		\
   -DgroupId=org.apache.flink 						\
   -DartifactId=$PACKAGE								\
   -Dversion=0.1										\
-  -Dpackage=org.apache.flink 						\
+  -Dpackage=org.myorg.quickstart 						\
   -DinteractiveMode=false							\
   -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/
 

http://git-wip-us.apache.org/repos/asf/flink/blob/86f87537/flink-quickstart/quickstart-scala-SNAPSHOT.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-scala-SNAPSHOT.sh b/flink-quickstart/quickstart-scala-SNAPSHOT.sh
index 943c530..885be4b 100755
--- a/flink-quickstart/quickstart-scala-SNAPSHOT.sh
+++ b/flink-quickstart/quickstart-scala-SNAPSHOT.sh
@@ -24,11 +24,11 @@ PACKAGE=quickstart
 mvn archetype:generate								\
   -DarchetypeGroupId=org.apache.flink 				\
   -DarchetypeArtifactId=flink-quickstart-scala		\
-  -DarchetypeVersion=0.8-incubating-SNAPSHOT		\
+  -DarchetypeVersion=0.9-SNAPSHOT		\
   -DgroupId=org.apache.flink						\
   -DartifactId=$PACKAGE								\
   -Dversion=0.1										\
-  -Dpackage=org.apache.flink 						\
+  -Dpackage=org.myorg.quickstart 						\
   -DinteractiveMode=false							\
   -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/
 

http://git-wip-us.apache.org/repos/asf/flink/blob/86f87537/flink-quickstart/quickstart-scala.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart-scala.sh b/flink-quickstart/quickstart-scala.sh
index fddcf32..4842b55 100755
--- a/flink-quickstart/quickstart-scala.sh
+++ b/flink-quickstart/quickstart-scala.sh
@@ -24,11 +24,11 @@ PACKAGE=quickstart
 mvn archetype:generate								\
   -DarchetypeGroupId=org.apache.flink				\
   -DarchetypeArtifactId=flink-quickstart-scala		\
-  -DarchetypeVersion=0.7.0-incubating 				\
+  -DarchetypeVersion=0.8.0 				\
   -DgroupId=org.apache.flink 						\
   -DartifactId=$PACKAGE								\
   -Dversion=0.1										\
-  -Dpackage=org.apache.flink 						\
+  -Dpackage=org.myorg.quickstart 						\
   -DinteractiveMode=false
 
 #

http://git-wip-us.apache.org/repos/asf/flink/blob/86f87537/flink-quickstart/quickstart.sh
----------------------------------------------------------------------
diff --git a/flink-quickstart/quickstart.sh b/flink-quickstart/quickstart.sh
index b02e9f7..2533605 100755
--- a/flink-quickstart/quickstart.sh
+++ b/flink-quickstart/quickstart.sh
@@ -24,11 +24,11 @@ PACKAGE=quickstart
 mvn archetype:generate 								\
   -DarchetypeGroupId=org.apache.flink 				\
   -DarchetypeArtifactId=flink-quickstart-java		\
-  -DarchetypeVersion=0.7.0-incubating				\
+  -DarchetypeVersion=0.8.0				\
   -DgroupId=org.apache.flink 						\
   -DartifactId=$PACKAGE								\
   -Dversion=0.1										\
-  -Dpackage=org.apache.flink 						\
+  -Dpackage=org.myorg.quickstart 						\
   -DinteractiveMode=false
 
 #