svn commit: r26907 - /dev/incubator/dubbo/2.6.2/
Author: liujun Date: Tue May 15 03:18:10 2018 New Revision: 26907 Log: Repackage for release Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.asc dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.md5 dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.sha512 dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.asc dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.md5 dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.sha512 Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip == Binary files - no diff available. Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.asc == --- dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.asc (original) +++ dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.asc Tue May 15 03:18:10 2018 @@ -1,17 +1,17 @@ -BEGIN PGP SIGNATURE- Version: GnuPG v2 -iQIcBAABCAAGBQJa9BqjAAoJEFLmEDMoaByxpdQP/1ScWpVmxQ98O1CP7/nFdios -aqwzBKI1HHl+jmbq3nScJDAqxuhenf/Sh5Y+OJpEIJVLzpf72ZNcUoO/+7DHiv6s -seHCukrJJoe1cSIkehay724CyrD3OReUoXIw5pOCuHDG/1rWj6SG5Mxrv6i5ePIZ -gVhb9Nd5c0iC+PEi/mANoKIrXdhVp70YGVG8/N6kBJIyI3kgaqc4NJfhPEwMCj5m -R3YR63wTJ5al13pSufPFDWbSZq2LvRhZtIx0iFUJnpD2pp7AiwoHTCKWlv28RCfC -Z/7YhU8fEkJ6/UUc6ynuQBQOf72PT4L9zCex/ft1esBWEpSRpPQ1V7q6m3huzAdM -wW/H803YP/upFRGdP0CqCiAQhr8/MvcPXDqjptqaaafIpg9cfnKD2qXl1brOG7XK -qsWsHC5+Wl101Qggd1blsZDPNEO0gVMlJq7RLcy0imH8yoHlakqWlZr67JXdA3sJ -gUYwCNL3hwXG1Nrd4ZcH4AYOUL0SeLv7SsV2pEatWg9KMeWLTQNoGFEhI7y9I4vm -uZw1QD4y1bB8EcWNRYuIQwA0zMbzDPMXnv8ZTiiBqm/nQhvLmX8mAz9ed3HrYvRO -JYRwi2ewvXkiIpCSekIROq/1cj+JIRPBvDUTFnxcVoGTLn06U8S9SsiudtYjy9zS -Y6azBY7dONa6k9fgr1VV -=kuE4 +iQIcBAABCAAGBQJa+Xt7AAoJEFLmEDMoaByxlewP/iJSY6aRyONLYa1qFcxgIfZJ +27HGmLKovL12I4zrtmHeuhMc2qgE6h+XwsAv809Y7jNlLRBoY7/JyL8kG5AjFkuu +HC1EoS9SKQBnNMLDnJgdsMzBoQXh8Y3r2UYF3RT4M/BivsaVDYd1L54pPjmcFg0D +JDvil5HM8PZpY3hqJhB+07TXC/bXJYp1sMuHlCzuuMsxExLZpEfUCbwYUhhADaJm +T0yVd72F+QSjtuwo37uxj1JpK9D51K8/pirjO2GJhoM0Lx4RHPl8GzWEkF/CYDBt +03StuBQZm+ObxmmgE3ZxwOSEpwn/tSrrqS9ki6KJQV99dp4issaGBHoAj9PyF/qV +54Iszr7WC96lZqConty1fndXl/Ke+g48ig58cImWSssFgvOit8k4PH+DITO92AZq +qSBi3CVe/DaMX/4AwgdHMDSDVEPzwvqoS+xEMGX1VLIdvGHkT3cCLM1X+DeCY7W7 +9CVeAMcku7iVU6HBE4SKIJH/fUdBFDPy/qx02bk+fd8lAVssgUaR8BcztVA9sojZ +im78kZ1GTUxhRuvfjdvrgUvChB6yx3peTz9+YxUpP36s3zYpqy/HGy0ANxeQDw1S +r5bxgIHmz5TL7wVBfT+njA53MWyEh1MvnjiFgbJuTo7k+eHSmPNa9xMj3qt6vm0L +IETsYKFBWGPvgwKRbpWP +=Yp80 -END PGP SIGNATURE- Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.md5 == --- dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.md5 (original) +++ dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.md5 Tue May 15 03:18:10 2018 @@ -1 +1 @@ -c110c7b35077534cfe38f0059ad366c0 +MD5 (dubbo-incubating-2.6.2-bin-release.zip) = 4ebfbb71a014d61be63e8b4a993db4d6 Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.sha512 == --- dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.sha512 (original) +++ dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-bin-release.zip.sha512 Tue May 15 03:18:10 2018 @@ -1 +1 @@ -e7a140d64db8127a9e55e4cc42a0db4d75a3748c4d6ca1620f402ae2999c470fe7f80c2237b37314db011912e355ef0ba0cab6a8fa6cc860a7d53e8ed4e01788 dubbo-incubating-2.6.2-bin-release.zip +d8a6a0f321121030ae007ef269787cc06c2ea8c0368c7faa2565eb50c979c092c0443fd4ed41ebf5173b7cec32b7cf729cbd05eafd77912b35424ad723e886a0 dubbo-incubating-2.6.2-bin-release.zip Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip == Binary files - no diff available. Modified: dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.asc == --- dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.asc (original) +++ dev/incubator/dubbo/2.6.2/dubbo-incubating-2.6.2-source-release.zip.asc Tue May 15 03:18:10 2018 @@ -1,17 +1,17 @@ -BEGIN PGP SIGNATURE- Version: GnuPG v2 -iQIcBAABCAAGBQJa4sE7AAoJEFLmEDMoaByxQP8P/RqnRhKh3kgJX+L87RpSd0+S -Lxc8qaEAIPOt9KY3xUGYfQrh8DGIw/1etmV3dF5H5KQ7M86xuXlyz2PIx9dtdeZ/ -0ZBBJksYOqOfAOUzhcoewxN+7XKqH1LykHekWSshE+borQLBZemC+Y4NK3sFvOKp -NkZF2XaIl1ZDDeCsu7l4Cx9k3Kn4Tk+Y2tG5kd1649mY8qZIhfvV9Xo850yehmiy -nbpBpEQ4FaS9q/SR+aOBK8qSB6UDe4WN6x6A2MA4KNTmjIGkPubPql+xX7i+6gB8
[incubator-dubbo-spring-boot-project] 01/01: Merge pull request #133 from ralf0131/java10-ut
This is an automated email from the ASF dual-hosted git repository. mercyblitz pushed a commit to branch 0.1.x in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-spring-boot-project.git commit 79a6cdf486849896b1d2cd0e031e96020bd284ba Merge: 2993cbd 84e80dc Author: 小马哥AuthorDate: Tue May 15 10:34:44 2018 +0800 Merge pull request #133 from ralf0131/java10-ut Ensure UT pass on Java 10. #128 dubbo-spring-boot-parent/pom.xml | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact mercybl...@apache.org.
[incubator-dubbo] branch master updated: New threadLocal provides more performance. (#1745)
This is an automated email from the ASF dual-hosted git repository. iluo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/master by this push: new 04eacfe New threadLocal provides more performance. (#1745) 04eacfe is described below commit 04eacfeac7e4e25d3c2f0a2de12fa05708ee6b59 Author: 时无两丶 <442367...@qq.com> AuthorDate: Tue May 15 10:08:45 2018 +0800 New threadLocal provides more performance. (#1745) * SerializerFactory 获取Serializer时,锁住整个hashmap,导致整个过程被block * 单元测试。保证一个class只有一个serializer和deserializer。单线程和多线程测试 * 增加线程数 50 模拟多个线程来获取serializer和deserializer * 当cores线程数全都使用的情况下,默认线程池会把任务放入到队列中。队列满则再创建线程(总数不会超过Max线程数) 增强线程池:在请求量阶段性出现高峰时使用 特性:cores线程全部使用的情况下,优先创建线程(总数不会超过max),当max个线程全都在忙的情况下,才将任务放入队列。请求量下降时,线程池会自动维持cores个线程,多余的线程退出。 * 当cores线程数全都使用的情况下,默认线程池会把任务放入到队列中。队列满则再创建线程(总数不会超过Max线程数) 增强线程池:在请求量阶段性出现高峰时使用 特性:cores线程全部使用的情况下,优先创建线程(总数不会超过max),当max个线程全都在忙的情况下,才将任务放入队列。请求量下降时,线程池会自动维持cores个线程,多余的线程退出。 * 补全单元测试,测试扩展是否生效 * 错误命名 * 增加@Override注解 long 初始化赋值时,小写l改为大写L防止误读 * 修复单元测试 * remove enhanced * remove enhanced * Faster ThreadLocal impl in internal use * Used in RpcContext`s LOCAL field. * Faster get than the traditional ThreadLocal * add License * fix ci failed * fix ci failed * fix ci failed * fix ci failed * fix ci failed * remove author info * fix destroy method * fix bug at method size. --- .../dubbo/common/threadlocal/InternalThread.java | 73 .../common/threadlocal/InternalThreadLocal.java| 197 + .../common/threadlocal/InternalThreadLocalMap.java | 168 ++ .../threadlocal/NamedInternalThreadFactory.java| 47 + .../support/cached/CachedThreadPool.java | 5 +- .../threadpool/support/eager/EagerThreadPool.java | 4 +- .../threadpool/support/fixed/FixedThreadPool.java | 4 +- .../support/limited/LimitedThreadPool.java | 4 +- .../dubbo/common/utils/NamedThreadFactory.java | 11 +- .../threadlocal/InternalThreadLocalTest.java | 173 ++ .../java/com/alibaba/dubbo/rpc/RpcContext.java | 7 +- 11 files changed, 678 insertions(+), 15 deletions(-) diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/threadlocal/InternalThread.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/threadlocal/InternalThread.java new file mode 100644 index 000..a836561 --- /dev/null +++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/threadlocal/InternalThread.java @@ -0,0 +1,73 @@ +/* + * 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 com.alibaba.dubbo.common.threadlocal; + +/** + * InternalThread + */ +public class InternalThread extends Thread { + +private InternalThreadLocalMap threadLocalMap; + +public InternalThread() { +} + +public InternalThread(Runnable target) { +super(target); +} + +public InternalThread(ThreadGroup group, Runnable target) { +super(group, target); +} + +public InternalThread(String name) { +super(name); +} + +public InternalThread(ThreadGroup group, String name) { +super(group, name); +} + +public InternalThread(Runnable target, String name) { +super(target, name); +} + +public InternalThread(ThreadGroup group, Runnable target, String name) { +super(group, target, name); +} + +public InternalThread(ThreadGroup group, Runnable target, String name, long stackSize) { +super(group, target, name, stackSize); +} + +/** + * Returns the internal data structure that keeps the threadLocal variables bound to this thread. + * Note that this method is for internal use only, and thus is subject to change at any time. + */ +public final InternalThreadLocalMap threadLocalMap() { +return threadLocalMap; +} + +/** + * Sets the internal data structure that keeps the threadLocal variables bound to this thread. +
[incubator-dubbo] branch master updated: unit test for com.alibaba.dubbo.common.status.support (#1796)
This is an automated email from the ASF dual-hosted git repository. iluo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/master by this push: new 6f3fcab unit test for com.alibaba.dubbo.common.status.support (#1796) 6f3fcab is described below commit 6f3fcabae5fc53bad69b65a20687d77e58ab0ee1 Author: Ian LuoAuthorDate: Tue May 15 09:59:15 2018 +0800 unit test for com.alibaba.dubbo.common.status.support (#1796) * unit test for Status * remove unnecessary 'static' * unit test for StatusUtils * unit test for LoadStatusChecker * reformat the code * unit test for MemoryStatusChecker --- .../com/alibaba/dubbo/common/status/Status.java| 2 +- .../common/status/support/LoadStatusChecker.java | 3 +- .../alibaba/dubbo/common/status/StatusTest.java| 52 .../status/support/LoadStatusCheckerTest.java | 39 .../status/support/MemoryStatusCheckerTest.java| 42 + .../common/status/support/StatusUtilsTest.java | 71 ++ 6 files changed, 207 insertions(+), 2 deletions(-) diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/Status.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/Status.java index 940e17f..ad598c9 100644 --- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/Status.java +++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/Status.java @@ -54,7 +54,7 @@ public class Status { /** * Level */ -public static enum Level { +public enum Level { /** * OK */ diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/support/LoadStatusChecker.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/support/LoadStatusChecker.java index 018bce7..20715c5 100644 --- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/support/LoadStatusChecker.java +++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/support/LoadStatusChecker.java @@ -41,7 +41,8 @@ public class LoadStatusChecker implements StatusChecker { load = -1; } int cpu = operatingSystemMXBean.getAvailableProcessors(); -return new Status(load < 0 ? Status.Level.UNKNOWN : (load < cpu ? Status.Level.OK : Status.Level.WARN), (load < 0 ? "" : "load:" + load + ",") + "cpu:" + cpu); +return new Status(load < 0 ? Status.Level.UNKNOWN : (load < cpu ? Status.Level.OK : Status.Level.WARN), +(load < 0 ? "" : "load:" + load + ",") + "cpu:" + cpu); } } diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/status/StatusTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/status/StatusTest.java new file mode 100644 index 000..bc8e531 --- /dev/null +++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/status/StatusTest.java @@ -0,0 +1,52 @@ +/* + * 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 com.alibaba.dubbo.common.status; + +import org.junit.Test; + +import static com.alibaba.dubbo.common.status.Status.Level.OK; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.isEmptyOrNullString; +import static org.junit.Assert.assertThat; + +public class StatusTest { +@Test +public void testConstructor1() throws Exception { +Status status = new Status(OK, "message", "description"); +assertThat(status.getLevel(), is(OK)); +assertThat(status.getMessage(), equalTo("message")); +assertThat(status.getDescription(), equalTo("description")); +} + +@Test +public void testConstructor2() throws Exception { +Status status = new Status(OK, "message"); +assertThat(status.getLevel(), is(OK)); +assertThat(status.getMessage(), equalTo("message")); +assertThat(status.getDescription(), isEmptyOrNullString()); +} + +@Test +public void testConstructor3() throws Exception { +Status status = new Status(OK); +
[incubator-dubbo.wiki] branch master updated: Add Dubbo Beijing meetup slides.
This is an automated email from the ASF dual-hosted git repository. huxing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.wiki.git The following commit(s) were added to refs/heads/master by this push: new 343ad8d Add Dubbo Beijing meetup slides. 343ad8d is described below commit 343ad8d43e79d2f55d6730d4d9da23280a155e25 Author: Huxing ZhangAuthorDate: Mon May 14 22:31:26 2018 +0800 Add Dubbo Beijing meetup slides. --- Home.md | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index ef731bb..471490f 100644 --- a/Home.md +++ b/Home.md @@ -4,9 +4,14 @@ Please visit [the official web site](https://dubbo.apache.org) for more informat ## News +* [2018-5-12] The first Dubbo meetup has successfully been held in Beijing, over 400+ people were present. What a great event! Please enjoy the slides of the topics: + * Ian Luo: Dubbo's present and future (Chinese) [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/meetup/201805%40Beijing/dubbo-present-and-future.pdf) + * Jun Liu: Introduction to the 4th Aliware Performance Challenge (Chinese) [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/meetup/201805%40Beijing/introduction-to-4th-aliware-performance-challenge.pdf) + * Zhixuan Chen: Quickly building Microservice with Dubbo and Spring-boot (Chinese) [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/meetup/201805%40Beijing/quickly-building-microservice-with-dubbo-and-springboot.pdf) + * Xin Wang: Dubbo and Weidian's Practice on Microservice Architecture (Chinese) [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/meetup/201805%40Beijing/dubbo-and-weidian's-practice-on-microservice-architecture.pdf) * [2018-5-2] Ian Luo(PPMC) and Jun Liu(PPMC) will talk about "Introducing Apache Dubbo(Incubating): What is Dubbo and How it Works" at ApacheCon NA this year in Montréal! Please check out the schedule [here](https://apachecon.dukecon.org/acna/2018/#/scheduledEvent/b8db9dc580d85853f) and register [here](https://www.eventbrite.com/e/apachecon-north-america-2018-registration-43200327342). * [2018-4-25] The GSoC(Google Summer of Code) 2018 projects has been announced, Raghu Reddy's project "Extending Serialization protocols support for Apache Dubbo" has been [accepted](https://summerofcode.withgoogle.com/projects/#4747840161579008)! Congratulations! -* [2018-4-22] Ian Luo has delivered a great talk at QCon Beijing 2018, where the roadmap of Dubbo has also be announced. Please enjoy the [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/dubbo-present-and-future.pdf)! +* [2018-4-22] Ian Luo has delivered a great talk at QCon Beijing 2018, where the roadmap of Dubbo has also be announced. Please enjoy the [slides](https://github.com/dubbo/awesome-dubbo/raw/master/slides/qcon2018/dubbo-present-and-future.pdf)! * [2018-4-12] The schedule of LinuxCon + ContainerCon + CloudOpen China has been announced, and we are glad to have [Jun Liu](https://github.com/chickenlj) (Dubbo PPMC) to talk about ["Dubbo Open-Sourcing - Present and the Future"](https://www.lfasiallc.com/events/lc3-2018/program/schedule/) * [2018-4-11] [Ian Luo](https://github.com/beiwei30) (Dubbo PPMC) will talk about the present and future of Dubbo in [QCon Beijing](https://2018.qconbeijing.com/presentation/403) * [2018-4-10] [Spring Cloud Sleuth](https://github.com/spring-cloud/spring-cloud-sleuth) (a distributed tracing solution for Spring Cloud) now officially [supports](https://cloud.spring.io/spring-cloud-sleuth/single/spring-cloud-sleuth.html#_dubbo_rpc_support) Dubbo! -- To stop receiving notification emails like this one, please contact hux...@apache.org.
[incubator-dubbo] 02/02: [maven-release-plugin] prepare release dubbo-2.6.2
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch 2.6.2-release in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git commit afab04c53edab38d52275d2a198ea1aff7a4f41e Author: ken.ljAuthorDate: Mon May 14 21:25:19 2018 +0800 [maven-release-plugin] prepare release dubbo-2.6.2 --- all/pom.xml| 6 +++--- bom/pom.xml| 6 +++--- dependencies-bom/pom.xml | 4 ++-- dubbo-cluster/pom.xml | 2 +- dubbo-common/pom.xml | 4 ++-- dubbo-config/dubbo-config-api/pom.xml | 2 +- dubbo-config/dubbo-config-spring/pom.xml | 2 +- dubbo-config/pom.xml | 2 +- dubbo-container/dubbo-container-api/pom.xml| 2 +- dubbo-container/dubbo-container-log4j/pom.xml | 2 +- dubbo-container/dubbo-container-logback/pom.xml| 2 +- dubbo-container/dubbo-container-spring/pom.xml | 2 +- dubbo-container/pom.xml| 2 +- dubbo-demo/dubbo-demo-api/pom.xml | 2 +- dubbo-demo/dubbo-demo-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-provider/pom.xml | 2 +- dubbo-demo/pom.xml | 2 +- dubbo-filter/dubbo-filter-cache/pom.xml| 2 +- dubbo-filter/dubbo-filter-validation/pom.xml | 2 +- dubbo-filter/pom.xml | 2 +- dubbo-monitor/dubbo-monitor-api/pom.xml| 2 +- dubbo-monitor/dubbo-monitor-default/pom.xml| 2 +- dubbo-monitor/pom.xml | 2 +- dubbo-plugin/dubbo-qos/pom.xml | 2 +- dubbo-plugin/pom.xml | 2 +- dubbo-registry/dubbo-registry-api/pom.xml | 2 +- dubbo-registry/dubbo-registry-default/pom.xml | 2 +- dubbo-registry/dubbo-registry-multicast/pom.xml| 2 +- dubbo-registry/dubbo-registry-redis/pom.xml| 2 +- dubbo-registry/dubbo-registry-zookeeper/pom.xml| 2 +- dubbo-registry/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-api/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-grizzly/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-http/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-mina/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-netty/pom.xml| 2 +- dubbo-remoting/dubbo-remoting-netty4/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-p2p/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-zookeeper/pom.xml| 2 +- dubbo-remoting/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-api/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-dubbo/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-hessian/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-http/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-injvm/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-memcached/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-redis/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-rest/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-rmi/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-thrift/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-webservice/pom.xml | 2 +- dubbo-rpc/pom.xml | 2 +- dubbo-serialization/dubbo-serialization-api/pom.xml| 4 ++-- dubbo-serialization/dubbo-serialization-fastjson/pom.xml | 2 +- dubbo-serialization/dubbo-serialization-fst/pom.xml| 2 +- dubbo-serialization/dubbo-serialization-hessian2/pom.xml | 4 ++-- dubbo-serialization/dubbo-serialization-jdk/pom.xml| 4 ++-- dubbo-serialization/dubbo-serialization-kryo/pom.xml | 2 +- dubbo-serialization/pom.xml| 2 +- dubbo-test/dubbo-test-benchmark/pom.xml| 2 +- dubbo-test/dubbo-test-compatibility/dubbo-test-spring3/pom.xml | 2 +- dubbo-test/dubbo-test-compatibility/pom.xml| 2 +- dubbo-test/dubbo-test-examples/pom.xml | 2 +- dubbo-test/dubbo-test-integration/pom.xml | 2 +- dubbo-test/pom.xml
[incubator-dubbo] annotated tag dubbo-2.6.2 updated (afab04c -> 5462c8a)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a change to annotated tag dubbo-2.6.2 in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git. *** WARNING: tag dubbo-2.6.2 was modified! *** from afab04c (commit) to 5462c8a (tag) tagging afab04c53edab38d52275d2a198ea1aff7a4f41e (commit) replaces dubbo-2.6.1 by ken.lj on Mon May 14 21:25:28 2018 +0800 - Log - [maven-release-plugin] copy for tag dubbo-2.6.2 --- No new revisions were added by this update. Summary of changes: -- To stop receiving notification emails like this one, please contact liu...@apache.org.
[incubator-dubbo] annotated tag dubbo-2.6.2 deleted (was 8784c2f)
This is an automated email from the ASF dual-hosted git repository. liujun pushed a change to annotated tag dubbo-2.6.2 in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git. *** WARNING: tag dubbo-2.6.2 was deleted! *** tag was 8784c2f The revisions that were on this annotated tag are still contained in other references; therefore, this change does not discard any commits from the repository. -- To stop receiving notification emails like this one, please contact liu...@apache.org.
[incubator-dubbo] branch 2.6.2-release updated: Bump version to 2.6.2-SNAPSHOT
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch 2.6.2-release in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/2.6.2-release by this push: new 944d520 Bump version to 2.6.2-SNAPSHOT 944d520 is described below commit 944d5208b46de46a509a8c3c0242b37fdee38c8e Author: ken.ljAuthorDate: Mon May 14 20:46:53 2018 +0800 Bump version to 2.6.2-SNAPSHOT --- all/pom.xml| 4 +-- bom/pom.xml| 4 +-- dependencies-bom/pom.xml | 2 +- distribution/pom.xml | 2 +- dubbo-cluster/pom.xml | 2 +- dubbo-common/pom.xml | 2 +- dubbo-config/dubbo-config-api/pom.xml | 2 +- dubbo-config/dubbo-config-spring/pom.xml | 2 +- dubbo-config/pom.xml | 2 +- dubbo-container/dubbo-container-api/pom.xml| 2 +- dubbo-container/dubbo-container-log4j/pom.xml | 2 +- dubbo-container/dubbo-container-logback/pom.xml| 2 +- dubbo-container/dubbo-container-spring/pom.xml | 2 +- dubbo-container/pom.xml| 2 +- dubbo-demo/dubbo-demo-api/pom.xml | 2 +- dubbo-demo/dubbo-demo-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-provider/pom.xml | 2 +- dubbo-demo/pom.xml | 2 +- dubbo-filter/dubbo-filter-cache/pom.xml| 2 +- dubbo-filter/dubbo-filter-validation/pom.xml | 2 +- dubbo-filter/pom.xml | 2 +- dubbo-monitor/dubbo-monitor-api/pom.xml| 2 +- dubbo-monitor/dubbo-monitor-default/pom.xml| 2 +- dubbo-monitor/pom.xml | 2 +- dubbo-plugin/dubbo-qos/pom.xml | 2 +- dubbo-plugin/pom.xml | 2 +- dubbo-registry/dubbo-registry-api/pom.xml | 2 +- dubbo-registry/dubbo-registry-default/pom.xml | 2 +- dubbo-registry/dubbo-registry-multicast/pom.xml| 2 +- dubbo-registry/dubbo-registry-redis/pom.xml| 2 +- dubbo-registry/dubbo-registry-zookeeper/pom.xml| 2 +- dubbo-registry/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-api/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-grizzly/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-http/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-mina/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-netty/pom.xml| 2 +- dubbo-remoting/dubbo-remoting-netty4/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-p2p/pom.xml | 2 +- dubbo-remoting/dubbo-remoting-zookeeper/pom.xml| 2 +- dubbo-remoting/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-api/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-dubbo/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-hessian/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-http/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-injvm/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-memcached/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-redis/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-rest/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-rmi/pom.xml| 2 +- dubbo-rpc/dubbo-rpc-thrift/pom.xml | 2 +- dubbo-rpc/dubbo-rpc-webservice/pom.xml | 2 +- dubbo-rpc/pom.xml | 2 +- .../dubbo-serialization-api/pom.xml| 2 +- .../dubbo-serialization-fastjson/pom.xml | 2 +- .../dubbo-serialization-fst/pom.xml| 2 +- .../dubbo-serialization-hessian2/pom.xml | 2 +- .../dubbo-serialization-jdk/pom.xml| 2 +- .../dubbo-serialization-kryo/pom.xml | 2 +- dubbo-serialization/pom.xml| 2 +- dubbo-test/dubbo-test-benchmark/pom.xml| 2 +- .../dubbo-test-spring3/pom.xml | 2 +- dubbo-test/dubbo-test-compatibility/pom.xml| 2 +- dubbo-test/dubbo-test-examples/pom.xml | 2 +- dubbo-test/dubbo-test-integration/pom.xml | 2 +- dubbo-test/pom.xml | 2 +- hessian-lite/pom.xml | 2 +- pom.xml| 38 -- 68 files changed, 82 insertions(+), 94 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 0c8b56d..10d6264 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -20,11 +20,11 @@ com.alibaba dubbo-parent -2.6.2 +2.6.2-SNAPSHOT ../pom.xml dubbo -2.6.2 +2.6.2-SNAPSHOT jar dubbo-all The all in one project
[incubator-dubbo] branch 2.6.2-release updated: Support package NOTICE & LICENSE into sub-module jar.
This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch 2.6.2-release in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/2.6.2-release by this push: new 7c90490 Support package NOTICE & LICENSE into sub-module jar. 7c90490 is described below commit 7c90490f3855d95e507ee9598b2caf8876208fc1 Author: ken.ljAuthorDate: Mon May 14 20:20:35 2018 +0800 Support package NOTICE & LICENSE into sub-module jar. --- distribution/pom.xml | 89 ++ distribution/src/assembly/release-bin.xml | 21 + .../dubbo/internal/com.alibaba.dubbo.rpc.Protocol | 2 +- pom.xml| 52 - 4 files changed, 58 insertions(+), 106 deletions(-) diff --git a/distribution/pom.xml b/distribution/pom.xml index 555d119..a7b53bb 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -35,295 +35,216 @@ com.alibaba dubbo-cluster ${project.version} -compile -true com.alibaba dubbo-common ${project.version} -compile -true com.alibaba dubbo-config-api ${project.version} -compile -true com.alibaba dubbo-config-spring ${project.version} -compile -true com.alibaba dubbo-filter-cache ${project.version} -compile -true com.alibaba dubbo-filter-validation ${project.version} -compile -true com.alibaba dubbo-remoting-api ${project.version} -compile -true com.alibaba dubbo-remoting-netty ${project.version} -compile -true com.alibaba dubbo-remoting-netty4 ${project.version} -compile -true com.alibaba dubbo-remoting-mina ${project.version} -compile -true com.alibaba dubbo-remoting-grizzly ${project.version} -compile -true com.alibaba dubbo-remoting-p2p ${project.version} -compile -true com.alibaba dubbo-remoting-http ${project.version} -compile -true com.alibaba dubbo-rpc-api ${project.version} -compile -true com.alibaba dubbo-rpc-dubbo ${project.version} -compile -true com.alibaba dubbo-rpc-injvm ${project.version} -compile -true com.alibaba dubbo-rpc-rmi ${project.version} -compile -true com.alibaba dubbo-rpc-hessian ${project.version} -compile -true com.alibaba dubbo-rpc-http ${project.version} -compile -true com.alibaba dubbo-rpc-webservice ${project.version} -compile -true com.alibaba dubbo-rpc-thrift ${project.version} -compile -true com.alibaba dubbo-rpc-memcached ${project.version} -compile -true com.alibaba dubbo-rpc-redis ${project.version} -compile -true com.alibaba dubbo-rpc-rest ${project.version} -compile -true com.alibaba dubbo-registry-api ${project.version} -compile -true com.alibaba dubbo-registry-default ${project.version} -compile -true com.alibaba dubbo-registry-multicast ${project.version} -compile -
[incubator-dubbo-docs] branch master updated: Modify corrupted links and xml schema (#28)
This is an automated email from the ASF dual-hosted git repository. huxing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-docs.git The following commit(s) were added to refs/heads/master by this push: new c9611a2 Modify corrupted links and xml schema (#28) c9611a2 is described below commit c9611a247836a408bf03606e302ed7c08afac7f0 Author: nzomkxiaAuthorDate: Mon May 14 17:21:27 2018 +0800 Modify corrupted links and xml schema (#28) --- dubbo-admin-book-en/install/admin-console.md | 2 +- dubbo-admin-book-en/install/redis.md | 2 +- dubbo-admin-book/install/admin-console.md | 2 +- dubbo-admin-book/install/redis.md | 2 +- dubbo-user-book-en/benchmark-tool.md | 4 +++- dubbo-user-book-en/configuration/xml.md | 8 dubbo-user-book-en/demos/multi-protocols.md | 8 dubbo-user-book-en/demos/multi-registry.md| 16 dubbo-user-book-en/quick-start.md | 8 dubbo-user-book-en/references/registry/simple.md | 4 ++-- dubbo-user-book-en/references/xml/introduction.md | 2 +- dubbo-user-book-en/simple-monitor.md | 8 dubbo-user-book/benchmark-tool.md | 4 +++- dubbo-user-book/configuration/xml.md | 8 dubbo-user-book/demos/multi-protocols.md | 8 dubbo-user-book/demos/multi-registry.md | 16 dubbo-user-book/quick-start.md| 8 dubbo-user-book/references/registry/simple.md | 4 ++-- dubbo-user-book/references/xml/introduction.md| 2 +- dubbo-user-book/simple-monitor.md | 8 20 files changed, 64 insertions(+), 60 deletions(-) diff --git a/dubbo-admin-book-en/install/admin-console.md b/dubbo-admin-book-en/install/admin-console.md index 516a4f6..7f2a743 100644 --- a/dubbo-admin-book-en/install/admin-console.md +++ b/dubbo-admin-book-en/install/admin-console.md @@ -5,7 +5,7 @@ Include: route rule, dynamic configuration, service downgrade, access control, w Install: ```sh -wget http://apache.etoak.com/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz +wget https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz tar zxvf apache-tomcat-6.0.35.tar.gz cd apache-tomcat-6.0.35 rm -rf webapps/ROOT diff --git a/dubbo-admin-book-en/install/redis.md b/dubbo-admin-book-en/install/redis.md index ce48780..2a1f4c7 100644 --- a/dubbo-admin-book-en/install/redis.md +++ b/dubbo-admin-book-en/install/redis.md @@ -11,7 +11,7 @@ Redis configuration center cluster [^2] write multiple server in client side and Install: ```sh -wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz +wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/redis/redis-2.4.8.tar.gz tar xzf redis-2.4.8.tar.gz cd redis-2.4.8 make diff --git a/dubbo-admin-book/install/admin-console.md b/dubbo-admin-book/install/admin-console.md index d93f0f7..bdaf303 100644 --- a/dubbo-admin-book/install/admin-console.md +++ b/dubbo-admin-book/install/admin-console.md @@ -5,7 +5,7 @@ 安装: ```sh -wget http://apache.etoak.com/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz +wget https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz tar zxvf apache-tomcat-6.0.35.tar.gz cd apache-tomcat-6.0.35 rm -rf webapps/ROOT diff --git a/dubbo-admin-book/install/redis.md b/dubbo-admin-book/install/redis.md index b7b518c..fe46707 100644 --- a/dubbo-admin-book/install/redis.md +++ b/dubbo-admin-book/install/redis.md @@ -11,7 +11,7 @@ Redis 注册中心集群 [^2] 采用在客户端同时写入多个服务器, 安装: ```sh -wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz +wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/redis/redis-2.4.8.tar.gz tar xzf redis-2.4.8.tar.gz cd redis-2.4.8 make diff --git a/dubbo-user-book-en/benchmark-tool.md b/dubbo-user-book-en/benchmark-tool.md index e74d781..b64112e 100644 --- a/dubbo-user-book-en/benchmark-tool.md +++ b/dubbo-user-book-en/benchmark-tool.md @@ -1,6 +1,8 @@ # Beanchmark testing tool installer -Download the [benchmark installer](http://code.alibabatech.com/wiki/download/attachments/7669075/dubbo.benchmark-2.0.14.tar.gz),and unzip it +* download: git clone https://github.com/apache/incubator-dubbo.git +* compile benchmark: cd incubator-dubbo/dubbo-test/dubbo-test-benchmark; mvn clean install +* uncompress benchmark: incubator-dubbo/dubbo-test/dubbo-test-benchmark/target/dubbo-test-benchmark-2.6.2-SNAPSHOT.tar.gz Read ReadMe.txt (the contents are as follows, in the compressed package.) diff --git a/dubbo-user-book-en/configuration/xml.md b/dubbo-user-book-en/configuration/xml.md index 99e5973..6789ffc 100644 --- a/dubbo-user-book-en/configuration/xml.md +++
[incubator-dubbo] branch master updated: Extracting public code to the parent class (#1776)
This is an automated email from the ASF dual-hosted git repository. iluo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/master by this push: new ddc1ea4 Extracting public code to the parent class (#1776) ddc1ea4 is described below commit ddc1ea4149d3e6879be21a55981f4ccb5ad14920 Author: 苏承祥 <1142819...@qq.com> AuthorDate: Mon May 14 16:05:42 2018 +0800 Extracting public code to the parent class (#1776) * Extracting public code to the parent class * test --- .../remoting/transport/dispatcher/WrappedChannelHandler.java | 8 .../remoting/transport/dispatcher/all/AllChannelHandler.java | 8 .../dispatcher/connection/ConnectionOrderedChannelHandler.java | 10 ++ .../dispatcher/execution/ExecutionChannelHandler.java | 4 +++- .../dispatcher/message/MessageOnlyChannelHandler.java | 5 + .../dubbo/remoting/transport/netty/ClientReconnectTest.java| 1 + 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/WrappedChannelHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/WrappedChannelHandler.java index 42ed71c..71f4999 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/WrappedChannelHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/WrappedChannelHandler.java @@ -109,4 +109,12 @@ public class WrappedChannelHandler implements ChannelHandlerDelegate { return url; } +public ExecutorService getExecutorService() { +ExecutorService cexecutor = executor; +if (cexecutor == null || cexecutor.isShutdown()) { +cexecutor = SHARED_EXECUTOR; +} +return cexecutor; +} + } diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/all/AllChannelHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/all/AllChannelHandler.java index 9e5b331..d44f065 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/all/AllChannelHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/all/AllChannelHandler.java @@ -88,12 +88,4 @@ public class AllChannelHandler extends WrappedChannelHandler { throw new ExecutionException("caught event", channel, getClass() + " error when process caught event .", t); } } - -private ExecutorService getExecutorService() { -ExecutorService cexecutor = executor; -if (cexecutor == null || cexecutor.isShutdown()) { -cexecutor = SHARED_EXECUTOR; -} -return cexecutor; -} } diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/connection/ConnectionOrderedChannelHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/connection/ConnectionOrderedChannelHandler.java index 1b162d5..fb432a8 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/connection/ConnectionOrderedChannelHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/dispatcher/connection/ConnectionOrderedChannelHandler.java @@ -75,10 +75,7 @@ public class ConnectionOrderedChannelHandler extends WrappedChannelHandler { @Override public void received(Channel channel, Object message) throws RemotingException { -ExecutorService cexecutor = executor; -if (cexecutor == null || cexecutor.isShutdown()) { -cexecutor = SHARED_EXECUTOR; -} +ExecutorService cexecutor = getExecutorService(); try { cexecutor.execute(new ChannelEventRunnable(channel, handler, ChannelState.RECEIVED, message)); } catch (Throwable t) { @@ -100,10 +97,7 @@ public class ConnectionOrderedChannelHandler extends WrappedChannelHandler { @Override public void caught(Channel channel, Throwable exception) throws RemotingException { -ExecutorService cexecutor = executor; -if (cexecutor == null || cexecutor.isShutdown()) { -cexecutor = SHARED_EXECUTOR; -} +ExecutorService cexecutor = getExecutorService(); try { cexecutor.execute(new ChannelEventRunnable(channel, handler, ChannelState.CAUGHT, exception)); } catch (Throwable t) { diff --git
[incubator-dubbo] branch master updated: add test for monitor module (#1741)
This is an automated email from the ASF dual-hosted git repository. iluo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git The following commit(s) were added to refs/heads/master by this push: new 322add3 add test for monitor module (#1741) 322add3 is described below commit 322add3243aaa92f7d56cf68377ff065326337fa Author: Huang YunKunAuthorDate: Mon May 14 15:48:41 2018 +0800 add test for monitor module (#1741) --- .../support/AbstractMonitorFactoryTest.java| 2 +- .../dubbo/monitor/support/MonitorFilterTest.java | 37 - .../monitor/dubbo/DubboMonitorFactoryTest.java | 67 .../dubbo/monitor/dubbo/DubboMonitorTest.java | 83 ++- .../dubbo/monitor/dubbo/StatisticsTest.java| 93 ++ 5 files changed, 277 insertions(+), 5 deletions(-) diff --git a/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/AbstractMonitorFactoryTest.java b/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/AbstractMonitorFactoryTest.java index cc19f5a..64847af 100644 --- a/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/AbstractMonitorFactoryTest.java +++ b/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/AbstractMonitorFactoryTest.java @@ -21,7 +21,7 @@ import com.alibaba.dubbo.common.utils.NetUtils; import com.alibaba.dubbo.monitor.Monitor; import com.alibaba.dubbo.monitor.MonitorFactory; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; import java.util.List; diff --git a/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/MonitorFilterTest.java b/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/MonitorFilterTest.java index 5b8a303..3450eb4 100644 --- a/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/MonitorFilterTest.java +++ b/dubbo-monitor/dubbo-monitor-api/src/test/java/com/alibaba/dubbo/monitor/support/MonitorFilterTest.java @@ -28,15 +28,21 @@ import com.alibaba.dubbo.rpc.Result; import com.alibaba.dubbo.rpc.RpcContext; import com.alibaba.dubbo.rpc.RpcException; import com.alibaba.dubbo.rpc.RpcInvocation; - -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; +import org.mockito.Mockito; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Arrays; import java.util.List; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; + /** * MonitorFilterTest */ @@ -126,6 +132,20 @@ public class MonitorFilterTest { } @Test +public void testSkipMonitorIfNotHasKey() { +MonitorFilter monitorFilter = new MonitorFilter(); +MonitorFactory mockMonitorFactory = mock(MonitorFactory.class); +monitorFilter.setMonitorFactory(mockMonitorFactory); +Invocation invocation = new RpcInvocation("aaa", new Class[0], new Object[0]); +Invoker invoker = mock(Invoker.class); +given(invoker.getUrl()).willReturn(URL.valueOf("dubbo://" + NetUtils.getLocalHost() + ":20880?" + Constants.APPLICATION_KEY + "=abc&" + Constants.SIDE_KEY + "=" + Constants.CONSUMER_SIDE)); + +monitorFilter.invoke(invoker, invocation); + +verify(mockMonitorFactory, never()).getMonitor(any(URL.class)); +} + +@Test public void testGenericFilter() throws Exception { MonitorFilter monitorFilter = new MonitorFilter(); monitorFilter.setMonitorFactory(monitorFactory); @@ -147,4 +167,17 @@ public class MonitorFilterTest { Assert.assertEquals(invocation, lastInvocation); } +@Test +public void testSafeFailForMonitorCollectFail() { +MonitorFilter monitorFilter = new MonitorFilter(); +MonitorFactory mockMonitorFactory = mock(MonitorFactory.class); +Monitor mockMonitor = mock(Monitor.class); +Mockito.doThrow(new RuntimeException()).when(mockMonitor).collect(any(URL.class)); + +monitorFilter.setMonitorFactory(mockMonitorFactory); + given(mockMonitorFactory.getMonitor(any(URL.class))).willReturn(mockMonitor); +Invocation invocation = new RpcInvocation("aaa", new Class[0], new Object[0]); + +monitorFilter.invoke(serviceInvoker, invocation); +} } diff --git a/dubbo-monitor/dubbo-monitor-default/src/test/java/com/alibaba/dubbo/monitor/dubbo/DubboMonitorFactoryTest.java b/dubbo-monitor/dubbo-monitor-default/src/test/java/com/alibaba/dubbo/monitor/dubbo/DubboMonitorFactoryTest.java new file mode 100644 index 000..759a0d9 --- /dev/null +++