ssquan commented on a change in pull request #8852:  
[FLINK-12798][table-api][table-planner] Add a proper discover mechanism that 
will  enable switching between Flink & Blink Planner/Executor
URL: https://github.com/apache/flink/pull/8852#discussion_r310424843
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
 ##########
 @@ -103,9 +106,52 @@
         * @param <T> factory class type
         * @return the matching factory
         */
-       public static <T> T find(Class<T> factoryClass, Map<String, String> 
propertyMap, ClassLoader classLoader) {
+       public static <T extends TableFactory> T find(
+                       Class<T> factoryClass,
+                       Map<String, String> propertyMap,
+                       ClassLoader classLoader) {
                Preconditions.checkNotNull(classLoader);
-               return findInternal(factoryClass, propertyMap, 
Optional.of(classLoader));
+               return findSingleInternal(factoryClass, propertyMap, 
Optional.of(classLoader));
+       }
+
+       /**
+        * Finds all table factories of the given class and property map.
+        *
+        * @param factoryClass desired factory class
+        * @param propertyMap properties that describe the factory configuration
+        * @param <T> factory class type
+        * @return all the matching factories
+        */
+       public static <T extends TableFactory> List<T> findAll(Class<T> 
factoryClass, Map<String, String> propertyMap) {
+               return findAllInternal(factoryClass, propertyMap, 
Optional.empty());
 
 Review comment:
   Hi, should we use Flink user classloader instead?  I package 
BlinkExecutorFactory into a fat  JAR, but it can't be found by Flink cluster.

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