[GitHub] [servicecomb-website] WillemJiang commented on issue #163: add customized-tracing-with-servicecomb of user guide
WillemJiang commented on issue #163: add customized-tracing-with-servicecomb of user guide URL: https://github.com/apache/servicecomb-website/pull/163#issuecomment-483502619 You can take #162 and https://github.com/apache/servicecomb-website/commit/463ead1c8ee5dc01288e5d9717b632915f0efd4d as sample. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-website] bettermanzzy commented on issue #163: add customized-tracing-with-servicecomb of user guide
bettermanzzy commented on issue #163: add customized-tracing-with-servicecomb of user guide URL: https://github.com/apache/servicecomb-website/pull/163#issuecomment-483502193 OK ,I will put the picture as soon as possible. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-website] branch asf-site updated: Fixed the image link issue of blog
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git The following commit(s) were added to refs/heads/asf-site by this push: new 463ead1 Fixed the image link issue of blog new 48b88c9 Merge branch 'master' into asf-site 463ead1 is described below commit 463ead1c8ee5dc01288e5d9717b632915f0efd4d Author: Willem Jiang AuthorDate: Tue Apr 16 11:54:24 2019 +0800 Fixed the image link issue of blog --- ...2019-01-22-servicecomb-springcloud-zuul-demo.md | 24 +++--- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_posts/cn/2019-01-22-servicecomb-springcloud-zuul-demo.md b/_posts/cn/2019-01-22-servicecomb-springcloud-zuul-demo.md index 70f0c2d..b323278 100644 --- a/_posts/cn/2019-01-22-servicecomb-springcloud-zuul-demo.md +++ b/_posts/cn/2019-01-22-servicecomb-springcloud-zuul-demo.md @@ -16,7 +16,7 @@ redirect_from: ### 场景 本文将以一个简单的Hello服务演示网关的使用。Hello微服务提供一个hello/{name}接口,只要传递路径参数name就可以返回打招呼内容。接口返回结果通过网关将在浏览器界面显示 -![在这里插入图片描述](../../assets/images/zuul/demo-theory.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-theory.png) ### 技术准备 [ServiceComb](http://servicecomb.apache.org/cn/docs/quick-start/) 作为后端微服务核心框架 @@ -35,13 +35,13 @@ redirect_from: ServiceCenter安装 下载地址:http://mirrors.hust.edu.cn/apache/servicecomb/servicecomb-service-center/1.1.0/apache-servicecomb-service-center-1.1.0-windows-amd64.tar.gz 下载后解压如下 -![在这里插入图片描述](../../assets/images/zuul/demo-dir.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-dir.png) 在该目录下双击service-center.exe即可启动,命令窗口中出现如下信息基本代表ServiceCenter启动成功,从这个信息也可以得知ServiceCenter监听的是30100端口,等下配置文件要用到。 -![在这里插入图片描述](../../assets/images/zuul/demo-servicecenter-console1.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-servicecenter-console1.png) 问题点: 有可能会有如下信息,这个一般是端口被占用,很可能你打开了两个ServiceCenter,都关闭后再打开就可以了。 -![在这里插入图片描述](../../assets/images/zuul/demo-servicecenter-console2.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-servicecenter-console2.png) @@ -171,7 +171,7 @@ public class HelloController { # 4. 启动 到此,一个微服务就写完了,如下在IDEA里面直接启动应用 -![在这里插入图片描述](../../assets/images/zuul/demo-helloservice-start.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-helloservice-start.png) @@ -196,21 +196,21 @@ public class HelloController { spring-boot-starter 1.5.12.RELEASE - + org.apache.servicecomb spring-boot-starter-servicecomb 1.1.0 - + org.apache.servicecomb spring-boot-starter-discovery 1.1.0 - + org.apache.servicecomb @@ -267,7 +267,7 @@ servicecomb: ``` # 3.项目入口 -新建启动类 ZuulApplication.java +新建启动类 ZuulApplication.java ```java package com.servicecomb.example; @@ -343,14 +343,14 @@ public class ZuulApplication { ``` # 4. 启动 到此,网关服务器写完,如下在IDEA里面直接启动应用 -![在这里插入图片描述](../../assets/images/zuul/demo-zuulservice-start.jpg) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-zuulservice-start.jpg) 三. 演示效果 浏览器访问http://localhost:8080/ ,如下图。 在输入框中输入姓名,就可以在下面看到打招呼的信息 -![在这里插入图片描述](../../assets/images/zuul/demo-run.png) +![在这里插入图片描述]({{ site.url }}{{ site.baseurl }}/assets/images/zuul/demo-run.png) ### 总结 @@ -359,4 +359,4 @@ public class ZuulApplication { ### 参考 * [1] [SpringCloud Zuul](https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul.html) -* [2] [ServiceComb](http://servicecomb.apache.org/cn/docs/quick-start/) \ No newline at end of file +* [2] [ServiceComb](http://servicecomb.apache.org/cn/docs/quick-start/)
[servicecomb-website] branch master updated (2e21255 -> 463ead1)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 2e21255 Updated the release note of service center add 463ead1 Fixed the image link issue of blog No new revisions were added by this update. Summary of changes: ...2019-01-22-servicecomb-springcloud-zuul-demo.md | 24 +++--- 1 file changed, 12 insertions(+), 12 deletions(-)
[GitHub] [servicecomb-website] WillemJiang commented on issue #163: add customized-tracing-with-servicecomb of user guide
WillemJiang commented on issue #163: add customized-tracing-with-servicecomb of user guide URL: https://github.com/apache/servicecomb-website/pull/163#issuecomment-483500653 @bettermanzzy 请直接上传图片,目前图片在网站无法展示。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-website] branch master updated (91f7126 -> 2e21255)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 91f7126 Added new and noteworthy to the Pack 0.4.0 releasenote add 2e21255 Updated the release note of service center No new revisions were added by this update. Summary of changes: _release/cn/service_center_releaseNotes.md | 46 _release/service_center_releaseNotes.md| 48 +- 2 files changed, 55 insertions(+), 39 deletions(-)
[servicecomb-website] branch asf-site updated (ae55444 -> 18c82cd)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from ae55444 Publish the website new 2e21255 Updated the release note of service center new a5eab4f Merge branch 'master' into asf-site new 18c82cd Publish the website The 965 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: _release/cn/service_center_releaseNotes.md | 46 - _release/service_center_releaseNotes.md| 48 +- .../service-center-release-notes/index.html| 12 +- content/feed.xml | 2 +- .../service-center-release-notes/index.html| 12 +- 5 files changed, 76 insertions(+), 44 deletions(-)
[GitHub] [servicecomb-docs] wujimin merged pull request #93: add description about servicecomb.provider.rest.scanRestController
wujimin merged pull request #93: add description about servicecomb.provider.rest.scanRestController URL: https://github.com/apache/servicecomb-docs/pull/93 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-docs] branch master updated (7ea356a -> e7df6c0)
This is an automated email from the ASF dual-hosted git repository. wujimin pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-docs.git. from 7ea356a fix file download Content-Disposition header example new 56c233a add description about servicecomb.provider.rest.scanRestController new e7df6c0 add description about servicecomb.provider.rest.scanRestController for English docs The 197 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: .../en_US/build-provider/springmvc.md | 32 -- .../zh_CN/build-provider/springmvc.md | 20 -- 2 files changed, 29 insertions(+), 23 deletions(-)
[servicecomb-website] branch asf-site updated (3d6681f -> ae55444)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 3d6681f Publish the website new da94ff8 ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka new 00ca27a Update 2019-04-15-servicecomb-pack-eureka.md new 91f7126 Added new and noteworthy to the Pack 0.4.0 releasenote new 703032c Merge branch 'master' into asf-site new ae55444 Publish the website The 962 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: _data/authors.yml | 5 + _posts/2019-04-15-servicecomb-pack-eureka.md | 159 + _posts/cn/2019-04-15-servicecomb-pack-eureka.md| 158 + .../alpha_register_to_eureka.png | Bin 0 -> 204588 bytes .../eureka-main.png| Bin 0 -> 171493 bytes .../alpha_register_to_eureka.png | Bin 0 -> 204588 bytes .../eureka-main.png| Bin 0 -> 171493 bytes .../index.html | 22 +- .../index.html | 22 +- .../docs/apache-servicecomb-day-slides/index.html | 22 +- .../apache-servicecomb-incubating-day/index.html | 22 +- .../index.html | 22 +- content/cn/docs/autoscale-on-company/index.html| 22 +- .../index.html | 22 +- .../index.html | 22 +- content/cn/docs/communication-btw-sc-ms/index.html | 22 +- content/cn/docs/company-on-kubernetes/index.html | 22 +- .../cn/docs/config_center_integration/index.html | 22 +- content/cn/docs/consul-servicemesh.html| 22 +- content/cn/docs/crm-part-I/index.html | 22 +- .../customized-tracing-with-servicecomb/index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- content/cn/docs/distributed_saga_1/index.html | 22 +- content/cn/docs/distributed_saga_2/index.html | 22 +- content/cn/docs/distributed_saga_3/index.html | 22 +- content/cn/docs/go-to-cloud/index.html | 22 +- .../index.html | 22 +- .../docs/how-to-reform-a-legacy-system/index.html | 22 +- content/cn/docs/jira_beginner_guide/index.html | 22 +- content/cn/docs/join_the_community/index.html | 22 +- content/cn/docs/linuxcon-workshop-demo/index.html | 22 +- content/cn/docs/loadtest-saga-with-kubernetes.html | 22 +- .../cn/docs/maven_dependency_management/index.html | 22 +- content/cn/docs/open-design/index.html | 22 +- .../index.html | 22 +- content/cn/docs/osi-microservices/index.html | 22 +- .../index.html | 22 +- content/cn/docs/release-note-1-0-0.html| 22 +- content/cn/docs/saga_pack_design/index.html| 22 +- content/cn/docs/saga_with_cucumber/index.html | 22 +- .../seckill-development-journey-part-I/index.html | 22 +- .../seckill-development-journey-part-II/index.html | 22 +- .../index.html | 22 +- .../cn/docs/servicecomb-pack-cluster/index.html| 58 ++-- content/cn/docs/servicecomb-pack-consul/index.html | 61 ++-- .../index.html | 272 +++ .../servicecomb-springcloud-zuul-demo/index.html | 22 +- .../index.html | 22 +- content/cn/docs/talk-to-apache-experts.html| 22 +- .../cn/docs/tracing-with-servicecomb/index.html| 22 +- content/cn/year-archive/index.html | 152 + .../index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- .../apache-servicecomb-incubating-day/index.html | 22 +- content/docs/autoscale-on-company/index.html | 22 +- .../index.html | 22 +- content/docs/communication-btw-sc-ms/index.html| 22 +- content/docs/company-on-kubernetes/index.html | 22 +- content/docs/distributed_saga_1/index.html | 22 +- content/docs/distributed_saga_2/index.html | 22 +- content/docs/distributed_saga_3/index.html | 22 +- content/docs/go-to-cloud/index.html| 22 +- .../docs/how-to-reform-a-legacy-system/index.html | 22 +- content/docs/howto-upgrade-topzipkin2/index.html | 22 +-
[servicecomb-website] branch master updated (00ca27a -> 91f7126)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 00ca27a Update 2019-04-15-servicecomb-pack-eureka.md add 91f7126 Added new and noteworthy to the Pack 0.4.0 releasenote No new revisions were added by this update. Summary of changes: _release/cn/pack_releaseNotes.md | 22 ++ _release/pack_releaseNotes.md| 23 +++ 2 files changed, 29 insertions(+), 16 deletions(-)
[servicecomb-website] branch asf-site updated (5adb28d -> 3d6681f)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 5adb28d Publish the website new 18c88e6 Added new and noteworthy to the Pack 0.4.0 releasenote new a180c88 Merge branch 'master' into asf-site new 3d6681f Publish the website The 957 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: _release/cn/pack_releaseNotes.md | 22 ++ _release/pack_releaseNotes.md| 23 +++ content/cn/release/pack-release-notes/index.html | 8 +++- content/feed.xml | 2 +- content/release/pack-release-notes/index.html| 9 - 5 files changed, 45 insertions(+), 19 deletions(-)
[GitHub] [servicecomb-website] WillemJiang merged pull request #175: ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka
WillemJiang merged pull request #175: ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka URL: https://github.com/apache/servicecomb-website/pull/175 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-website] branch master updated (3d5614a -> 00ca27a)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 3d5614a Add Committer Zhang Lei new da94ff8 ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka new 00ca27a Update 2019-04-15-servicecomb-pack-eureka.md The 598 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: _data/authors.yml | 5 + _posts/2019-04-15-servicecomb-pack-eureka.md | 159 + _posts/cn/2019-04-15-servicecomb-pack-eureka.md| 158 .../alpha_register_to_eureka.png | Bin 0 -> 204588 bytes .../eureka-main.png| Bin 0 -> 171493 bytes 5 files changed, 322 insertions(+) create mode 100755 _posts/2019-04-15-servicecomb-pack-eureka.md create mode 100755 _posts/cn/2019-04-15-servicecomb-pack-eureka.md create mode 100644 assets/images/2019-04-15-servicecomb-pack-eureka/alpha_register_to_eureka.png create mode 100644 assets/images/2019-04-15-servicecomb-pack-eureka/eureka-main.png
[GitHub] [servicecomb-website] coolbeevip opened a new pull request #175: ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka
coolbeevip opened a new pull request #175: ServiceComb Pack 0.4.0 Integrated Discovery Service Eureka URL: https://github.com/apache/servicecomb-website/pull/175 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-java-chassis] branch master updated (b1167aa -> 5153292)
This is an automated email from the ASF dual-hosted git repository. wujimin pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git. from b1167aa [SCB-1253] read max heap size config of IT from system property new b9db4ee [SCB-1251][WIP] delete unnecessary files new 00583e9 [SCB-1251][WIP] PriorityProperty instances should be managed new 8a309f8 [SCB-1251][WIP] update unit test new 6ddfab9 [SCB-1251] other modules switch to new mechanism new 10e5548 [SCB-1251] fix swagger to html scroll problem new 2739e78 [SCB-1251] add configuration inspector new 857a7cc [SCB-1251] add unregister PriorityProperty when remove MicroserviceVersions unit test new 63c1333 [SCB-1251] add inspector unit test new 5153292 [SCB-1251] change constructor of PriorityProperty to package protected by code review The 2218 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: .../org/apache/servicecomb/core/SCBEngine.java | 8 ++ .../core/definition/MicroserviceVersionMeta.java | 9 ++ .../servicecomb/core/definition/OperationMeta.java | 8 +- .../core/definition/TestMicroserviceMeta.java | 76 +++ .../core/definition/TestOperationMeta.java | 10 ++ .../definition/schema/StaticSchemaFactoryTest.java | 2 +- .../org/apache/servicecomb/config/ConfigUtil.java | 23 .../config/inject/ConfigObjectFactory.java | 47 --- .../config/priority/PriorityProperty.java | 110 --- .../config/priority/PriorityPropertyManager.java | 147 + .../priority/impl/BooleanPriorityProperty.java | 25 .../priority/impl/DoublePriorityProperty.java | 25 .../priority/impl/FloatPriorityProperty.java | 25 .../config/priority/impl/IntPriorityProperty.java | 25 .../config/priority/impl/LongPriorityProperty.java | 25 .../config/priority/impl/PropertyGetter.java | 125 -- .../priority/impl/StringPriorityProperty.java | 25 .../apache/servicecomb/config/TestConfigUtil.java | 43 +++--- .../config/TestConfigurationSpringInitializer.java | 6 + .../config/inject/TestConfigObjectFactory.java | 47 --- .../config/priority/TestPriorityProperty.java | 63 + .../config/priority/TestPriorityPropertyBase.java | 43 +++--- .../test/scaffolding/config/ArchaiusUtils.java | 2 - .../inspector/internal/InspectorBootListener.java | 8 +- .../inspector/internal/InspectorImpl.java | 76 +++ .../internal/model/DynamicPropertyView.java| 38 -- .../internal/model/PriorityPropertyView.java | 32 ++--- .../internal/swagger/AppendStyleProcessor.java | 1 + inspector/src/main/resources/webroot/index.html| 18 +++ .../src/main/resources/webroot/static/css/main.css | 34 + .../webroot/static/dynamicProperties.html | 86 .../webroot/static/priorityProperties.html | 113 .../internal/TestInspectorBootListener.java| 11 +- .../inspector/internal/TestInspectorImpl.java | 57 +++- .../consumer/MicroserviceManager.java | 1 + .../consumer/MicroserviceVersion.java | 3 + .../consumer/MicroserviceVersions.java | 6 + 37 files changed, 959 insertions(+), 444 deletions(-) create mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/PriorityPropertyManager.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/BooleanPriorityProperty.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/DoublePriorityProperty.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/FloatPriorityProperty.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/IntPriorityProperty.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/LongPriorityProperty.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/PropertyGetter.java delete mode 100644 foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/impl/StringPriorityProperty.java copy service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestWebsocketClientPool.java => foundations/foundation-config/src/test/java/org/apache/servicecomb/config/priority/TestPriorityPropertyBase.java (54%) copy
[GitHub] [servicecomb-java-chassis] wujimin merged pull request #1180: [SCB-1251] Reduce archaius callback
wujimin merged pull request #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1180: [SCB-1251] Reduce archaius callback
wujimin commented on a change in pull request #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#discussion_r275260767 ## File path: foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/PriorityPropertyManager.java ## @@ -0,0 +1,136 @@ +/* + * 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.config.priority; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.configuration.event.ConfigurationEvent; +import org.apache.commons.configuration.event.ConfigurationListener; +import org.apache.servicecomb.config.inject.ConfigObjectFactory; +import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx; + +import com.netflix.config.ConfigurationManager; +import com.netflix.config.DynamicPropertyFactory; + +public class PriorityPropertyManager { + private ConfigurationListener configurationListener = this::configurationListener; + + private Map, PriorityProperty> priorityPropertyMap = new ConcurrentHashMapEx<>(); + + private Map>> configObjectMap = new ConcurrentHashMapEx<>(); + + // will be reset to null after register or unregister + // and build when configuration changed + private Map>> keyCache; + + public PriorityPropertyManager() { +// make sure create a DynamicPropertyFactory instance +// otherwise will cause wrong order of configurationListeners +DynamicPropertyFactory.getInstance(); + + ConfigurationManager.getConfigInstance().addConfigurationListener(configurationListener); + } + + public void close() { + ConfigurationManager.getConfigInstance().removeConfigurationListener(configurationListener); + } + + public synchronized void configurationListener(ConfigurationEvent event) { +if (event.isBeforeUpdate()) { + return; +} + +if (keyCache == null) { + keyCache = new ConcurrentHashMapEx<>(); + updateCache(priorityPropertyMap.values()); + configObjectMap.values().stream().forEach(this::updateCache); +} + +keyCache.getOrDefault(event.getPropertyName(), Collections.emptyList()).stream() Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1180: [SCB-1251] Reduce archaius callback
yhs0092 commented on a change in pull request #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#discussion_r275220301 ## File path: foundations/foundation-config/src/main/java/org/apache/servicecomb/config/priority/PriorityPropertyManager.java ## @@ -0,0 +1,136 @@ +/* + * 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.config.priority; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.configuration.event.ConfigurationEvent; +import org.apache.commons.configuration.event.ConfigurationListener; +import org.apache.servicecomb.config.inject.ConfigObjectFactory; +import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx; + +import com.netflix.config.ConfigurationManager; +import com.netflix.config.DynamicPropertyFactory; + +public class PriorityPropertyManager { + private ConfigurationListener configurationListener = this::configurationListener; + + private Map, PriorityProperty> priorityPropertyMap = new ConcurrentHashMapEx<>(); + + private Map>> configObjectMap = new ConcurrentHashMapEx<>(); + + // will be reset to null after register or unregister + // and build when configuration changed + private Map>> keyCache; + + public PriorityPropertyManager() { +// make sure create a DynamicPropertyFactory instance +// otherwise will cause wrong order of configurationListeners +DynamicPropertyFactory.getInstance(); + + ConfigurationManager.getConfigInstance().addConfigurationListener(configurationListener); + } + + public void close() { + ConfigurationManager.getConfigInstance().removeConfigurationListener(configurationListener); + } + + public synchronized void configurationListener(ConfigurationEvent event) { +if (event.isBeforeUpdate()) { + return; +} + +if (keyCache == null) { + keyCache = new ConcurrentHashMapEx<>(); + updateCache(priorityPropertyMap.values()); + configObjectMap.values().stream().forEach(this::updateCache); +} + +keyCache.getOrDefault(event.getPropertyName(), Collections.emptyList()).stream() Review comment: Hi, it seems the `event.getPropertyName()` may return `null`. Just run `org.apache.servicecomb.it.BaseProducerMain`, and a `NullPointerException` can be found in boot up log. Maybe we should add a check here? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] coveralls edited a comment on issue #1180: [SCB-1251] Reduce archaius callback
coveralls edited a comment on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-482872075 [![Coverage Status](https://coveralls.io/builds/22809808/badge)](https://coveralls.io/builds/22809808) Coverage increased (+0.03%) to 85.741% when pulling **9eba2b73c8c687ffbcd8d9c1fc307361f3ec4907 on wujimin:reduce-archaius-callback** into **6b81180dfd6ac57de82f076215ac93c8f2e40617 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-pack] loveoobaby closed issue #451: when use eureka, the ${alpha.cluster.address} must be set and can be arbitrary
loveoobaby closed issue #451: when use eureka, the ${alpha.cluster.address} must be set and can be arbitrary URL: https://github.com/apache/servicecomb-pack/issues/451 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-java-chassis] branch master updated (6b81180 -> b1167aa)
This is an automated email from the ASF dual-hosted git repository. wujimin pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git. from 6b81180 [SCB-1184] add IT for the case that provider's response type is CompletableFuture new 74b5a15 [SCB-1253] adjust the priority of GlobalRestFailureHandler, add some fixes for default GlobalRestFailureHandler new adc687b [SCB-1253] check before send response, fix the response message new 616a896 [SCB-1253] add IT for failureHandler new b1167aa [SCB-1253] read max heap size config of IT from system property The 2209 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: .../edge/core/AbstractEdgeDispatcher.java | 25 - .../org/apache/servicecomb/it/deploy/Deploys.java | 29 +++--- .../it/testcase/TestRestServerConfigEdge.java | 54 ++- .../it/edge/DemoDispatcherWithFailureHandler.java | 63 ++ .../edge/DemoDispatcherWithoutFailureHandler.java | 34 ++-- ...cecomb.transport.rest.vertx.VertxHttpDispatcher | 2 + .../transport/rest/vertx/RestServerVerticle.java | 12 ++--- 7 files changed, 184 insertions(+), 35 deletions(-) create mode 100644 integration-tests/it-edge/src/main/java/org/apache/servicecomb/it/edge/DemoDispatcherWithFailureHandler.java copy demo/demo-edge/edge-service/src/main/java/org/apache/servicecomb/demo/edge/service/CustomResponseMetaMapper.java => integration-tests/it-edge/src/main/java/org/apache/servicecomb/it/edge/DemoDispatcherWithoutFailureHandler.java (53%)
[GitHub] [servicecomb-java-chassis] wujimin merged pull request #1179: [SCB-1253] Adjust priority of failure handler
wujimin merged pull request #1179: [SCB-1253] Adjust priority of failure handler URL: https://github.com/apache/servicecomb-java-chassis/pull/1179 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] coveralls edited a comment on issue #1180: [SCB-1251] Reduce archaius callback
coveralls edited a comment on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-482872075 [![Coverage Status](https://coveralls.io/builds/22809243/badge)](https://coveralls.io/builds/22809243) Coverage increased (+0.04%) to 85.746% when pulling **607c2fba0039c7a7cd0dad7858413c0b6c3ba92b on wujimin:reduce-archaius-callback** into **6b81180dfd6ac57de82f076215ac93c8f2e40617 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback
wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483137842 > > > > `PriorityProperty` > > > > > > > > > this will cause too complex to manage ConfigObject, because if one field create failed, but previous PriorityProperty already register to manager, still need to unregister > > > > > > or i will provide another method to only create instance but not register it. > > The benifit of `priorityPropertyMap` and `priorityPropertyMap` is that by registering the config instances into these two map, we can notify them when the config values are changed, am I right? If so, the instances not registered cannot get updated dynamically, I think the attration of such instance is weak for our users. > If the instances must be unregistered to avoid memory leak, I think it's better to add reminder in the comment of register methods. > > By the way, I still don't get it why the ConfigObject instance need to be unregistered when part of it's fields PriorityProperty are failed to create. Currently it seems the register method of PriorityProperty is invoked nowhere out of PriorityPropertyManager, If the creation of a ConfigObject instance failed, we can just abandon this instance and all of it's property can be GCed, as far as I see. Is there any details I'm not aware of? inside ConfigObjectFactory, if invoke org.apache.servicecomb.config.priority.PriorityPropertyManager#createPriorityProperty, then this PriorityProperty instance already registered to PriorityPropertyManager, so can not be GCed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback
wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483133978 > > `PriorityProperty` > > this will cause too complex to manage ConfigObject, because if one field create failed, but previous PriorityProperty already register to manager, still need to unregister or i will provide another method to only create instance but not register it. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback
wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483132713 > `PriorityProperty` this will cause too complex to manage ConfigObject, because if one field create failed, but previous PriorityProperty already register to manager, still need to unregister This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] yhs0092 edited a comment on issue #1180: [SCB-1251] Reduce archaius callback
yhs0092 edited a comment on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483130131 Currently the register and unregister methods for `ConfigObject` and `PriorityProperty` are provided by `PriorityPropertyManager`, are they the recomended way to construct and destruct `ConfigObject` and `PriorityProperty`? If so, is it better to change the constructor of `PriorityProperty` package private? And is it possible to use `WeakReference` to hold the instances of `ConfigObject` and `PriorityProperty`, so that the unregister method can be omitted? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback
wujimin commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483130722 > For the memory leak problem caused by the callback of `DynamicProperty`, this PR solve it by abandoning the callback mechanism of `com.netflix.config.DynamicProperty` and using `org.apache.commons.configuration.event.ConfigurationListener` instead. Am I right? yes, you are right. by this way, we only need to register one listener globally This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1180: [SCB-1251] Reduce archaius callback
yhs0092 commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483130131 Currently the register and unregister methods for `ConfigObject` and `PriorityProperty` are provided by `PriorityPropertyManager`, are they the recomended way to construct and destruct `ConfigObject` and `PriorityProperty`? If so, is it better to change the constructor of `PriorityProperty` package private? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1180: [SCB-1251] Reduce archaius callback
yhs0092 commented on issue #1180: [SCB-1251] Reduce archaius callback URL: https://github.com/apache/servicecomb-java-chassis/pull/1180#issuecomment-483129432 For the memory leak problem caused by the callback of `DynamicProperty`, this PR solve it by abandoning the callback mechanism of `com.netflix.config.DynamicProperty` and using `org.apache.commons.configuration.event.ConfigurationListener` instead. Am I right? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin opened a new pull request #1183: [SCB-1256][WIP][WEAK] rename ConcreteInterfaceRegister to ConcreteTypeRegister
wujimin opened a new pull request #1183: [SCB-1256][WIP][WEAK] rename ConcreteInterfaceRegister to ConcreteTypeRegister URL: https://github.com/apache/servicecomb-java-chassis/pull/1183 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] wujimin opened a new pull request #1182: [SCB-1252][WIP][WEAK] change element of HttpParameterType to uppercase
wujimin opened a new pull request #1182: [SCB-1252][WIP][WEAK] change element of HttpParameterType to uppercase URL: https://github.com/apache/servicecomb-java-chassis/pull/1182 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services