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 2019/01/30 01:12:47 UTC
[servicecomb-java-chassis] branch master updated: [SCB-1136] change
default settings of sync executor
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/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 7b40fa7 [SCB-1136] change default settings of sync executor
7b40fa7 is described below
commit 7b40fa71f889b38b1698bb3811f8995c0c40f0dc
Author: wujimin <wu...@huawei.com>
AuthorDate: Mon Jan 28 16:24:22 2019 +0800
[SCB-1136] change default settings of sync executor
---
...FixedThreadExecutor.java => GroupExecutor.java} | 68 ++++++++--
.../main/resources/META-INF/spring/cse.bean.xml | 4 +-
.../org/apache/servicecomb/core/TestExecutors.java | 61 ---------
.../core/executor/TestGroupExecutor.java | 146 +++++++++++++++++++++
.../producer/TestProducerProviderManager.java | 4 +-
.../test/resources/META-INF/spring/cse.bean.xml | 2 +-
demo/perf/src/main/resources/microservice.yaml | 2 +-
.../src/test/resources/microservice.yaml | 2 +-
.../metrics/core/ThreadPoolMetersInitializer.java | 12 +-
.../core/TestThreadPoolMetersInitializer.java | 25 ++--
.../transport/common/TransportConfigUtils.java | 2 +-
.../transport/common/TestTransportConfigUtils.java | 2 +-
12 files changed, 232 insertions(+), 98 deletions(-)
diff --git a/core/src/main/java/org/apache/servicecomb/core/executor/FixedThreadExecutor.java b/core/src/main/java/org/apache/servicecomb/core/executor/GroupExecutor.java
similarity index 52%
rename from core/src/main/java/org/apache/servicecomb/core/executor/FixedThreadExecutor.java
rename to core/src/main/java/org/apache/servicecomb/core/executor/GroupExecutor.java
index 8ea95df..cf0c8e7 100644
--- a/core/src/main/java/org/apache/servicecomb/core/executor/FixedThreadExecutor.java
+++ b/core/src/main/java/org/apache/servicecomb/core/executor/GroupExecutor.java
@@ -23,7 +23,9 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
@@ -32,13 +34,32 @@ import org.slf4j.LoggerFactory;
import com.netflix.config.DynamicPropertyFactory;
-public class FixedThreadExecutor implements Executor, Closeable {
- private static final Logger LOGGER = LoggerFactory.getLogger(FixedThreadExecutor.class);
+public class GroupExecutor implements Executor, Closeable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(GroupExecutor.class);
public static final String KEY_GROUP = "servicecomb.executor.default.group";
+ // Deprecated
public static final String KEY_THREAD = "servicecomb.executor.default.thread-per-group";
+ public static final String KEY_CORE_THREADS = "servicecomb.executor.default.coreThreads-per-group";
+
+ public static final String KEY_MAX_THREADS = "servicecomb.executor.default.maxThreads-per-group";
+
+ public static final String KEY_MAX_IDLE_SECOND = "servicecomb.executor.default.maxIdleSecond-per-group";
+
+ public static final String KEY_MAX_QUEUE_SIZE = "servicecomb.executor.default.maxQueueSize-per-group";
+
+ protected int groupCount;
+
+ protected int coreThreads;
+
+ protected int maxThreads;
+
+ protected int maxIdleInSecond;
+
+ protected int maxQueueSize;
+
// to avoid multiple network thread conflicted when put tasks to executor queue
private List<ExecutorService> executorList = new ArrayList<>();
@@ -48,16 +69,43 @@ public class FixedThreadExecutor implements Executor, Closeable {
private Map<Long, Executor> threadExecutorMap = new ConcurrentHashMapEx<>();
- public FixedThreadExecutor() {
- int groupCount = DynamicPropertyFactory.getInstance().getIntProperty(KEY_GROUP, 2).get();
- int threadPerGroup = DynamicPropertyFactory.getInstance()
- .getIntProperty(KEY_THREAD, Runtime.getRuntime().availableProcessors())
- .get();
- LOGGER.info("executor group {}, thread per group {}.", groupCount, threadPerGroup);
+ public void init() {
+ initConfig();
for (int groupIdx = 0; groupIdx < groupCount; groupIdx++) {
- executorList.add(Executors.newFixedThreadPool(threadPerGroup));
+ ThreadPoolExecutor executor = new ThreadPoolExecutor(coreThreads,
+ maxThreads,
+ maxIdleInSecond,
+ TimeUnit.SECONDS,
+ new LinkedBlockingQueue<>(maxQueueSize));
+ executorList.add(executor);
+ }
+ }
+
+ public void initConfig() {
+ groupCount = DynamicPropertyFactory.getInstance().getIntProperty(KEY_GROUP, 2).get();
+ coreThreads = DynamicPropertyFactory.getInstance().getIntProperty(KEY_CORE_THREADS, 25).get();
+
+ maxThreads = DynamicPropertyFactory.getInstance().getIntProperty(KEY_MAX_THREADS, -1).get();
+ if (maxThreads <= 0) {
+ maxThreads = DynamicPropertyFactory.getInstance().getIntProperty(KEY_THREAD, -1).get();
+ if (maxThreads > 0) {
+ LOGGER.warn("{} is deprecated, recommended to use {}.", KEY_THREAD, KEY_MAX_THREADS);
+ } else {
+ maxThreads = 100;
+ }
}
+ if (coreThreads > maxThreads) {
+ LOGGER.warn("coreThreads is bigger than maxThreads, change from {} to {}.", coreThreads, maxThreads);
+ coreThreads = maxThreads;
+ }
+
+ maxIdleInSecond = DynamicPropertyFactory.getInstance().getIntProperty(KEY_MAX_IDLE_SECOND, 60).get();
+ maxQueueSize = DynamicPropertyFactory.getInstance().getIntProperty(KEY_MAX_QUEUE_SIZE, Integer.MAX_VALUE).get();
+
+ LOGGER.info(
+ "executor group={}. per group settings, coreThreads={}, maxThreads={}, maxIdleInSecond={}, maxQueueSize={}.",
+ groupCount, coreThreads, maxThreads, maxIdleInSecond, maxQueueSize);
}
public List<ExecutorService> getExecutorList() {
diff --git a/core/src/main/resources/META-INF/spring/cse.bean.xml b/core/src/main/resources/META-INF/spring/cse.bean.xml
index 0ecef58..36a285c 100644
--- a/core/src/main/resources/META-INF/spring/cse.bean.xml
+++ b/core/src/main/resources/META-INF/spring/cse.bean.xml
@@ -30,9 +30,11 @@
<bean class="org.apache.servicecomb.core.CseApplicationListener">
</bean>
- <bean id="cse.executor.groupThreadPool" class="org.apache.servicecomb.core.executor.FixedThreadExecutor"/>
+ <bean id="cse.executor.groupThreadPool" class="org.apache.servicecomb.core.executor.GroupExecutor"
+ init-method="init"/>
<alias name="cse.executor.groupThreadPool" alias="cse.executor.default"/>
<alias name="cse.executor.groupThreadPool" alias="servicecomb.executor.groupThreadPool"/>
+
<bean id="cse.executor.reactive" class="org.apache.servicecomb.core.executor.ReactiveExecutor"/>
<alias name="cse.executor.reactive" alias="servicecomb.executor.reactive"/>
</beans>
diff --git a/core/src/test/java/org/apache/servicecomb/core/TestExecutors.java b/core/src/test/java/org/apache/servicecomb/core/TestExecutors.java
deleted file mode 100644
index 22f933c..0000000
--- a/core/src/test/java/org/apache/servicecomb/core/TestExecutors.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.core;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Executor;
-
-import org.apache.servicecomb.core.executor.FixedThreadExecutor;
-import org.apache.servicecomb.core.executor.ReactiveExecutor;
-import org.junit.Assert;
-import org.junit.Test;
-
-import mockit.Deencapsulation;
-
-public class TestExecutors {
-
- String strThreadTest = "default";
-
- @Test
- public void testFixedThreadExecutor() {
- FixedThreadExecutor oFixedThreadExecutor = new FixedThreadExecutor();
- oFixedThreadExecutor.execute(new Runnable() {
-
- @Override
- public void run() {
-
- }
- });
- Map<Long, Executor> threadExecutorMap = Deencapsulation.getField(oFixedThreadExecutor, "threadExecutorMap");
- Assert.assertEquals(true, (threadExecutorMap.size() > 0));
-
- List<Executor> executorList = Deencapsulation.getField(oFixedThreadExecutor, "executorList");
- Assert.assertEquals(true, (executorList.size() > 1));
-
- ReactiveExecutor oReactiveExecutor = new ReactiveExecutor();
- oReactiveExecutor.execute(new Runnable() {
- @Override
- public void run() {
- strThreadTest = "thread Ran";
- }
- });
- oReactiveExecutor.close();
- Assert.assertEquals("thread Ran", strThreadTest);
- }
-}
diff --git a/core/src/test/java/org/apache/servicecomb/core/executor/TestGroupExecutor.java b/core/src/test/java/org/apache/servicecomb/core/executor/TestGroupExecutor.java
new file mode 100644
index 0000000..a5dd87a
--- /dev/null
+++ b/core/src/test/java/org/apache/servicecomb/core/executor/TestGroupExecutor.java
@@ -0,0 +1,146 @@
+/*
+ * 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.core.executor;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Executor;
+
+import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
+import org.apache.servicecomb.foundation.test.scaffolding.log.LogCollector;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import mockit.Deencapsulation;
+
+public class TestGroupExecutor {
+ String strThreadTest = "default";
+
+ @Before
+ public void setup() {
+ ArchaiusUtils.resetConfig();
+ }
+
+ @AfterClass
+ public static void teardown() {
+ ArchaiusUtils.resetConfig();
+ }
+
+ GroupExecutor groupExecutor = new GroupExecutor();
+
+ @Test
+ public void groupCount() {
+ groupExecutor.initConfig();
+ Assert.assertEquals(2, groupExecutor.groupCount);
+
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_GROUP, 4);
+ groupExecutor.initConfig();
+ Assert.assertEquals(4, groupExecutor.groupCount);
+ }
+
+ @Test
+ public void coreThreads() {
+ groupExecutor.initConfig();
+ Assert.assertEquals(25, groupExecutor.coreThreads);
+
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_CORE_THREADS, 100);
+ groupExecutor.initConfig();
+ Assert.assertEquals(100, groupExecutor.coreThreads);
+ }
+
+ @Test
+ public void maxIdleInSecond() {
+ groupExecutor.initConfig();
+ Assert.assertEquals(60, groupExecutor.maxIdleInSecond);
+
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_MAX_IDLE_SECOND, 100);
+ groupExecutor.initConfig();
+ Assert.assertEquals(100, groupExecutor.maxIdleInSecond);
+ }
+
+ @Test
+ public void maxQueueSize() {
+ groupExecutor.initConfig();
+ Assert.assertEquals(Integer.MAX_VALUE, groupExecutor.maxQueueSize);
+
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_MAX_QUEUE_SIZE, 100);
+ groupExecutor.initConfig();
+ Assert.assertEquals(100, groupExecutor.maxQueueSize);
+ }
+
+ @Test
+ public void maxThreads() {
+ groupExecutor.initConfig();
+ Assert.assertEquals(100, groupExecutor.maxThreads);
+
+ LogCollector collector = new LogCollector();
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_THREAD, 200);
+ groupExecutor.initConfig();
+ Assert.assertEquals(200, groupExecutor.maxThreads);
+ Assert.assertEquals(
+ "servicecomb.executor.default.thread-per-group is deprecated, recommended to use servicecomb.executor.default.maxThreads-per-group.",
+ collector.getEvents().get(collector.getEvents().size() - 2).getMessage());
+ collector.teardown();
+
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_MAX_THREADS, 300);
+ groupExecutor.initConfig();
+ Assert.assertEquals(300, groupExecutor.maxThreads);
+ }
+
+ @Test
+ public void adjustCoreThreads() {
+ ArchaiusUtils.setProperty(GroupExecutor.KEY_MAX_THREADS, 10);
+
+ LogCollector collector = new LogCollector();
+ groupExecutor.initConfig();
+ Assert.assertEquals(10, groupExecutor.maxThreads);
+ Assert.assertEquals(
+ "coreThreads is bigger than maxThreads, change from 25 to 10.",
+ collector.getEvents().get(collector.getEvents().size() - 2).getMessage());
+ collector.teardown();
+ }
+
+ @Test
+ public void testGroupExecutor() {
+ groupExecutor.init();
+ groupExecutor.execute(new Runnable() {
+
+ @Override
+ public void run() {
+
+ }
+ });
+ Map<Long, Executor> threadExecutorMap = Deencapsulation.getField(groupExecutor, "threadExecutorMap");
+ Assert.assertEquals(true, (threadExecutorMap.size() > 0));
+
+ List<Executor> executorList = Deencapsulation.getField(groupExecutor, "executorList");
+ Assert.assertEquals(true, (executorList.size() > 1));
+
+ ReactiveExecutor oReactiveExecutor = new ReactiveExecutor();
+ oReactiveExecutor.execute(new Runnable() {
+ @Override
+ public void run() {
+ strThreadTest = "thread Ran";
+ }
+ });
+ oReactiveExecutor.close();
+ Assert.assertEquals("thread Ran", strThreadTest);
+ }
+}
diff --git a/core/src/test/java/org/apache/servicecomb/core/provider/producer/TestProducerProviderManager.java b/core/src/test/java/org/apache/servicecomb/core/provider/producer/TestProducerProviderManager.java
index 943183a..ee1d71b 100644
--- a/core/src/test/java/org/apache/servicecomb/core/provider/producer/TestProducerProviderManager.java
+++ b/core/src/test/java/org/apache/servicecomb/core/provider/producer/TestProducerProviderManager.java
@@ -27,7 +27,7 @@ import org.apache.servicecomb.core.BootListener.BootEvent;
import org.apache.servicecomb.core.BootListener.EventType;
import org.apache.servicecomb.core.definition.MicroserviceMeta;
import org.apache.servicecomb.core.definition.OperationMeta;
-import org.apache.servicecomb.core.executor.FixedThreadExecutor;
+import org.apache.servicecomb.core.executor.GroupExecutor;
import org.apache.servicecomb.foundation.test.scaffolding.log.LogCollector;
import org.junit.Assert;
import org.junit.Test;
@@ -62,7 +62,7 @@ public class TestProducerProviderManager {
@Test
public void onBootEvent_close(@Mocked MicroserviceMeta microserviceMeta, @Mocked OperationMeta op1,
- @Mocked OperationMeta op2, @Mocked FixedThreadExecutor closeable) {
+ @Mocked OperationMeta op2, @Mocked GroupExecutor closeable) {
AtomicInteger count = new AtomicInteger();
ExecutorService executorService = new MockUp<ExecutorService>() {
@Mock
diff --git a/core/src/test/resources/META-INF/spring/cse.bean.xml b/core/src/test/resources/META-INF/spring/cse.bean.xml
index be3d6d6..3040f28 100644
--- a/core/src/test/resources/META-INF/spring/cse.bean.xml
+++ b/core/src/test/resources/META-INF/spring/cse.bean.xml
@@ -23,6 +23,6 @@
<bean class="org.apache.servicecomb.core.CseApplicationListener">
</bean>
- <bean id="servicecomb.executor.default" class="org.apache.servicecomb.core.executor.FixedThreadExecutor"></bean>
+ <bean id="servicecomb.executor.default" class="org.apache.servicecomb.core.executor.GroupExecutor"></bean>
<bean id="servicecomb.executor.reactive" class="org.apache.servicecomb.core.executor.ReactiveExecutor"></bean>
</beans>
diff --git a/demo/perf/src/main/resources/microservice.yaml b/demo/perf/src/main/resources/microservice.yaml
index cb7c108..67e02f0 100644
--- a/demo/perf/src/main/resources/microservice.yaml
+++ b/demo/perf/src/main/resources/microservice.yaml
@@ -40,7 +40,7 @@ servicecomb:
executor:
default:
group: 4
- thread-per-group: 4
+ maxThreads-per-group: 4
references:
transport: highway
metrics:
diff --git a/integration-tests/tracing-tests/src/test/resources/microservice.yaml b/integration-tests/tracing-tests/src/test/resources/microservice.yaml
index b12e81a..0c84924 100644
--- a/integration-tests/tracing-tests/src/test/resources/microservice.yaml
+++ b/integration-tests/tracing-tests/src/test/resources/microservice.yaml
@@ -38,4 +38,4 @@ servicecomb:
address: http://localhost:9411
executor:
default:
- thread-per-group: 10
\ No newline at end of file
+ maxThreads-per-group: 10
\ No newline at end of file
diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/ThreadPoolMetersInitializer.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/ThreadPoolMetersInitializer.java
index 621fd0f..df59fbe 100644
--- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/ThreadPoolMetersInitializer.java
+++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/ThreadPoolMetersInitializer.java
@@ -25,7 +25,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import org.apache.servicecomb.core.SCBEngine;
import org.apache.servicecomb.core.definition.MicroserviceMeta;
import org.apache.servicecomb.core.definition.OperationMeta;
-import org.apache.servicecomb.core.executor.FixedThreadExecutor;
+import org.apache.servicecomb.core.executor.GroupExecutor;
import org.apache.servicecomb.foundation.common.utils.BeanUtils;
import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig;
import org.apache.servicecomb.foundation.metrics.MetricsInitializer;
@@ -56,8 +56,8 @@ public class ThreadPoolMetersInitializer implements MetricsInitializer {
continue;
}
- if (FixedThreadExecutor.class.isInstance(executor)) {
- createThreadPoolMeters(entry.getKey(), (FixedThreadExecutor) executor);
+ if (GroupExecutor.class.isInstance(executor)) {
+ createThreadPoolMeters(entry.getKey(), (GroupExecutor) executor);
continue;
}
@@ -75,9 +75,9 @@ public class ThreadPoolMetersInitializer implements MetricsInitializer {
return operationExecutors;
}
- protected void createThreadPoolMeters(String threadPoolName, FixedThreadExecutor fixedThreadExecutor) {
- for (int idx = 0; idx < fixedThreadExecutor.getExecutorList().size(); idx++) {
- Executor executor = fixedThreadExecutor.getExecutorList().get(idx);
+ protected void createThreadPoolMeters(String threadPoolName, GroupExecutor groupExecutor) {
+ for (int idx = 0; idx < groupExecutor.getExecutorList().size(); idx++) {
+ Executor executor = groupExecutor.getExecutorList().get(idx);
createThreadPoolMeters(threadPoolName + "-group" + idx, executor);
}
}
diff --git a/metrics/metrics-core/src/test/java/org/apache/servicecomb/metrics/core/TestThreadPoolMetersInitializer.java b/metrics/metrics-core/src/test/java/org/apache/servicecomb/metrics/core/TestThreadPoolMetersInitializer.java
index 4942ccf..cd43f30 100644
--- a/metrics/metrics-core/src/test/java/org/apache/servicecomb/metrics/core/TestThreadPoolMetersInitializer.java
+++ b/metrics/metrics-core/src/test/java/org/apache/servicecomb/metrics/core/TestThreadPoolMetersInitializer.java
@@ -32,7 +32,7 @@ import org.apache.servicecomb.core.CseContext;
import org.apache.servicecomb.core.SCBEngine;
import org.apache.servicecomb.core.definition.MicroserviceMeta;
import org.apache.servicecomb.core.definition.OperationMeta;
-import org.apache.servicecomb.core.executor.FixedThreadExecutor;
+import org.apache.servicecomb.core.executor.GroupExecutor;
import org.apache.servicecomb.foundation.common.utils.BeanUtils;
import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry;
import org.hamcrest.Matchers;
@@ -64,14 +64,13 @@ public class TestThreadPoolMetersInitializer {
BlockingQueue<Runnable> queue;
@Mocked
- FixedThreadExecutor fixedThreadExecutor;
+ GroupExecutor groupExecutor;
ExecutorService executor = Mockito.mock(ExecutorService.class);
@Mocked
ApplicationContext applicationContext;
-
@Mocked
MicroserviceMeta microserviceMeta;
@@ -94,7 +93,7 @@ public class TestThreadPoolMetersInitializer {
};
Map<String, Executor> beanExecutors = new HashMap<>();
beanExecutors.put("executor", executor);
- beanExecutors.put("fixedThreadExecutor", fixedThreadExecutor);
+ beanExecutors.put("groupExecutor", groupExecutor);
beanExecutors.put("threadPoolExecutor", threadPoolExecutor);
new Expectations(BeanUtils.class) {
{
@@ -115,9 +114,9 @@ public class TestThreadPoolMetersInitializer {
operationMetaSameExecutor.getExecutor();
result = executor;
operationMetaFixedThreadExecutor.getExecutor();
- result = fixedThreadExecutor;
+ result = groupExecutor;
- fixedThreadExecutor.getExecutorList();
+ groupExecutor.getExecutorList();
result = Arrays.asList(threadPoolExecutor);
queue.size();
@@ -142,12 +141,12 @@ public class TestThreadPoolMetersInitializer {
});
Assert.assertThat(result,
- Matchers.containsInAnyOrder("[Measurement(threadpool.maxThreads:id=fixedThreadExecutor-group0,0,0.0)]",
- "[Measurement(threadpool.completedTaskCount:id=fixedThreadExecutor-group0,0,0.0)]",
- "[Measurement(threadpool.currentThreadsBusy:id=fixedThreadExecutor-group0,0,0.0)]",
- "[Measurement(threadpool.corePoolSize:id=fixedThreadExecutor-group0,0,0.0)]",
- "[Measurement(threadpool.poolSize:id=fixedThreadExecutor-group0,0,0.0)]",
- "[Measurement(threadpool.queueSize:id=fixedThreadExecutor-group0,0,10.0)]",
- "[Measurement(threadpool.taskCount:id=fixedThreadExecutor-group0,0,0.0)]"));
+ Matchers.containsInAnyOrder("[Measurement(threadpool.maxThreads:id=groupExecutor-group0,0,0.0)]",
+ "[Measurement(threadpool.completedTaskCount:id=groupExecutor-group0,0,0.0)]",
+ "[Measurement(threadpool.currentThreadsBusy:id=groupExecutor-group0,0,0.0)]",
+ "[Measurement(threadpool.corePoolSize:id=groupExecutor-group0,0,0.0)]",
+ "[Measurement(threadpool.poolSize:id=groupExecutor-group0,0,0.0)]",
+ "[Measurement(threadpool.queueSize:id=groupExecutor-group0,0,10.0)]",
+ "[Measurement(threadpool.taskCount:id=groupExecutor-group0,0,0.0)]"));
}
}
diff --git a/transports/transport-common/src/main/java/org/apache/servicecomb/transport/common/TransportConfigUtils.java b/transports/transport-common/src/main/java/org/apache/servicecomb/transport/common/TransportConfigUtils.java
index 8445b99..2278fb6 100644
--- a/transports/transport-common/src/main/java/org/apache/servicecomb/transport/common/TransportConfigUtils.java
+++ b/transports/transport-common/src/main/java/org/apache/servicecomb/transport/common/TransportConfigUtils.java
@@ -37,7 +37,7 @@ public final class TransportConfigUtils {
count = DynamicPropertyFactory.getInstance().getIntProperty(deprecatedKey, -1).get();
if (count > 0) {
- LOGGER.warn("{} is ambiguous, and deprecated, suggest to use {}.", deprecatedKey, key);
+ LOGGER.warn("{} is ambiguous, and deprecated, recommended to use {}.", deprecatedKey, key);
return count;
}
diff --git a/transports/transport-common/src/test/java/org/apache/servicecomb/transport/common/TestTransportConfigUtils.java b/transports/transport-common/src/test/java/org/apache/servicecomb/transport/common/TestTransportConfigUtils.java
index be3f5ef..843c9d5 100644
--- a/transports/transport-common/src/test/java/org/apache/servicecomb/transport/common/TestTransportConfigUtils.java
+++ b/transports/transport-common/src/test/java/org/apache/servicecomb/transport/common/TestTransportConfigUtils.java
@@ -56,7 +56,7 @@ public class TestTransportConfigUtils {
LogCollector collector = new LogCollector();
Assert.assertEquals(10, TransportConfigUtils.readVerticleCount(key, deprecatedKey));
- Assert.assertEquals("thread-count is ambiguous, and deprecated, suggest to use verticle-count.",
+ Assert.assertEquals("thread-count is ambiguous, and deprecated, recommended to use verticle-count.",
collector.getEvents().get(0).getMessage());
collector.teardown();
}