----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57215/ -----------------------------------------------------------
(Updated March 2, 2017, 10:48 a.m.) Review request for Ambari, Nate Cole and Robert Levas. Bugs: AMBARI-20262 https://issues.apache.org/jira/browse/AMBARI-20262 Repository: ambari Description ------- Currently, Ambari uses Spring's {{ClassPathScanningCandidateComponentProvider}} along with an {{AnnotationTypeFilter}} to find classes annotated in our classpath: ``` 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); ``` 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}} Diffs (updated) ----- ambari-server/src/main/java/org/apache/ambari/server/audit/AuditLoggerModule.java d8b8466 ambari-server/src/main/java/org/apache/ambari/server/cleanup/ClasspathScannerUtils.java 01487f0 ambari-server/src/main/java/org/apache/ambari/server/cleanup/CleanupModule.java d2a7583 ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java 8646e51 ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java 40c7e50 ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java 4d609b4 ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java a4f6469 ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java 3090108 Diff: https://reviews.apache.org/r/57215/diff/2/ Changes: https://reviews.apache.org/r/57215/diff/1-2/ Testing (updated) ------- mvn clean test Thanks, Jonathan Hurley