xuefuz commented on a change in pull request #10093: [FLINK-14579][sql cli] 
enable SQL CLI to configure modules via yaml config
URL: https://github.com/apache/flink/pull/10093#discussion_r342869818
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java
 ##########
 @@ -74,6 +78,24 @@ public Environment() {
                this.deployment = DeploymentEntry.DEFAULT_INSTANCE;
        }
 
+       public Map<String, ModuleEntry> getModules() {
+               return modules;
+       }
+
+       public void setModules(List<Map<String, Object>> modules) {
+               this.modules = new HashMap<>(modules.size());
+
+               modules.forEach(config -> {
+                       final ModuleEntry module = ModuleEntry.create(config);
+                       if (this.modules.containsKey(module.getName())) {
+                               throw new SqlClientException(
+                                       String.format("Cannot create module 
'%s' because a module with this name is already registered.",
 
 Review comment:
   registered => created.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to