bowenli86 commented on a change in pull request #9937: [FLINK-14416][table] Add 
Module interface and ModuleManager
URL: https://github.com/apache/flink/pull/9937#discussion_r338698764
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java
 ##########
 @@ -103,6 +106,23 @@ static TableEnvironment create(EnvironmentSettings 
settings) {
         */
        Optional<Catalog> getCatalog(String catalogName);
 
+       /**
+        * Loads a {@link Module} under a unique name. Modules will be kept in 
the loaded order.
+        *
+        * @param moduleName name of the {@link Module}
+        * @param module the module instance
+        * @throws ModuleAlreadyExistException thrown when there is already a 
module with the same name
+        */
+       void loadModule(String moduleName, Module module) throws 
ModuleAlreadyExistException;
 
 Review comment:
   Sorry, that's a point I missed considering in the FLIP but realized when 
implementing it.
   
   After comparing with how other APIs, like catalog in TableEnv, handle 
exceptions, I agree we should remove the checked exception. Similar to 
`CatalogException`, how about we create a `ModuleException extends 
RuntimeException` and it will be used very similar to `CatalogException`?

----------------------------------------------------------------
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