pnowojski commented on a change in pull request #8038: [FLINK-11953] Introduce Plugin/Loading system and integrate it with FileSystem URL: https://github.com/apache/flink/pull/8038#discussion_r273129912
########## File path: flink-core/src/main/java/org/apache/flink/core/plugin/PluginUtils.java ########## @@ -32,22 +29,24 @@ */ public final class PluginUtils { - private static final Logger log = LoggerFactory.getLogger(PluginUtils.class); - private PluginUtils() { throw new AssertionError("Singleton class."); } public static void initPluginManagerSingletonFromRootFolder(Optional<Path> pluginsRootPath) { - Collection<PluginDescriptor> pluginDescriptorsForDirectory = Collections.emptyList(); + Collection<PluginDescriptor> pluginDescriptorsForDirectory; + if (pluginsRootPath.isPresent()) { try { pluginDescriptorsForDirectory = new DirectoryBasedPluginFinder(pluginsRootPath.get()).findPlugins(); - } catch (IOException ioex) { - log.warn("Exception when locating plugins in root folder {}. Ignoring plugins.", pluginsRootPath, ioex); + } catch (IOException e) { + throw new IllegalStateException("Exception when trying to initialize plugin system.", e); Review comment: `IllegalStateException`? Maybe `FlinkException` or it's subclass like `ConfigurationException`? I'm not sure if this qualifies as "illegal state"? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services