You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/03/30 08:34:47 UTC

[incubator-servicecomb-java-chassis] branch master updated (ae28a9f -> 38a1d8b)

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git.


    from ae28a9f  SCB-383 subscribe invocation life event and statistics
     new 8620065  SCB-447 cache instances by SPI type
     new 3315da4  SCB-447 modify test cases that are affected by SPI cache.
     new 774787c  SCB-447 delete repeated log
     new 38a1d8b  SCB-447 confirmed with the author, delete useless test case

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../common/rest/TestAbstractRestInvocation.java    |  2 +-
 .../foundation/common/utils/SPIServiceUtils.java   | 90 +++++++++++++++++-----
 ...{SPIServiceDef.java => SPIServiceDef0Impl.java} |  2 +-
 .../common/utils/TestSPIServiceUtils.java          | 23 ++++++
 .../foundation/metrics/MetricsBootstrap.java       |  6 --
 .../consumer/TestMicroserviceManager.java          | 26 -------
 .../core/CompositeSwaggerGeneratorContext.java     |  8 --
 .../response/ResponseMapperFactorys.java           |  7 --
 .../rest/client/http/VertxHttpMethod.java          |  6 --
 .../servlet/TestRestServletProducerInvocation.java |  7 +-
 .../rest/vertx/AbstractVertxHttpDispatcher.java    |  6 --
 .../transport/rest/vertx/RestServerVerticle.java   |  1 -
 12 files changed, 97 insertions(+), 87 deletions(-)
 copy foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/{SPIServiceDef.java => SPIServiceDef0Impl.java} (93%)

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-java-chassis] 04/04: SCB-447 confirmed with the author, delete useless test case

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 38a1d8b42196b2291ceabbeefc767f85fa27f4e9
Author: wujimin <wu...@huawei.com>
AuthorDate: Fri Mar 30 09:41:53 2018 +0800

    SCB-447 confirmed with the author, delete useless test case
---
 .../consumer/TestMicroserviceManager.java          | 26 ----------------------
 1 file changed, 26 deletions(-)

diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/consumer/TestMicroserviceManager.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/consumer/TestMicroserviceManager.java
index c87504c..8a5f236 100644
--- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/consumer/TestMicroserviceManager.java
+++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/consumer/TestMicroserviceManager.java
@@ -90,32 +90,6 @@ public class TestMicroserviceManager {
   }
 
   @Test
-  public void testCreateRuleServiceTooMany() throws Exception {
-    new Expectations(RegistryUtils.class) {
-      {
-        RegistryUtils.findServiceInstances(appId, anyString, DefinitionConst.VERSION_RULE_ALL, null);
-        result = microserviceInstances;
-      }
-    };
-
-    for (int i = 0; i < 1005; i++) {
-      MicroserviceVersionRule microserviceVersionRule =
-          microserviceManager.getOrCreateMicroserviceVersionRule(serviceName + i, versionRule);
-      Assert.assertEquals("0.0.0+", microserviceVersionRule.getVersionRule().getVersionRule());
-      Assert.assertNull(microserviceVersionRule.getLatestMicroserviceVersion());
-      if (i == 499) {
-        Thread.sleep(1);
-      }
-    }
-
-    Assert.assertEquals(1005, cachedVersions.size());
-    Assert.assertEquals("msName1004", cachedVersions.get("msName1004").getMicroserviceName());
-    Assert.assertEquals("msName1000", cachedVersions.get("msName1000").getMicroserviceName());
-    Assert.assertEquals("msName500", cachedVersions.get("msName500").getMicroserviceName());
-    Assert.assertEquals("msName0", cachedVersions.get("msName0").getMicroserviceName());
-  }
-
-  @Test
   public void testCreateRuleServiceNotExists() {
     new Expectations(RegistryUtils.class) {
       {

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-java-chassis] 01/04: SCB-447 cache instances by SPI type

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 862006574e7cd6d4b6abf964378565b1206146a0
Author: wujimin <wu...@huawei.com>
AuthorDate: Thu Mar 29 13:06:55 2018 +0800

    SCB-447 cache instances by SPI type
---
 .../foundation/common/utils/SPIServiceUtils.java   | 90 +++++++++++++++++-----
 .../common/utils/SPIServiceDef0Impl.java           | 22 ++++++
 .../common/utils/TestSPIServiceUtils.java          | 23 ++++++
 3 files changed, 114 insertions(+), 21 deletions(-)

diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/SPIServiceUtils.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/SPIServiceUtils.java
index 5011abe..9cbfc86 100644
--- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/SPIServiceUtils.java
+++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/SPIServiceUtils.java
@@ -22,8 +22,10 @@ import java.util.AbstractMap.SimpleEntry;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 import java.util.ServiceLoader;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
 import org.slf4j.Logger;
@@ -38,31 +40,21 @@ import org.springframework.util.ReflectionUtils;
 public final class SPIServiceUtils {
   private static final Logger LOGGER = LoggerFactory.getLogger(SPIServiceUtils.class);
 
+  // load one service, maybe trigger load another service
+  // computeIfAbsent can not support this feature
+  // so use double check
+  private static final Object LOCK = new Object();
+
+  private static final Map<Class<?>, List<Object>> cache = new ConcurrentHashMap<>();
+
   private SPIServiceUtils() {
 
   }
 
   /**
-   * get target service.if target services are array,only random access to a service.
+   * no cache, return new instances every time.
    */
-  public static <T> T getTargetService(Class<T> serviceType) {
-    ServiceLoader<T> loader = ServiceLoader.load(serviceType);
-    for (T service : loader) {
-      LOGGER.info("get the SPI service success, the extend service is: {}", service.getClass());
-      return service;
-    }
-    LOGGER.info("Can not get the SPI service, the interface type is: {}", serviceType.toString());
-    return null;
-  }
-
-  public static <T> List<T> getAllService(Class<T> serviceType) {
-    List<T> list = new ArrayList<>();
-    ServiceLoader.load(serviceType).forEach(list::add);
-
-    return list;
-  }
-
-  public static <T> List<T> getSortedService(Class<T> serviceType) {
+  public static <T> List<T> loadSortedService(Class<T> serviceType) {
     List<Entry<Integer, T>> serviceEntries = new ArrayList<>();
     ServiceLoader<T> serviceLoader = ServiceLoader.load(serviceType);
     serviceLoader.forEach(service -> {
@@ -76,18 +68,74 @@ public final class SPIServiceUtils {
       serviceEntries.add(entry);
     });
 
-    return serviceEntries.stream()
+    List<T> services = serviceEntries.stream()
         .sorted(Comparator.comparingInt(Entry::getKey))
         .map(Entry::getValue)
         .collect(Collectors.toList());
+
+    LOGGER.info("Found SPI service {}, count={}.", serviceType.getName(), services.size());
+    for (int idx = 0; idx < services.size(); idx++) {
+      T service = services.get(idx);
+      LOGGER.info("  {}. {}.", idx, service.getClass().getName());
+    }
+
+    return services;
+  }
+
+  @SuppressWarnings("unchecked")
+  public static <T> List<T> getOrLoadSortedService(Class<T> serviceType) {
+    List<Object> services = cache.get(serviceType);
+    if (services == null) {
+      synchronized (LOCK) {
+        services = cache.get(serviceType);
+        if (services == null) {
+          services = (List<Object>) loadSortedService(serviceType);
+          cache.put(serviceType, services);
+        }
+      }
+    }
+
+    return (List<T>) services;
+  }
+
+  /**
+   * get target service.if target services are array,only random access to a service.
+   */
+  public static <T> T getTargetService(Class<T> serviceType) {
+    List<T> services = getOrLoadSortedService(serviceType);
+    if (services.isEmpty()) {
+      LOGGER.info("Can not find SPI service for {}", serviceType.getName());
+      return null;
+    }
+
+    return services.get(0);
+  }
+
+  public static <T> List<T> getAllService(Class<T> serviceType) {
+    return getOrLoadSortedService(serviceType);
+  }
+
+  public static <T> List<T> getSortedService(Class<T> serviceType) {
+    return getOrLoadSortedService(serviceType);
   }
 
   public static <T> T getPriorityHighestService(Class<T> serviceType) {
-    List<T> services = getSortedService(serviceType);
+    List<T> services = getOrLoadSortedService(serviceType);
     if (services.isEmpty()) {
+      LOGGER.info("Can not find SPI service for {}", serviceType.getName());
       return null;
     }
 
     return services.get(0);
   }
+
+  @SuppressWarnings("unchecked")
+  public static <T, IMPL> IMPL getTargetService(Class<T> serviceType, Class<IMPL> implType) {
+    List<T> services = getOrLoadSortedService(serviceType);
+    return (IMPL) services
+        .stream()
+        .filter(service -> service.getClass().equals(implType))
+        .findFirst()
+        .orElse(null);
+  }
 }
diff --git a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/SPIServiceDef0Impl.java b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/SPIServiceDef0Impl.java
new file mode 100644
index 0000000..08cd5a3
--- /dev/null
+++ b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/SPIServiceDef0Impl.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.foundation.common.utils;
+
+public class SPIServiceDef0Impl implements SPIServiceDef0 {
+
+}
diff --git a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestSPIServiceUtils.java b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestSPIServiceUtils.java
index 24e81bf..2bb136b 100644
--- a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestSPIServiceUtils.java
+++ b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestSPIServiceUtils.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.foundation.common.utils;
 
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.ServiceLoader;
 
@@ -46,6 +47,19 @@ public class TestSPIServiceUtils {
   public void testGetTargetServiceNotNull() {
     SPIServiceDef service = SPIServiceUtils.getTargetService(SPIServiceDef.class);
     Assert.assertTrue(SPIServiceDef.class.isInstance(service));
+
+    Assert.assertSame(service, SPIServiceUtils.getTargetService(SPIServiceDef.class));
+  }
+
+  @Test
+  public void testGetTargetService_special_null() {
+    Assert.assertNull(SPIServiceUtils.getTargetService(SPIServiceDef0.class, SPIServiceDef0Impl.class));
+  }
+
+  @Test
+  public void testGetTargetService_special_notNull() {
+    SPIServiceDef service = SPIServiceUtils.getTargetService(SPIServiceDef.class, SPIServiceDefImpl.class);
+    Assert.assertTrue(SPIServiceDefImpl.class.isInstance(service));
   }
 
   @Test
@@ -68,6 +82,15 @@ public class TestSPIServiceUtils {
     };
 
     Assert.assertThat(SPIServiceUtils.getSortedService(Ordered.class), Matchers.contains(o1, o2));
+    Assert.assertThat(SPIServiceUtils.getAllService(Ordered.class), Matchers.contains(o1, o2));
     Assert.assertThat(SPIServiceUtils.getPriorityHighestService(Ordered.class), Matchers.is(o1));
+
+    Map<Class<?>, List<Object>> cache = Deencapsulation.getField(SPIServiceUtils.class, "cache");
+    cache.clear();
+  }
+
+  @Test
+  public void getPriorityHighestService_null() {
+    Assert.assertNull(SPIServiceUtils.getPriorityHighestService(SPIServiceDef0.class));
   }
 }

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-java-chassis] 02/04: SCB-447 modify test cases that are affected by SPI cache.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 3315da4664305a13c2d1d87291bedc9a3e954e99
Author: wujimin <wu...@huawei.com>
AuthorDate: Thu Mar 29 15:05:12 2018 +0800

    SCB-447 modify test cases that are affected by SPI cache.
---
 .../apache/servicecomb/common/rest/TestAbstractRestInvocation.java | 2 +-
 .../transport/rest/servlet/TestRestServletProducerInvocation.java  | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
index 363bfab..72d0b13 100644
--- a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
+++ b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
@@ -656,7 +656,7 @@ public class TestAbstractRestInvocation {
     }.getMockInstance();
 
     initRestInvocation();
-    List<HttpServerFilter> httpServerFilters = SPIServiceUtils.getSortedService(HttpServerFilter.class);
+    List<HttpServerFilter> httpServerFilters = SPIServiceUtils.loadSortedService(HttpServerFilter.class);
     httpServerFilters.add(filter);
     restInvocation.setHttpServerFilters(httpServerFilters);
 
diff --git a/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java b/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
index b623fe5..a83480a 100644
--- a/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
+++ b/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
@@ -26,7 +26,6 @@ import org.apache.servicecomb.common.rest.RestProducerInvocation;
 import org.apache.servicecomb.common.rest.definition.RestOperationMeta;
 import org.apache.servicecomb.common.rest.filter.HttpServerFilter;
 import org.apache.servicecomb.core.definition.OperationMeta;
-import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
 import org.apache.servicecomb.foundation.vertx.http.HttpServletRequestEx;
 import org.apache.servicecomb.foundation.vertx.http.StandardHttpServletRequestEx;
 import org.junit.Assert;
@@ -60,7 +59,7 @@ public class TestRestServletProducerInvocation {
     };
 
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = true;
@@ -76,7 +75,7 @@ public class TestRestServletProducerInvocation {
   @Test
   public void collectCacheRequestCacheTrue(@Mocked HttpServerFilter f1) {
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = true;
@@ -90,7 +89,7 @@ public class TestRestServletProducerInvocation {
   @Test
   public void collectCacheRequestCacheFalse(@Mocked HttpServerFilter f1) {
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = false;

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-java-chassis] 03/04: SCB-447 delete repeated log

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 774787c69a41759979d298a058269714555a9831
Author: wujimin <wu...@huawei.com>
AuthorDate: Thu Mar 29 13:08:37 2018 +0800

    SCB-447 delete repeated log
---
 .../apache/servicecomb/foundation/metrics/MetricsBootstrap.java   | 6 ------
 .../swagger/generator/core/CompositeSwaggerGeneratorContext.java  | 8 --------
 .../swagger/invocation/response/ResponseMapperFactorys.java       | 7 -------
 .../servicecomb/transport/rest/client/http/VertxHttpMethod.java   | 6 ------
 .../transport/rest/vertx/AbstractVertxHttpDispatcher.java         | 6 ------
 .../servicecomb/transport/rest/vertx/RestServerVerticle.java      | 1 -
 6 files changed, 34 deletions(-)

diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java
index 2335264..0c6a523 100644
--- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java
+++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java
@@ -22,8 +22,6 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Lists;
 import com.google.common.eventbus.EventBus;
@@ -32,8 +30,6 @@ import com.netflix.spectator.api.CompositeRegistry;
 import com.netflix.spectator.api.Meter;
 
 public class MetricsBootstrap {
-  private static final Logger LOGGER = LoggerFactory.getLogger(MetricsBootstrap.class);
-
   private CompositeRegistry globalRegistry;
 
   private EventBus eventBus;
@@ -60,8 +56,6 @@ public class MetricsBootstrap {
 
   protected void loadMetricsInitializers() {
     SPIServiceUtils.getSortedService(MetricsInitializer.class).forEach(initializer -> {
-      LOGGER.info("Found MetricsInitializer: {}", initializer.getClass().getName());
-
       initializer.init(globalRegistry, eventBus, config);
     });
   }
diff --git a/swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.java b/swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.java
index b69ebba..ef39793 100644
--- a/swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.java
+++ b/swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.java
@@ -20,24 +20,16 @@ package org.apache.servicecomb.swagger.generator.core;
 import java.util.List;
 
 import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.context.EmbeddedValueResolverAware;
 import org.springframework.stereotype.Component;
 import org.springframework.util.StringValueResolver;
 
 @Component
 public class CompositeSwaggerGeneratorContext implements EmbeddedValueResolverAware {
-  private static final Logger LOGGER = LoggerFactory.getLogger(CompositeSwaggerGeneratorContext.class);
-
   private List<SwaggerGeneratorContext> contextList;
 
   public CompositeSwaggerGeneratorContext() {
     contextList = SPIServiceUtils.getSortedService(SwaggerGeneratorContext.class);
-
-    for (SwaggerGeneratorContext context : contextList) {
-      LOGGER.info("Found swagger generator context: {}", context.getClass().getName());
-    }
   }
 
   @Override
diff --git a/swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/ResponseMapperFactorys.java b/swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/ResponseMapperFactorys.java
index 5a9d2c2..92e95c6 100644
--- a/swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/ResponseMapperFactorys.java
+++ b/swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/ResponseMapperFactorys.java
@@ -21,12 +21,8 @@ import java.util.List;
 
 import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
 import org.apache.servicecomb.swagger.invocation.converter.ConverterMgr;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class ResponseMapperFactorys<MAPPER> {
-  private static final Logger LOGGER = LoggerFactory.getLogger(ResponseMapperFactorys.class);
-
   private List<ResponseMapperFactory<MAPPER>> factorys;
 
   public ResponseMapperFactorys(Class<? extends ResponseMapperFactory<MAPPER>> factoryCls, ConverterMgr converterMgr) {
@@ -37,9 +33,6 @@ public class ResponseMapperFactorys<MAPPER> {
   @SuppressWarnings("unchecked")
   public ResponseMapperFactorys(Class<? extends ResponseMapperFactory<MAPPER>> factoryCls) {
     factorys = (List<ResponseMapperFactory<MAPPER>>) SPIServiceUtils.getSortedService(factoryCls);
-    factorys.forEach(factory -> {
-      LOGGER.info("found factory {} of {}:", factory.getClass().getName(), factoryCls.getName());
-    });
   }
 
   public void setConverterMgr(ConverterMgr converterMgr) {
diff --git a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/VertxHttpMethod.java b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/VertxHttpMethod.java
index b97c39c..d4f2aa1 100644
--- a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/VertxHttpMethod.java
+++ b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/VertxHttpMethod.java
@@ -56,12 +56,6 @@ public class VertxHttpMethod {
 
   static List<HttpClientFilter> httpClientFilters = SPIServiceUtils.getSortedService(HttpClientFilter.class);
 
-  static {
-    for (HttpClientFilter filter : httpClientFilters) {
-      LOGGER.info("Found HttpClientFilter: {}.", filter.getClass().getName());
-    }
-  }
-
   public void doMethod(HttpClientWithContext httpClientWithContext, Invocation invocation,
       AsyncResponse asyncResp) throws Exception {
     OperationMeta operationMeta = invocation.getOperationMeta();
diff --git a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/AbstractVertxHttpDispatcher.java b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/AbstractVertxHttpDispatcher.java
index 0634cb6..7999161 100644
--- a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/AbstractVertxHttpDispatcher.java
+++ b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/AbstractVertxHttpDispatcher.java
@@ -35,12 +35,6 @@ public abstract class AbstractVertxHttpDispatcher implements VertxHttpDispatcher
 
   protected List<HttpServerFilter> httpServerFilters = SPIServiceUtils.getSortedService(HttpServerFilter.class);
 
-  public AbstractVertxHttpDispatcher() {
-    for (HttpServerFilter filter : httpServerFilters) {
-      LOGGER.info("Found HttpServerFilter: {}.", filter.getClass().getName());
-    }
-  }
-
   protected BodyHandler createBodyHandler() {
     RestBodyHandler bodyHandler = new RestBodyHandler();
 
diff --git a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/RestServerVerticle.java b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/RestServerVerticle.java
index 6578d72..79739ca 100644
--- a/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/RestServerVerticle.java
+++ b/transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/RestServerVerticle.java
@@ -94,7 +94,6 @@ public class RestServerVerticle extends AbstractVerticle {
   private void initDispatcher(Router mainRouter) {
     List<VertxHttpDispatcher> dispatchers = SPIServiceUtils.getSortedService(VertxHttpDispatcher.class);
     for (VertxHttpDispatcher dispatcher : dispatchers) {
-      LOGGER.info("init vertx http dispatcher {}", dispatcher.getClass().getName());
       dispatcher.init(mainRouter);
     }
   }

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.