flink git commit: [FLINK-9059] [table] Replace "sources" with "tables" in environment file

2018-04-06 Thread twalthr
Repository: flink
Updated Branches:
  refs/heads/release-1.5 764bafdd4 -> ff3a0ec69


[FLINK-9059] [table] Replace "sources" with "tables" in environment file

This closes #5758.


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

Branch: refs/heads/release-1.5
Commit: ff3a0ec692b1314caccbcb482618d4229e130a9b
Parents: 764bafd
Author: Shuyi Chen 
Authored: Thu Mar 22 23:00:00 2018 -0700
Committer: Timo Walther 
Committed: Fri Apr 6 14:14:39 2018 +0200

--
 .../conf/sql-client-defaults.yaml   |  5 ++-
 .../flink/table/client/config/Environment.java  | 47 
 .../client/gateway/local/ExecutionContext.java  | 12 +++--
 .../resources/test-sql-client-defaults.yaml |  4 +-
 .../test/resources/test-sql-client-factory.yaml |  3 +-
 .../table/descriptors/TableDescriptor.scala | 40 +
 .../descriptors/TableDescriptorValidator.scala  | 43 ++
 .../descriptors/TableSourceDescriptor.scala | 32 ++---
 .../sources/TableSourceFactoryServiceTest.scala |  4 +-
 .../table/sources/TestTableSourceFactory.scala  |  4 +-
 10 files changed, 145 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flink/blob/ff3a0ec6/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
--
diff --git a/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml 
b/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
index 4ec64d6..5fd01d9 100644
--- a/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
+++ b/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
@@ -25,11 +25,12 @@
 # Table Sources
 #==
 
-# Define table sources here. See the Table API & SQL documentation for details.
+# Define table sources and sinks here. See the Table API & SQL documentation 
for details.
 
-sources: [] # empty list
+tables: [] # empty list
 # A typical table source definition looks like:
 # - name: ...
+#   type: source
 #   connector: ...
 #   format: ...
 #   schema: ...

http://git-wip-us.apache.org/repos/asf/flink/blob/ff3a0ec6/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
--
diff --git 
a/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
 
b/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
index a910c49..7169fe1 100644
--- 
a/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
+++ 
b/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
@@ -19,6 +19,8 @@
 package org.apache.flink.table.client.config;
 
 import org.apache.flink.table.client.SqlClientException;
+import org.apache.flink.table.descriptors.TableDescriptor;
+import org.apache.flink.table.descriptors.TableDescriptorValidator;
 
 import java.io.IOException;
 import java.net.URL;
@@ -29,7 +31,7 @@ import java.util.Map;
 
 /**
  * Environment configuration that represents the content of an environment 
file. Environment files
- * define sources, execution, and deployment behavior. An environment might be 
defined by default or
+ * define tables, execution, and deployment behavior. An environment might be 
defined by default or
  * as part of a session. Environments can be merged or enriched with 
properties (e.g. from CLI command).
  *
  * In future versions, we might restrict the merging or enrichment of 
deployment properties to not
@@ -37,30 +39,39 @@ import java.util.Map;
  */
 public class Environment {
 
-   private Map sources;
+   private Map tables;
 
private Execution execution;
 
private Deployment deployment;
 
public Environment() {
-   this.sources = Collections.emptyMap();
+   this.tables = Collections.emptyMap();
this.execution = new Execution();
this.deployment = new Deployment();
}
 
-   public Map getSources() {
-   return sources;
+   public Map getTables() {
+   return tables;
}
 
-   public void setSources(List> sources) {
-   this.sources = new HashMap<>(sources.size());
-   sources.forEach(config -> {
-   final Source s = Source.create(config);
-   if (this.sources.containsKey(s.getName())) {
-   throw new SqlCli

flink git commit: [FLINK-9059] [table] Replace "sources" with "tables" in environment file

2018-04-06 Thread twalthr
Repository: flink
Updated Branches:
  refs/heads/master 7baf7649e -> bc9982c36


[FLINK-9059] [table] Replace "sources" with "tables" in environment file

This closes #5758.


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

Branch: refs/heads/master
Commit: bc9982c364f54c40223d14eeb4823a882c021e7a
Parents: 7baf764
Author: Shuyi Chen 
Authored: Thu Mar 22 23:00:00 2018 -0700
Committer: Timo Walther 
Committed: Fri Apr 6 14:08:08 2018 +0200

--
 .../conf/sql-client-defaults.yaml   |  5 ++-
 .../flink/table/client/config/Environment.java  | 47 
 .../client/gateway/local/ExecutionContext.java  | 12 +++--
 .../resources/test-sql-client-defaults.yaml |  4 +-
 .../test/resources/test-sql-client-factory.yaml |  3 +-
 .../table/descriptors/TableDescriptor.scala | 40 +
 .../descriptors/TableDescriptorValidator.scala  | 43 ++
 .../descriptors/TableSourceDescriptor.scala | 32 ++---
 .../sources/TableSourceFactoryServiceTest.scala |  4 +-
 .../table/sources/TestTableSourceFactory.scala  |  4 +-
 10 files changed, 145 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flink/blob/bc9982c3/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
--
diff --git a/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml 
b/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
index 4ec64d6..5fd01d9 100644
--- a/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
+++ b/flink-libraries/flink-sql-client/conf/sql-client-defaults.yaml
@@ -25,11 +25,12 @@
 # Table Sources
 #==
 
-# Define table sources here. See the Table API & SQL documentation for details.
+# Define table sources and sinks here. See the Table API & SQL documentation 
for details.
 
-sources: [] # empty list
+tables: [] # empty list
 # A typical table source definition looks like:
 # - name: ...
+#   type: source
 #   connector: ...
 #   format: ...
 #   schema: ...

http://git-wip-us.apache.org/repos/asf/flink/blob/bc9982c3/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
--
diff --git 
a/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
 
b/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
index a910c49..7169fe1 100644
--- 
a/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
+++ 
b/flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
@@ -19,6 +19,8 @@
 package org.apache.flink.table.client.config;
 
 import org.apache.flink.table.client.SqlClientException;
+import org.apache.flink.table.descriptors.TableDescriptor;
+import org.apache.flink.table.descriptors.TableDescriptorValidator;
 
 import java.io.IOException;
 import java.net.URL;
@@ -29,7 +31,7 @@ import java.util.Map;
 
 /**
  * Environment configuration that represents the content of an environment 
file. Environment files
- * define sources, execution, and deployment behavior. An environment might be 
defined by default or
+ * define tables, execution, and deployment behavior. An environment might be 
defined by default or
  * as part of a session. Environments can be merged or enriched with 
properties (e.g. from CLI command).
  *
  * In future versions, we might restrict the merging or enrichment of 
deployment properties to not
@@ -37,30 +39,39 @@ import java.util.Map;
  */
 public class Environment {
 
-   private Map sources;
+   private Map tables;
 
private Execution execution;
 
private Deployment deployment;
 
public Environment() {
-   this.sources = Collections.emptyMap();
+   this.tables = Collections.emptyMap();
this.execution = new Execution();
this.deployment = new Deployment();
}
 
-   public Map getSources() {
-   return sources;
+   public Map getTables() {
+   return tables;
}
 
-   public void setSources(List> sources) {
-   this.sources = new HashMap<>(sources.size());
-   sources.forEach(config -> {
-   final Source s = Source.create(config);
-   if (this.sources.containsKey(s.getName())) {
-   throw new SqlClientExcepti