----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57215/#review167677 -----------------------------------------------------------
Ship it! Ship It! - Nate Cole On March 1, 2017, 3:51 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57215/ > ----------------------------------------------------------- > > (Updated March 1, 2017, 3:51 p.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 > ----- > > > 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/orm/InMemoryDefaultTestModule.java > 3090108 > > > Diff: https://reviews.apache.org/r/57215/diff/1/ > > > Testing > ------- > > PENDING > > > Thanks, > > Jonathan Hurley > >