[ https://issues.apache.org/jira/browse/DRILL-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955914#comment-14955914 ]
ASF GitHub Bot commented on DRILL-3742: --------------------------------------- Github user julienledem commented on a diff in the pull request: https://github.com/apache/drill/pull/148#discussion_r41939454 --- Diff: common/src/main/java/org/apache/drill/common/logical/StoragePluginConfigBase.java --- @@ -17,30 +17,18 @@ */ package org.apache.drill.common.logical; -import java.util.List; +import java.util.Set; -import org.apache.drill.common.config.CommonConstants; -import org.apache.drill.common.config.DrillConfig; -import org.apache.drill.common.util.PathScanner; - -import com.google.common.base.Joiner; +import org.apache.drill.common.scanner.persistence.ScanResult; public abstract class StoragePluginConfigBase extends StoragePluginConfig { private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(StoragePluginConfigBase.class); - - public synchronized static Class<?>[] getSubTypes(final DrillConfig config) { - final List<String> packages = - config.getStringList(CommonConstants.STORAGE_PLUGIN_CONFIG_SCAN_PACKAGES); - final Class<?>[] pluginClasses = - PathScanner.scanForImplementationsArr(StoragePluginConfig.class, packages); - final String lineBrokenList = - pluginClasses.length == 0 - ? "" : "\n\t- " + Joiner.on("\n\t- ").join(pluginClasses); - logger.debug("Found {} storage plugin configuration classes: {}.", - pluginClasses.length, lineBrokenList); - return pluginClasses; + public synchronized static Set<Class<? extends StoragePluginConfig>> getSubTypes(final ScanResult classpathScan) { --- End diff -- If we needed it in the first place then... possibly. > Improve classpath scanning to reduce the time it takes > ------------------------------------------------------ > > Key: DRILL-3742 > URL: https://issues.apache.org/jira/browse/DRILL-3742 > Project: Apache Drill > Issue Type: Improvement > Reporter: Julien Le Dem > Fix For: Future > > > classpath scanning and function registry take a long time (seconds every > time). > We'd want to avoid loading the classes (use bytecode inspection instead) and > have a build time cache to avoid doing the scanning at startup. -- This message was sent by Atlassian JIRA (v6.3.4#6332)