ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-20262 - Startup Annotation Scanning Takes Too Long (part2) (jonathanhurley)
Date Thu, 02 Mar 2017 16:54:46 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 843c5f97c -> f8fe522b9


AMBARI-20262 - Startup Annotation Scanning Takes Too Long (part2) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8fe522b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8fe522b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8fe522b

Branch: refs/heads/trunk
Commit: f8fe522b95166f18b93135a7b8cd7ff24d1f0fd9
Parents: 843c5f9
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Thu Mar 2 11:49:21 2017 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Thu Mar 2 11:54:40 2017 -0500

----------------------------------------------------------------------
 .../funtest/server/orm/InMemoryDefaultTestModule.java    | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8fe522b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
index ed78ded..2932f93 100644
--- a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
@@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.ControllerModule;
-import org.springframework.beans.factory.config.BeanDefinition;
 
 import com.google.inject.AbstractModule;
 
@@ -41,17 +40,17 @@ public class InMemoryDefaultTestModule extends AbstractModule {
   private static class BeanDefinitionsCachingTestControllerModule extends ControllerModule
{
 
     // Access should be synchronised to allow concurrent test runs.
-    private static final AtomicReference<Set<BeanDefinition>> foundBeanDefinitions
-        = new AtomicReference<Set<BeanDefinition>>(null);
+    private static final AtomicReference<Set<Class<?>>> matchedAnnotationClasses
= new AtomicReference<>(
+        null);
 
     public BeanDefinitionsCachingTestControllerModule(Properties properties) throws Exception
{
       super(properties);
     }
 
     @Override
-    protected Set<BeanDefinition> bindByAnnotation(Set<BeanDefinition> beanDefinitions)
{
-      Set<BeanDefinition> newBeanDefinitions = super.bindByAnnotation(foundBeanDefinitions.get());
-      foundBeanDefinitions.compareAndSet(null, Collections.unmodifiableSet(newBeanDefinitions));
+    protected Set<Class<?>> bindByAnnotation(Set<Class<?>> matchedClasses)
{
+      Set<Class<?>> newMatchedClasses = super.bindByAnnotation(matchedAnnotationClasses.get());
+      matchedAnnotationClasses.compareAndSet(null, Collections.unmodifiableSet(newMatchedClasses));
       return null;
     }
   }


Mime
View raw message