You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2019/08/08 09:54:31 UTC

[flink] branch master updated (434f59f -> 7823510)

This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 434f59f  [hotfix][task,test] Do not override performDefaultAction in StreamTaskTest
     new 2e8b35c  [hotfix][examples] Changed collection execution environment to regular environment in WordCountTable example
     new 7823510  [FLINK-13558][examples][table] Added table examples to dist

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-dist/src/main/assemblies/bin.xml             |  14 ++
 flink-examples/flink-examples-batch/pom.xml        |   7 +-
 flink-examples/flink-examples-streaming/pom.xml    |   5 -
 flink-examples/flink-examples-table/pom.xml        | 145 ++++++++++++++++++---
 .../flink/table/examples/java/WordCountTable.java  |   2 +-
 flink-examples/pom.xml                             |  19 +++
 6 files changed, 159 insertions(+), 33 deletions(-)


[flink] 01/02: [hotfix][examples] Changed collection execution environment to regular environment in WordCountTable example

Posted by dw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 2e8b35ca08bf706cb2752b692f72eea4c49140fe
Author: Dawid Wysakowicz <dw...@apache.org>
AuthorDate: Thu Aug 8 11:49:06 2019 +0200

    [hotfix][examples] Changed collection execution environment to regular environment in WordCountTable example
---
 .../main/java/org/apache/flink/table/examples/java/WordCountTable.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountTable.java b/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountTable.java
index 4da9a1e..d12e0e8 100644
--- a/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountTable.java
+++ b/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/WordCountTable.java
@@ -37,7 +37,7 @@ public class WordCountTable {
 	// *************************************************************************
 
 	public static void main(String[] args) throws Exception {
-		ExecutionEnvironment env = ExecutionEnvironment.createCollectionsEnvironment();
+		ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 		BatchTableEnvironment tEnv = BatchTableEnvironment.create(env);
 
 		DataSet<WC> input = env.fromElements(


[flink] 02/02: [FLINK-13558][examples][table] Added table examples to dist

Posted by dw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 782351085d696d7e32183471218dd5fb21221025
Author: Dawid Wysakowicz <dw...@apache.org>
AuthorDate: Tue Aug 6 08:31:19 2019 +0200

    [FLINK-13558][examples][table] Added table examples to dist
    
    This closes #9367
---
 flink-dist/src/main/assemblies/bin.xml          |  14 +++
 flink-examples/flink-examples-batch/pom.xml     |   7 +-
 flink-examples/flink-examples-streaming/pom.xml |   5 -
 flink-examples/flink-examples-table/pom.xml     | 145 ++++++++++++++++++++----
 flink-examples/pom.xml                          |  19 ++++
 5 files changed, 158 insertions(+), 32 deletions(-)

diff --git a/flink-dist/src/main/assemblies/bin.xml b/flink-dist/src/main/assemblies/bin.xml
index b184eb9..a5af820 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -268,6 +268,20 @@ under the License.
 			<fileMode>0755</fileMode>
 		</fileSet>
 
+		<!-- copy jar file of the table examples -->
+		<fileSet>
+			<directory>../flink-examples/flink-examples-table/target</directory>
+			<outputDirectory>examples/table</outputDirectory>
+			<fileMode>0644</fileMode>
+			<includes>
+				<include>*.jar</include>
+			</includes>
+			<excludes>
+				<exclude>flink-*.jar</exclude>
+				<exclude>original-*.jar</exclude>
+			</excludes>
+		</fileSet>
+
 	</fileSets>
 
 </assembly>
diff --git a/flink-examples/flink-examples-batch/pom.xml b/flink-examples/flink-examples-batch/pom.xml
index 4a2e40a..6998bca 100644
--- a/flink-examples/flink-examples-batch/pom.xml
+++ b/flink-examples/flink-examples-batch/pom.xml
@@ -358,15 +358,10 @@ under the License.
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-antrun-plugin</artifactId>
-				<version>1.7</version>
 				<executions>
 					<execution>
 						<id>rename</id>
-						<phase>package</phase>
-						<goals>
-							<goal>run</goal>
-						</goals>
-						<configuration> 
+						<configuration>
 							<target>
 								<copy file="${project.basedir}/target/flink-examples-batch_${scala.binary.version}-${project.version}-KMeans.jar" tofile="${project.basedir}/target/KMeans.jar" />
 								<copy file="${project.basedir}/target/flink-examples-batch_${scala.binary.version}-${project.version}-ConnectedComponents.jar" tofile="${project.basedir}/target/ConnectedComponents.jar" />
diff --git a/flink-examples/flink-examples-streaming/pom.xml b/flink-examples/flink-examples-streaming/pom.xml
index 875ff1c..fe96e9a 100644
--- a/flink-examples/flink-examples-streaming/pom.xml
+++ b/flink-examples/flink-examples-streaming/pom.xml
@@ -468,14 +468,9 @@ under the License.
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-antrun-plugin</artifactId>
-				<version>1.7</version>
 				<executions>
 					<execution>
 						<id>rename</id>
-						<phase>package</phase>
-						<goals>
-							<goal>run</goal>
-						</goals>
 						<configuration>
 							<target>
 								<copy file="${project.basedir}/target/flink-examples-streaming_${scala.binary.version}-${project.version}-IncrementalLearning.jar" tofile="${project.basedir}/target/IncrementalLearning.jar" />
diff --git a/flink-examples/flink-examples-table/pom.xml b/flink-examples/flink-examples-table/pom.xml
index 1b15098..7b45bdd 100644
--- a/flink-examples/flink-examples-table/pom.xml
+++ b/flink-examples/flink-examples-table/pom.xml
@@ -84,33 +84,136 @@ under the License.
 			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-shade-plugin</artifactId>
+				<artifactId>maven-jar-plugin</artifactId>
 				<executions>
+
+					<execution>
+						<id>StreamSQLExample</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+
+						<configuration>
+							<classifier>StreamSQLExample</classifier>
+
+							<archive>
+								<manifestEntries>
+									<program-class>org.apache.flink.table.examples.java.StreamSQLExample</program-class>
+								</manifestEntries>
+							</archive>
+
+							<includes>
+								<include>org/apache/flink/table/examples/java/StreamSQLExample*</include>
+							</includes>
+						</configuration>
+					</execution>
+
+					<execution>
+						<id>WordCountSQL</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+
+						<configuration>
+							<classifier>WordCountSQL</classifier>
+
+							<archive>
+								<manifestEntries>
+									<program-class>org.apache.flink.table.examples.java.WordCountSQL</program-class>
+								</manifestEntries>
+							</archive>
+
+							<includes>
+								<include>org/apache/flink/table/examples/java/WordCountSQL*</include>
+							</includes>
+						</configuration>
+					</execution>
+
+					<execution>
+						<id>WordCountTable</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+
+						<configuration>
+							<classifier>WordCountTable</classifier>
+
+							<archive>
+								<manifestEntries>
+									<program-class>org.apache.flink.table.examples.java.WordCountTable</program-class>
+								</manifestEntries>
+							</archive>
+
+							<includes>
+								<include>org/apache/flink/table/examples/java/WordCountTable*</include>
+							</includes>
+						</configuration>
+					</execution>
+
 					<execution>
-						<id>flink-table-examples_${scala.binary.version}</id>
+						<id>StreamTableExample</id>
 						<phase>package</phase>
 						<goals>
-							<goal>shade</goal>
+							<goal>jar</goal>
 						</goals>
+
+						<configuration>
+							<classifier>StreamTableExample</classifier>
+
+							<archive>
+								<manifestEntries>
+									<program-class>org.apache.flink.table.examples.scala.StreamTableExample</program-class>
+								</manifestEntries>
+							</archive>
+
+							<includes>
+								<include>org/apache/flink/table/examples/scala/StreamTableExample*</include>
+							</includes>
+						</configuration>
+					</execution>
+
+					<execution>
+						<id>TPCHQuery3Table</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+
+						<configuration>
+							<classifier>TPCHQuery3Table</classifier>
+
+							<archive>
+								<manifestEntries>
+									<program-class>org.apache.flink.table.examples.scala.TPCHQuery3Table</program-class>
+								</manifestEntries>
+							</archive>
+
+							<includes>
+								<include>org/apache/flink/table/examples/scala/TPCHQuery3Table*</include>
+							</includes>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<!--simplify the name of example JARs for build-target/examples -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>rename</id>
 						<configuration>
-							<shadeTestJar>false</shadeTestJar>
-							<shadedArtifactAttached>false</shadedArtifactAttached>
-							<createDependencyReducedPom>false</createDependencyReducedPom>
-							<finalName>TableExamples</finalName>
-							<outputFile>flink-examples-table-with-dependencies.jar</outputFile>
-							<filters>
-								<filter>
-									<artifact>*:*</artifact>
-									<includes>
-										<include>org/apache/calcite/**</include>
-										<include>org/apache/flink/calcite/shaded/**</include>
-										<include>org/apache/flink/table/**</include>
-										<include>org.codehaus.commons.compiler.properties</include>
-										<include>org/codehaus/janino/**</include>
-										<include>org/codehaus/commons/**</include>
-									</includes>
-								</filter>
-							</filters>
+							<target>
+								<copy file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-StreamSQLExample.jar" tofile="${project.basedir}/target/StreamSQLExample.jar"/>
+								<copy file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-WordCountSQL.jar" tofile="${project.basedir}/target/WordCountSQL.jar"/>
+								<copy file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-WordCountTable.jar" tofile="${project.basedir}/target/WordCountTable.jar"/>
+								<copy file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-StreamTableExample.jar" tofile="${project.basedir}/target/StreamTableExample.jar"/>
+								<copy file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-TPCHQuery3Table.jar" tofile="${project.basedir}/target/TPCHQuery3Table.jar"/>
+							</target>
 						</configuration>
 					</execution>
 				</executions>
diff --git a/flink-examples/pom.xml b/flink-examples/pom.xml
index 11f1c6d..f4d57d8 100644
--- a/flink-examples/pom.xml
+++ b/flink-examples/pom.xml
@@ -72,6 +72,25 @@ under the License.
 	</dependencies>
 
 	<build>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-antrun-plugin</artifactId>
+					<version>1.7</version>
+					<executions>
+						<execution>
+							<id>rename</id>
+							<phase>package</phase>
+							<goals>
+								<goal>run</goal>
+							</goals>
+						</execution>
+					</executions>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+
 		<plugins>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>