You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Jonathan Hurley (JIRA)" <ji...@apache.org> on 2017/03/01 20:49:45 UTC

[jira] [Updated] (AMBARI-20262) Startup Annotation Scanning Takes Too Long

     [ https://issues.apache.org/jira/browse/AMBARI-20262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Hurley updated AMBARI-20262:
-------------------------------------
    Component/s: ambari-server

> Startup Annotation Scanning Takes Too Long
> ------------------------------------------
>
>                 Key: AMBARI-20262
>                 URL: https://issues.apache.org/jira/browse/AMBARI-20262
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.5.0
>            Reporter: Jonathan Hurley
>            Assignee: Jonathan Hurley
>            Priority: Critical
>             Fix For: 2.5.0
>
>
> Currently, Ambari uses Spring's {{ClassPathScanningCandidateComponentProvider}} along with an {{AnnotationTypeFilter}} to find classes annotated in our classpath:
> {code}
>       ClassPathScanningCandidateComponentProvider scanner =
>           new ClassPathScanningCandidateComponentProvider(false);
>       // match only singletons that are eager listeners
>       for (Class<? extends Annotation> cls : classes) {
>         scanner.addIncludeFilter(new AnnotationTypeFilter(cls));
>       }
>       beanDefinitions = scanner.findCandidateComponents(AMBARI_PACKAGE);
> {code}
> This takes roughly 19 seconds on normal deployments. We can reduce this time to roughly 8 seconds by switching over to Google's {{ClassPath}} via our internal {{ClasspathScannerUtils}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)