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:56:16 UTC

[flink] branch release-1.9 updated (62d34f1 -> d326143)

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

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


    from 62d34f1  [FLINK-13594][python] Improve the 'from_element' method of flink python api to apply to blink planner.
     new 28e4cf1  [hotfix][examples] Changed collection execution environment to regular environment in WordCountTable example
     new d326143  [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 release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 28e4cf10d11ee80334069faadb4d064c7b124652
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 release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d326143ab7f64b277eb654232a12c3d801cbfa0b
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 7289153..1b65486 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -257,6 +257,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 31373c0..c4d4927 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 47055d4..814db15 100644
--- a/flink-examples/flink-examples-streaming/pom.xml
+++ b/flink-examples/flink-examples-streaming/pom.xml
@@ -469,14 +469,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 d3373bf..83db8e3 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 45ebb5a..c76e9f9 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>