[GitHub] coveralls edited a comment on issue #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
coveralls edited a comment on issue #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#issuecomment-441339625 [![Coverage Status](https://coveralls.io/builds/20268045/badge)](https://coveralls.io/builds/20268045) Coverage increased (+0.007%) to 86.778% when pulling **0dc0080e68af549ee1b2c0b1a1401d7aea5ec2bc on heyile:aggregated** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #1000: [SCB-1035] Update license and notice for third parties
coveralls edited a comment on issue #1000: [SCB-1035] Update license and notice for third parties URL: https://github.com/apache/servicecomb-java-chassis/pull/1000#issuecomment-440904072 [![Coverage Status](https://coveralls.io/builds/20267999/badge)](https://coveralls.io/builds/20267999) Coverage decreased (-86.8%) to 0.0% when pulling **8b94bb44f24e70e4d8ae62be257b612a34c8c7ff on yangbor:master** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #999: [SCB-1031] resolve @ApiOperator @Response override wrong, if the prev…
coveralls edited a comment on issue #999: [SCB-1031] resolve @ApiOperator @Response override wrong, if the prev… URL: https://github.com/apache/servicecomb-java-chassis/pull/999#issuecomment-440630826 [![Coverage Status](https://coveralls.io/builds/20267841/badge)](https://coveralls.io/builds/20267841) Coverage decreased (-0.006%) to 86.766% when pulling **21dbd38bab549c159de3ce265602b29b8a32d973 on jeho0815:Branch_master_SCB-1031** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 (45fe565 -> b60d8b8)
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 45fe565 additional content for opensource-project-is-not-so-far-away.md add b60d8b8 Updated the release verify documents No new revisions were added by this update. Summary of changes: _release/cn/release.md | 6 +++--- _release/release.md| 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
[servicecomb-website] 01/02: Merge branch 'master' into asf-site
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 commit 4c4bbcfa578bfae7f408cc4fbcc47ccb2100a616 Merge: e7b10d3 b60d8b8 Author: Willem Jiang AuthorDate: Sat Nov 24 14:05:19 2018 +0800 Merge branch 'master' into asf-site _release/cn/release.md | 6 +++--- _release/release.md| 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
[servicecomb-website] branch asf-site updated (e7b10d3 -> c2e64f3)
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 e7b10d3 Publish the website add 45fe565 additional content for opensource-project-is-not-so-far-away.md add b60d8b8 Updated the release verify documents new 4c4bbcf Merge branch 'master' into asf-site new c2e64f3 Publish the website The 2 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/release.md| 6 +++--- _release/release.md | 6 +++--- content/cn/release/index.html | 6 +++--- content/feed.xml | 2 +- content/release/index.html| 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-)
[servicecomb-website] 02/02: Publish the website
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 commit c2e64f3f2f2b91989f806d75fa94f6123dc1dbcb Author: Willem Jiang AuthorDate: Sat Nov 24 14:06:11 2018 +0800 Publish the website --- content/cn/release/index.html | 6 +++--- content/feed.xml | 2 +- content/release/index.html| 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/cn/release/index.html b/content/cn/release/index.html index 710cc58..5f52532 100644 --- a/content/cn/release/index.html +++ b/content/cn/release/index.html @@ -412,8 +412,8 @@ 验证发行版本 -使用PGP或SHA签名验证下载文件的完整性至关重要。可以使用GPG或PGP验证PGP签名。请下载https://www.apache.org/dist/incubator/servicecomb/KEYS; target="_blank">KEYS 以及相关发行版的asc签名文件。 建议从主发行版https://www.apache.org/dist/incubator/servicecomb/; target="_blank">目录 中获取这些文件,而不是从镜像中获取。 - gpg -i KEYS +使用PGP或SHA签名验证下载文件的完整性至关重要。可以使用GPG或PGP验证PGP签名。请下载https://www.apache.org/dist/servicecomb/KEYS; target="_blank">KEYS 以及相关发行版的asc签名文件。 建议从主发行版https://www.apache.org/dist/servicecomb/; target="_blank">目录 中获取这些文件,而不是从镜像中获取。 + gpg -import KEYS or @@ -442,7 +442,7 @@ pgp apache-servicecomb-incubating.asc -或者,您可以从主发行版https://www.apache.org/dist/incubator/servicecomb/; target="_blank">repo下载SHA签名,并使用sha512sum验证下载。 +或者,您可以从主发行版https://www.apache.org/dist/servicecomb/; target="_blank">repo下载SHA签名,并使用sha512sum或者shasum验证下载。 diff --git a/content/feed.xml b/content/feed.xml index 2a746b3..59ec39f 100644 --- a/content/feed.xml +++ b/content/feed.xml @@ -1,4 +1,4 @@ -http://www.w3.org/2005/Atom; >https://jekyllrb.com/; version="3.4.3">Jekyll2018-11-22T15:14:36+08:00/Apache ServiceCombThe homepage of ServiceComb{name=nil, avatar=/assets [...] +http://www.w3.org/2005/Atom; >https://jekyllrb.com/; version="3.4.3">Jekyll2018-11-24T14:05:31+08:00/Apache ServiceCombThe homepage of ServiceComb{name=nil, avatar=/assets [...] blockquote p前几天收到了Apache ServiceComb PMC的邀请邮件,这意味着我成为了一名Apache ServiceComb项目的Committer。喜悦之余,我想留下一篇博客作为自己工作的一个阶段性总结,同时也希望这篇文章能够给其他想要加入到开源社区的同学一点参考。/p diff --git a/content/release/index.html b/content/release/index.html index bad413c..6643108 100644 --- a/content/release/index.html +++ b/content/release/index.html @@ -412,8 +412,8 @@ It is essential that you verify the integrity of the downloaded files using the PGP or SHA signatures. The PGP signatures can be verified using GPG or PGP. - Please download the https://www.apache.org/dist/incubator/servicecomb/KEYS; target="_blank">KEYS as well as the asc signature files for relevant distribution. It is recommended to get these files from the main distribution https://www.apache.org/dist/incubator/servicecomb/; target="_blank">directory and not from the mirrors. - gpg -i KEYS + Please download the https://www.apache.org/dist/servicecomb/KEYS; target="_blank">KEYS as well as the asc signature files for relevant distribution. It is recommended to get these files from the main distribution https://www.apache.org/dist/servicecomb/; target="_blank">directory and not from the mirrors. + gpg -import KEYS or @@ -442,7 +442,7 @@ pgp apache-servicecomb-incubating.asc -Alternatively you can download the SHA signatures from main distribution https://www.apache.org/dist/incubator/servicecomb/; target="_blank">repo and verify the downloads using sha512sum. +Alternatively you can download the SHA signatures from main distribution https://www.apache.org/dist/servicecomb/; target="_blank">repo and verify the downloads using sha512sum or shasum.
svn commit: r31071 - /release/servicecomb/servicecomb-saga/0.2.1/
Author: asifdxtreme Date: Sat Nov 24 05:55:16 2018 New Revision: 31071 Log: ServiceComb Saga 0.2.1 Release Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip (with props) release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.asc (with props) release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.sha512 (with props) release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip (with props) release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip.asc (with props) release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip.sha512 (with props) Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip == Binary file - no diff available. Propchange: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip -- svn:mime-type = application/octet-stream Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.asc == --- release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.asc (added) +++ release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.asc Sat Nov 24 05:55:16 2018 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEQsDXlA/N5eYw5Krj3JP2lr16TWkFAlv0JzsACgkQ3JP2lr16 +TWm84hAArHld3nKvgQpzjroksY9tMbGaEfvWtN/rh3gDnOVdyfjPbqKcLUAynVLa ++VZdOEe9C9nf5Ooqh/Ho/szY67n91aWIGcnjUPhdkpGbEVvROijzf/XZB+hZVT7O +1uiSJ/RwJdNQ1sK/bk82XrJWHkrCKlM0wTyTwcURxhPVQmBeigtNEI4tFORlp9pO +nCJCOtJ2WFGEJFViRNKtBsoAP1bfXtJXZtyz3Dc8tz21ro7uYwipqPVhnOuEs1h/ +moRJZ7AjJyKrYmmFNFbAXdOfDcQUAEQcpBPo4+3Vlx+vaA+JjhZ7of5cweAaquRV +dsmT57OKbF96xVQuV/MyGnjkFI8X3szfQJCystcPT6X8znensB29jg6teqANF4fi +l7komnPHUvi7Mvb/GXBz91fkfLUOgTQ8Khuyl4+2Q9kKGQSraBfScwBwgzoAorya +l+aYxf/PfNIkW9HYVRQwFCSctoltwSP9ZtOFjtQF97fAaHoDIXZa0F+5KA5v6Yh2 +nnR4hAQqxXd8Loe1WaPFYlinIRjnRIc5ts6+cP1MWpFxTHqrvW+pJ+LDbX4SsyqV +83LMj48IZz7TKPjvcxKykj4qCKbWJvLvjfoXiHtJsVwKLQVjfkqQ1aanGVeg6+Wp +UUt343jphJd2huI4lNQqgnUGLjjDboTuS9nkVcKfFtuhdtRF+5I= +=Decz +-END PGP SIGNATURE- Propchange: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.asc -- svn:eol-style = native Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.sha512 == --- release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.sha512 (added) +++ release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.sha512 Sat Nov 24 05:55:16 2018 @@ -0,0 +1 @@ +d429e0c6d9ec2161577ef5b66905f7462ce21a14477d40049e8bf83f66e3a50ff9a1c64ffbc76dce3fa18306da5bca7cf79f5cb031ebaae5cf8b65abd187f2d3 apache-servicecomb-saga-distribution-0.2.1-bin.zip Propchange: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-bin.zip.sha512 -- svn:eol-style = native Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip == Binary file - no diff available. Propchange: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip -- svn:mime-type = application/octet-stream Added: release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip.asc == --- release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip.asc (added) +++ release/servicecomb/servicecomb-saga/0.2.1/apache-servicecomb-saga-distribution-0.2.1-src.zip.asc Sat Nov 24 05:55:16 2018 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEQsDXlA/N5eYw5Krj3JP2lr16TWkFAlv0J0MACgkQ3JP2lr16 +TWl+xw//bU3F1b2qEOuZGzo2mSgRL+Xca97cTBsh49Oe9x3nlxY/sgMp0a4L2CE+ +YAs7wQs6mG0bf+YqKIwW07PPKivPu8CJbUARlMWjyfj5W8m+RfsPhrQSNOaVpjKN +kzJD9gEjjh8+9dxoQse0anzi8pi9t1IdERJsnQYl4D/S6dkTVPssqyGJ3f/0F6Zz +fh4r9t74IHY7/V6m7C5kCTRGVjc5OaTxCSakP/igQYsxM+JmFwCE30R3yDbPG+5U +m5cS8jTBH9wZwcY7YYeQQo1DQYGo/yfVrwzNGmJb6x50FjQhMBsozngsHk1wDxZP
[GitHub] asifdxtreme commented on issue #149: mac docker run 报错 Invalid Request URI /
asifdxtreme commented on issue #149: mac docker run 报错 Invalid Request URI / URL: https://github.com/apache/servicecomb-service-center/issues/149#issuecomment-441343412 This issue is fixed and works well with latest version of SC and docker images, I am going ahead to close this issue, feel free to open it anytime if there is some concerns This is an automated message from the Apache Git Service. To respond to the message, please log on 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] asifdxtreme closed issue #149: mac docker run 报错 Invalid Request URI /
asifdxtreme closed issue #149: mac docker run 报错 Invalid Request URI / URL: https://github.com/apache/servicecomb-service-center/issues/149 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] asifdxtreme closed pull request #499: SCB-1041 scctl version command does not print sc verison
asifdxtreme closed pull request #499: SCB-1041 scctl version command does not print sc verison URL: https://github.com/apache/servicecomb-service-center/pull/499 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/scctl/pkg/plugin/version/cmd.go b/scctl/pkg/plugin/version/cmd.go index 877d23b2..8492071e 100644 --- a/scctl/pkg/plugin/version/cmd.go +++ b/scctl/pkg/plugin/version/cmd.go @@ -52,8 +52,8 @@ func VersionCommandFunc(_ *cobra.Command, _ []string) { if err != nil { return } - v, err := scClient.GetScVersion(context.Background()) - if err != nil { + v, scErr := scClient.GetScVersion(context.Background()) + if scErr != nil { return } This is an automated message from the Apache Git Service. To respond to the message, please log on 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-service-center] branch master updated: SCB-1041 scctl version command does not print sc verison (#499)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git The following commit(s) were added to refs/heads/master by this push: new 7aceab7 SCB-1041 scctl version command does not print sc verison (#499) 7aceab7 is described below commit 7aceab7f2ccb804089627bfdb82e7d7a62ab259a Author: little-cui AuthorDate: Sat Nov 24 12:33:00 2018 +0800 SCB-1041 scctl version command does not print sc verison (#499) --- scctl/pkg/plugin/version/cmd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scctl/pkg/plugin/version/cmd.go b/scctl/pkg/plugin/version/cmd.go index 877d23b..8492071 100644 --- a/scctl/pkg/plugin/version/cmd.go +++ b/scctl/pkg/plugin/version/cmd.go @@ -52,8 +52,8 @@ func VersionCommandFunc(_ *cobra.Command, _ []string) { if err != nil { return } - v, err := scClient.GetScVersion(context.Background()) - if err != nil { + v, scErr := scClient.GetScVersion(context.Background()) + if scErr != nil { return }
[GitHub] asifdxtreme closed pull request #498: SCB-993 Add the requirement of scctl
asifdxtreme closed pull request #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/frontend/Readme.md b/frontend/Readme.md index 79c86ac7..9bb56b56 100644 --- a/frontend/Readme.md +++ b/frontend/Readme.md @@ -5,7 +5,8 @@ Service-Center UI also offers a unique feature of testing the Schemas of their M ### QuickStart Guide -Easiest way to get started with Service-Center UI is to download the release from [here](https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/) and then untar/unzip it based on your OS and run start-frontend.sh/start-frontend.bat. +Easiest way to get started with Service-Center UI is to download the release from +[`here`](http://servicecomb.apache.org/release/) and then untar/unzip it based on your OS and run start-frontend.sh/start-frontend.bat. This will bring up the Service-Center UI on [http://127.0.0.1:30103](http://127.0.0.1:30103). Windows(apache-servicecomb-service-center-XXX-windows-amd64.zip): diff --git a/scctl/README.md b/scctl/README.md index 5b5cfca9..b9431f08 100644 --- a/scctl/README.md +++ b/scctl/README.md @@ -1,13 +1,13 @@ ## scctl -`scctl` enables user to view the list of MicroServices registered in SC. +`scctl` enables user to view the list of MicroServices registered in service center(version 1.1.0+). You can view all the commands from [here](/scctl/pkg/plugin/README.md) ### QuickStart Guide # Install Easiest way to get started with `scctl` is to download the release -from [here](https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/) +from [`here`](http://servicecomb.apache.org/release/) and then untar/unzip it based on your OS. # Check the version diff --git a/scctl/pkg/plugin/README.md b/scctl/pkg/plugin/README.md index e244676e..d72dc5ba 100644 --- a/scctl/pkg/plugin/README.md +++ b/scctl/pkg/plugin/README.md @@ -1,7 +1,7 @@ scctl -`scctl` is a command line client for service center. +`scctl` is a command line client for service center(version 1.1.0+). ## Global options This is an automated message from the Apache Git Service. To respond to the message, please log on 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-service-center] branch master updated: SCB-993 Add the requirement of scctl (#498)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git The following commit(s) were added to refs/heads/master by this push: new 1fa8c5a SCB-993 Add the requirement of scctl (#498) 1fa8c5a is described below commit 1fa8c5a82bd2ebc801e4013aaa078268d9107a2b Author: little-cui AuthorDate: Sat Nov 24 12:32:12 2018 +0800 SCB-993 Add the requirement of scctl (#498) * SCB-993 Add the requirement of scctl * SCB-993 Update the download link --- frontend/Readme.md | 3 ++- scctl/README.md| 4 ++-- scctl/pkg/plugin/README.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/Readme.md b/frontend/Readme.md index 79c86ac..9bb56b5 100644 --- a/frontend/Readme.md +++ b/frontend/Readme.md @@ -5,7 +5,8 @@ Service-Center UI also offers a unique feature of testing the Schemas of their M ### QuickStart Guide -Easiest way to get started with Service-Center UI is to download the release from [here](https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/) and then untar/unzip it based on your OS and run start-frontend.sh/start-frontend.bat. +Easiest way to get started with Service-Center UI is to download the release from +[`here`](http://servicecomb.apache.org/release/) and then untar/unzip it based on your OS and run start-frontend.sh/start-frontend.bat. This will bring up the Service-Center UI on [http://127.0.0.1:30103](http://127.0.0.1:30103). Windows(apache-servicecomb-service-center-XXX-windows-amd64.zip): diff --git a/scctl/README.md b/scctl/README.md index 5b5cfca..b9431f0 100644 --- a/scctl/README.md +++ b/scctl/README.md @@ -1,13 +1,13 @@ ## scctl -`scctl` enables user to view the list of MicroServices registered in SC. +`scctl` enables user to view the list of MicroServices registered in service center(version 1.1.0+). You can view all the commands from [here](/scctl/pkg/plugin/README.md) ### QuickStart Guide # Install Easiest way to get started with `scctl` is to download the release -from [here](https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/) +from [`here`](http://servicecomb.apache.org/release/) and then untar/unzip it based on your OS. # Check the version diff --git a/scctl/pkg/plugin/README.md b/scctl/pkg/plugin/README.md index e244676..d72dc5b 100644 --- a/scctl/pkg/plugin/README.md +++ b/scctl/pkg/plugin/README.md @@ -1,7 +1,7 @@ scctl -`scctl` is a command line client for service center. +`scctl` is a command line client for service center(version 1.1.0+). ## Global options
[GitHub] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236031524 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java ## @@ -795,7 +841,7 @@ public ServiceCenterInfo getServiceCenterInfo() { CountDownLatch countDownLatch = new CountDownLatch(1); RestUtils.get(ipPort, Const.REGISTRY_API.SERVICECENTER_VERSION, -new RequestParam(), +new RequestParam().addQueryParam("global", "true"), Review comment: no need to add global This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236031009 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/RegistryUtils.java ## @@ -216,7 +216,7 @@ public static boolean updateInstanceProperties(Map instancePrope } public static Microservice getMicroservice(String microserviceId) { -return serviceRegistry.getRemoteMicroservice(microserviceId); +return serviceRegistry.getAggregatedRemoteMicroervice(microserviceId); Review comment: if change this... the method org.apache.servicecomb.serviceregistry#Microservice getAggregatedRemoteMicrservice(String microserviceId) will never be invoked? should I delete this method... This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #1001: [SCB-968]968 http2 do not support pump download
coveralls edited a comment on issue #1001: [SCB-968]968 http2 do not support pump download URL: https://github.com/apache/servicecomb-java-chassis/pull/1001#issuecomment-441018970 [![Coverage Status](https://coveralls.io/builds/20267205/badge)](https://coveralls.io/builds/20267205) Coverage decreased (-0.03%) to 86.74% when pulling **f7bb7606bb5d31d9f4d6602969af2c17afec8f35 on heyile:h2PumpDownload** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #1001: [SCB-968]968 http2 do not support pump download
coveralls edited a comment on issue #1001: [SCB-968]968 http2 do not support pump download URL: https://github.com/apache/servicecomb-java-chassis/pull/1001#issuecomment-441018970 [![Coverage Status](https://coveralls.io/builds/20267204/badge)](https://coveralls.io/builds/20267204) Coverage decreased (-0.04%) to 86.736% when pulling **f7bb7606bb5d31d9f4d6602969af2c17afec8f35 on heyile:h2PumpDownload** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236031194 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java ## @@ -356,6 +356,30 @@ public String getSchema(String microserviceId, String schemaId) { syncHandler(countDownLatch, GetSchemaResponse.class, holder)); try { countDownLatch.await(); +} catch (Exception e) { + LOGGER.error("query schema exist {}/{} failed", + schemaId, + e); +} +if (holder.value != null) { + return holder.value.getSchema(); +} + +return null; + } + + @Override + public String getAggregatedSchema(String microserviceId, String schemaId) { +Holder holder = new Holder<>(); Review comment: ok This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236031009 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/RegistryUtils.java ## @@ -216,7 +216,7 @@ public static boolean updateInstanceProperties(Map instancePrope } public static Microservice getMicroservice(String microserviceId) { -return serviceRegistry.getRemoteMicroservice(microserviceId); +return serviceRegistry.getAggregatedRemoteMicroervice(microserviceId); Review comment: if change this... the method org.apache.servicecomb.serviceregistry#Microservice getAggregatedRemoteMicrservice(String microserviceId) will never be invoked? can I delete the method... This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236031009 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/RegistryUtils.java ## @@ -216,7 +216,7 @@ public static boolean updateInstanceProperties(Map instancePrope } public static Microservice getMicroservice(String microserviceId) { -return serviceRegistry.getRemoteMicroservice(microserviceId); +return serviceRegistry.getAggregatedRemoteMicroervice(microserviceId); Review comment: if change this... the method org.apache.servicecomb.serviceregistry#Microservice getAggregatedRemoteMicrservice(String microserviceId) will never be invoked? should I delete this method... This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030963 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java ## @@ -489,7 +534,7 @@ public String registerMicroserviceInstance(MicroserviceInstance instance) { CountDownLatch countDownLatch = new CountDownLatch(1); RestUtils.get(ipPort, String.format(Const.REGISTRY_API.MICROSERVICE_INSTANCE_OPERATION_ALL, providerId), -new RequestParam().addHeader("X-ConsumerId", consumerId), +new RequestParam().addHeader("X-ConsumerId", consumerId).addQueryParam("global", "true"), Review comment: ok This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile opened a new pull request #1001: [SCB-968]968 http2 do not support pump download
heyile opened a new pull request #1001: [SCB-968]968 http2 do not support pump download URL: https://github.com/apache/servicecomb-java-chassis/pull/1001 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile closed pull request #1001: [SCB-968]968 http2 do not support pump download
heyile closed pull request #1001: [SCB-968]968 http2 do not support pump download URL: https://github.com/apache/servicecomb-java-chassis/pull/1001 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpFactoryImpl.java b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpFactoryImpl.java new file mode 100644 index 0..c3284e301 --- /dev/null +++ b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpFactoryImpl.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.servicecomb.foundation.vertx.stream; + +import java.util.Objects; + +import io.vertx.core.spi.PumpFactory; +import io.vertx.core.streams.Pump; +import io.vertx.core.streams.ReadStream; +import io.vertx.core.streams.WriteStream; + +public class PumpFactoryImpl implements PumpFactory { + @Override + public Pump pump(ReadStream rs, WriteStream ws) { +Objects.requireNonNull(rs); +Objects.requireNonNull(ws); +return new PumpImpl<>(rs, ws); + } + + @Override + public Pump pump(ReadStream rs, WriteStream ws, int writeQueueMaxSize) { +Objects.requireNonNull(rs); +Objects.requireNonNull(ws); +return new PumpImpl<>(rs, ws, writeQueueMaxSize); + } +} \ No newline at end of file diff --git a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpImpl.java b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpImpl.java new file mode 100644 index 0..3657e7378 --- /dev/null +++ b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/stream/PumpImpl.java @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.servicecomb.foundation.vertx.stream; + +import io.vertx.core.Handler; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.streams.Pump; +import io.vertx.core.streams.ReadStream; +import io.vertx.core.streams.WriteStream; + +public class PumpImpl implements Pump { + + private final ReadStream readStream; + + private final WriteStream writeStream; + + private final Handler dataHandler; + + private final Handler drainHandler; + + private int pumped; + + public PumpImpl(ReadStream readStream, WriteStream writeStream, int maxWriteQueueSize) { +this(readStream, writeStream); +this.writeStream.setWriteQueueMaxSize(maxWriteQueueSize); + } + + public PumpImpl(ReadStream readStream, WriteStream writeStream) { +this.readStream = readStream; +this.writeStream = writeStream; +drainHandler = v -> readStream.resume(); +dataHandler = data -> { + if (data instanceof Buffer) { +if (((Buffer) data).length() == 0) { + return; +} + } + writeStream.write(data); + incPumped(); + if (writeStream.writeQueueFull()) { +readStream.pause(); +writeStream.drainHandler(drainHandler); + } +}; + } + + + /** + * Set the write queue max size to {@code maxSize} + */ + @Override + public PumpImpl setWriteQueueMaxSize(int
[GitHub] coveralls commented on issue #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
coveralls commented on issue #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#issuecomment-441339625 [![Coverage Status](https://coveralls.io/builds/20267115/badge)](https://coveralls.io/builds/20267115) Coverage decreased (-0.03%) to 86.744% when pulling **b21e7d6cc1cd18acdf8f6813f0103730d5101cca on heyile:aggregated** into **ca4dea29d6a4c72cdebf28185c435ea69b7259dd on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030836 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java ## @@ -489,7 +534,7 @@ public String registerMicroserviceInstance(MicroserviceInstance instance) { CountDownLatch countDownLatch = new CountDownLatch(1); RestUtils.get(ipPort, String.format(Const.REGISTRY_API.MICROSERVICE_INSTANCE_OPERATION_ALL, providerId), -new RequestParam().addHeader("X-ConsumerId", consumerId), +new RequestParam().addHeader("X-ConsumerId", consumerId).addQueryParam("global", "true"), Review comment: no need to add global This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030818 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java ## @@ -356,6 +356,30 @@ public String getSchema(String microserviceId, String schemaId) { syncHandler(countDownLatch, GetSchemaResponse.class, holder)); try { countDownLatch.await(); +} catch (Exception e) { + LOGGER.error("query schema exist {}/{} failed", + schemaId, + e); +} +if (holder.value != null) { + return holder.value.getSchema(); +} + +return null; + } + + @Override + public String getAggregatedSchema(String microserviceId, String schemaId) { +Holder holder = new Holder<>(); Review comment: do not copy code just make global to be a parameter This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030804 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/LocalServiceRegistryClientImpl.java ## @@ -188,6 +188,11 @@ public Microservice getMicroservice(String microserviceId) { return microserviceIdMap.get(microserviceId); } + @Override + public Microservice getAggregatedMicroservice(String microserviceId) { +return microserviceIdMap.get(microserviceId); Review comment: do not copy code just invoke getMicroservice This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030797 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/LocalServiceRegistryClientImpl.java ## @@ -353,6 +358,16 @@ public String getSchema(String microserviceId, String schemaId) { return microservice.getSchemaMap().get(schemaId); } + @Override + public String getAggregatedSchema(String microserviceId, String schemaId) { Review comment: do not copy code just invoke getSchema This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030705 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/ServiceRegistry.java ## @@ -58,6 +58,15 @@ MicroserviceInstances findServiceInstances(String appId, String microserviceName Microservice getRemoteMicroservice(String microserviceId); + /** + * + *if connect to simple ServiceCenter, same with the method Review comment: normal, not "sample"? This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030674 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/RegistryUtils.java ## @@ -216,7 +216,7 @@ public static boolean updateInstanceProperties(Map instancePrope } public static Microservice getMicroservice(String microserviceId) { -return serviceRegistry.getRemoteMicroservice(microserviceId); +return serviceRegistry.getAggregatedRemoteMicroervice(microserviceId); Review comment: not change this This is an automated message from the Apache Git Service. To respond to the message, please log on 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] heyile opened a new pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator
heyile opened a new pull request #1007: [SCB-1039]Add interface to compatible with ServiceCenter Aggregator URL: https://github.com/apache/servicecomb-java-chassis/pull/1007 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#discussion_r236030571 ## File path: integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDefaultValue.java ## @@ -472,12 +524,21 @@ public void floatHeader_require_springmvc_rt() { @Test public void floatForm_require_springmvc_intf() { -assertEquals(defaultFloat, consumersSpringmvc.getIntf().floatFormRequire(null), 0.0f); +try { + consumersSpringmvc.getIntf().floatFormRequire(null); + assertEquals("required is true, throw exception", "but not throw exception"); +} catch (Exception e) { + assertEquals(true, e.getMessage().contains("Parameter is not valid")); +} } @Test public void floatForm_require_springmvc_rt() { -assertEquals(defaultFloat, - consumersSpringmvc.getSCBRestTemplate().postForObject("/floatFormRequire", null, float.class), 0.0f); +try { + consumersSpringmvc.getSCBRestTemplate().postForObject("/floatFormRequire", null, float.class); Review comment: Is this behavior change? We need to notice in RN. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] jeho0815 closed pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep…
jeho0815 closed pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep… URL: https://github.com/apache/servicecomb-java-chassis/pull/1006 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java index e85c51311..5e84b3c47 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java @@ -160,10 +160,10 @@ protected void safeSetInstances(List pulledInstances, Stri setInstances(pulledInstances, rev); validated = true; } catch (Throwable e) { - LOGGER.error("Failed to setInstances, appId={}, microserviceName={}.", - getAppId(), - getMicroserviceName(), - e); + LOGGER.error(String.format("Failed to setInstances, AppId=%s, MicroserviceName=%s.", + getAppId(), + getMicroserviceName()), + e); } } This is an automated message from the Apache Git Service. To respond to the message, please log on 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] jeho0815 commented on a change in pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep…
jeho0815 commented on a change in pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep… URL: https://github.com/apache/servicecomb-java-chassis/pull/1006#discussion_r236030517 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java ## @@ -160,10 +160,10 @@ protected void safeSetInstances(List pulledInstances, Stri setInstances(pulledInstances, rev); validated = true; } catch (Throwable e) { - LOGGER.error("Failed to setInstances, appId={}, microserviceName={}.", - getAppId(), - getMicroserviceName(), - e); + LOGGER.error(String.format("Failed to setInstances, AppId=%s, MicroserviceName=%s.", Review comment: yes, i will close it. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#discussion_r236030465 ## File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/FormProcessorCreator.java ## @@ -50,20 +52,33 @@ public Object getValue(HttpServletRequest request) { } if (targetType.isContainerType()) { -return convertValue(request.getParameterValues(paramPath), targetType); +Object values = request.getParameterValues(paramPath); +//Even if the paramPath does not exist, it won't be null at now, may be optimized in the future +if (values == null) { + values = checkRequiredAndDefaultValue(values); +} +return convertValue(values, targetType); } Object value = request.getParameter(paramPath); if (value == null) { -Object defaultValue = getDefaultValue(); -if (defaultValue != null) { - value = defaultValue; -} +value = checkRequiredAndDefaultValue(value); } return convertValue(value, targetType); } +private Object checkRequiredAndDefaultValue(Object values) { Review comment: values is always null, no need to pass this parameter This is an automated message from the Apache Git Service. To respond to the message, please log on 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] liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
liubao68 commented on a change in pull request #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#discussion_r236030429 ## File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/CookieProcessorCreator.java ## @@ -35,33 +38,41 @@ public static final String PARAMTYPE = "cookie"; public static class CookieProcessor extends AbstractParamProcessor { -public CookieProcessor(String paramPath, JavaType targetType, Object defaultValue) { - super(paramPath, targetType, defaultValue); +public CookieProcessor(String paramPath, JavaType targetType, Object defaultValue, boolean required) { + super(paramPath, targetType, defaultValue, required); } @Override public Object getValue(HttpServletRequest request) throws Exception { Cookie[] cookies = request.getCookies(); - if (cookies == null) { -return null; + Object value = null; + if (cookies == null || cookies.length == 0) { +value = checkRequiredAndDefaultValue(value); +return convertValue(value, targetType); } - String value = null; for (Cookie cookie : cookies) { if (paramPath.equals(cookie.getName())) { value = cookie.getValue(); - if (value == null) { -Object defaultValue = getDefaultValue(); -if (defaultValue != null) { - value = defaultValue.toString(); -} - } } } - + if (value == null) { +value = checkRequiredAndDefaultValue(value); + } return convertValue(value, targetType); } +private Object checkRequiredAndDefaultValue(Object value) { + if (isRequired()) { +throw new InvocationException(Status.BAD_REQUEST, "Parameter is not valid, required is true"); Review comment: "Parameter is reqired. " this message is better This is an automated message from the Apache Git Service. To respond to the message, please log on 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: [SCB-1038]Fix some bugs and logs improvement reported by users when testing
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 ca4dea2 [SCB-1038]Fix some bugs and logs improvement reported by users when testing ca4dea2 is described below commit ca4dea29d6a4c72cdebf28185c435ea69b7259dd Author: liubao AuthorDate: Fri Nov 23 17:08:18 2018 +0800 [SCB-1038]Fix some bugs and logs improvement reported by users when testing --- .../apache/servicecomb/loadbalance/LoadbalanceHandler.java | 12 +--- .../servicecomb/loadbalance/SessionStickinessRule.java | 1 + .../servicecomb/loadbalance/TestLoadbalanceHandler.java | 4 +--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java index d36c552..8547af5 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java @@ -35,10 +35,10 @@ import org.apache.servicecomb.core.Handler; import org.apache.servicecomb.core.Invocation; import org.apache.servicecomb.core.SCBEngine; import org.apache.servicecomb.core.Transport; -import org.apache.servicecomb.core.exception.ExceptionUtils; import org.apache.servicecomb.core.provider.consumer.SyncResponseExecutor; import org.apache.servicecomb.foundation.common.cache.VersionedCache; import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx; +import org.apache.servicecomb.foundation.common.utils.ExceptionUtils; import org.apache.servicecomb.loadbalance.filter.ServerDiscoveryFilter; import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext; import org.apache.servicecomb.serviceregistry.discovery.DiscoveryFilter; @@ -232,9 +232,7 @@ public class LoadbalanceHandler implements Handler { long time = System.currentTimeMillis(); ServiceCombServer server = chosenLB.chooseServer(invocation); if (null == server) { - asyncResp.consumerFail(ExceptionUtils.lbAddressNotFound(invocation.getMicroserviceName(), - invocation.getMicroserviceVersionRule(), - invocation.getConfigTransportName())); + asyncResp.consumerFail(new InvocationException(Status.INTERNAL_SERVER_ERROR, "No available address found.")); return; } chosenLB.getLoadBalancerStats().incrementNumRequests(server); @@ -295,7 +293,7 @@ public class LoadbalanceHandler implements Handler { context.getRequest().getEndpoint(), info.getNumberOfPastServersAttempted(), info.getNumberOfPastAttemptsOnServer(), -exception.getMessage()); +ExceptionUtils.getExceptionMessageWithoutTrace(exception)); } @Override @@ -319,7 +317,7 @@ public class LoadbalanceHandler implements Handler { public void onExecutionFailed(ExecutionContext context, Throwable finalException, ExecutionInfo info) { LOGGER.error("Invoke all server failed. Operation {}, e={}", -context.getRequest().getInvocationQualifiedName(), finalException.toString()); +context.getRequest().getInvocationQualifiedName(), ExceptionUtils.getExceptionMessageWithoutTrace(finalException)); if (orginExecutor != null) { orginExecutor.execute(() -> { fail(finalException); @@ -366,7 +364,7 @@ public class LoadbalanceHandler implements Handler { if (isFailedResponse(resp)) { LOGGER.error("service {}, call error, msg is {}, server is {} ", invocation.getInvocationQualifiedName(), -((Throwable) resp.getResult()).getMessage(), +ExceptionUtils.getExceptionMessageWithoutTrace((Throwable) resp.getResult()), s); chosenLB.getLoadBalancerStats().incrementSuccessiveConnectionFailureCount(s); ServiceCombLoadBalancerStats.INSTANCE.markFailure(server); diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java index a489860..a854a83 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java @@ -56,6 +56,7 @@ public class SessionStickinessRule implements RuleExt { } public void setLoadBalancer(LoadBalancer loadBalancer) { +this.microserviceName =
[GitHub] liubao68 closed pull request #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing
liubao68 closed pull request #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing URL: https://github.com/apache/servicecomb-java-chassis/pull/1005 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java index d36c55242..8547af52c 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java @@ -35,10 +35,10 @@ import org.apache.servicecomb.core.Invocation; import org.apache.servicecomb.core.SCBEngine; import org.apache.servicecomb.core.Transport; -import org.apache.servicecomb.core.exception.ExceptionUtils; import org.apache.servicecomb.core.provider.consumer.SyncResponseExecutor; import org.apache.servicecomb.foundation.common.cache.VersionedCache; import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx; +import org.apache.servicecomb.foundation.common.utils.ExceptionUtils; import org.apache.servicecomb.loadbalance.filter.ServerDiscoveryFilter; import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext; import org.apache.servicecomb.serviceregistry.discovery.DiscoveryFilter; @@ -232,9 +232,7 @@ private void send(Invocation invocation, AsyncResponse asyncResp, final LoadBala long time = System.currentTimeMillis(); ServiceCombServer server = chosenLB.chooseServer(invocation); if (null == server) { - asyncResp.consumerFail(ExceptionUtils.lbAddressNotFound(invocation.getMicroserviceName(), - invocation.getMicroserviceVersionRule(), - invocation.getConfigTransportName())); + asyncResp.consumerFail(new InvocationException(Status.INTERNAL_SERVER_ERROR, "No available address found.")); return; } chosenLB.getLoadBalancerStats().incrementNumRequests(server); @@ -295,7 +293,7 @@ public void onExceptionWithServer(ExecutionContext context, Throwabl context.getRequest().getEndpoint(), info.getNumberOfPastServersAttempted(), info.getNumberOfPastAttemptsOnServer(), -exception.getMessage()); +ExceptionUtils.getExceptionMessageWithoutTrace(exception)); } @Override @@ -319,7 +317,7 @@ public void onExecutionSuccess(ExecutionContext context, Response re public void onExecutionFailed(ExecutionContext context, Throwable finalException, ExecutionInfo info) { LOGGER.error("Invoke all server failed. Operation {}, e={}", -context.getRequest().getInvocationQualifiedName(), finalException.toString()); +context.getRequest().getInvocationQualifiedName(), ExceptionUtils.getExceptionMessageWithoutTrace(finalException)); if (orginExecutor != null) { orginExecutor.execute(() -> { fail(finalException); @@ -366,7 +364,7 @@ private void fail(Throwable finalException) { if (isFailedResponse(resp)) { LOGGER.error("service {}, call error, msg is {}, server is {} ", invocation.getInvocationQualifiedName(), -((Throwable) resp.getResult()).getMessage(), +ExceptionUtils.getExceptionMessageWithoutTrace((Throwable) resp.getResult()), s); chosenLB.getLoadBalancerStats().incrementSuccessiveConnectionFailureCount(s); ServiceCombLoadBalancerStats.INSTANCE.markFailure(server); diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java index a489860ed..a854a831a 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/SessionStickinessRule.java @@ -56,6 +56,7 @@ public SessionStickinessRule() { } public void setLoadBalancer(LoadBalancer loadBalancer) { +this.microserviceName = loadBalancer.getMicroServiceName(); this.loadBalancer = loadBalancer; } diff --git a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java index f7e263549..b20530dd4 100644 ---
[GitHub] wujimin commented on issue #1002: [SCB-1034] Metrics performance optimize
wujimin commented on issue #1002: [SCB-1034] Metrics performance optimize URL: https://github.com/apache/servicecomb-java-chassis/pull/1002#issuecomment-441337695 already merged in https://github.com/apache/servicecomb-java-chassis/pull/997 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] 04/10: [SCB-1034][WIP] os meters switch to new mechanism
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 commit e9381c9fbb920a20bd6c20cec9c0f4c20f4c720a Author: wujimin AuthorDate: Thu Nov 22 09:16:01 2018 +0800 [SCB-1034][WIP] os meters switch to new mechanism --- .../metrics/core/OsMetersInitializer.java | 15 --- .../metrics/core/meter/os/CpuMeter.java| 4 +- .../metrics/core/meter/os/NetMeter.java| 22 +- .../servicecomb/metrics/core/meter/os/OsMeter.java | 49 ++ .../metrics/core/TestOsMeterInitializer.java | 25 --- .../metrics/core/meter/os/TestNetMeter.java| 19 +++-- .../metrics/core/meter/os/TestOsMeter.java | 13 ++ 7 files changed, 50 insertions(+), 97 deletions(-) diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/OsMetersInitializer.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/OsMetersInitializer.java index f94cf18..783d0cc 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/OsMetersInitializer.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/OsMetersInitializer.java @@ -17,16 +17,16 @@ package org.apache.servicecomb.metrics.core; import org.apache.commons.lang3.SystemUtils; -import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig; import org.apache.servicecomb.foundation.metrics.MetricsInitializer; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import org.apache.servicecomb.metrics.core.meter.os.OsMeter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.eventbus.EventBus; -import com.netflix.spectator.api.CompositeRegistry; import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.SpectatorUtils; public class OsMetersInitializer implements MetricsInitializer { private static final Logger LOGGER = LoggerFactory.getLogger(OsMetersInitializer.class); @@ -34,16 +34,15 @@ public class OsMetersInitializer implements MetricsInitializer { private OsMeter osMeter; @Override - public void init(CompositeRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { + public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { if (!SystemUtils.IS_OS_LINUX) { LOGGER.info("only support linux os to collect cpu and net info"); return; } -DefaultRegistryInitializer defaultRegistryInitializer = SPIServiceUtils -.getTargetService(MetricsInitializer.class, DefaultRegistryInitializer.class); -Registry registry = defaultRegistryInitializer.getRegistry(); -osMeter = new OsMeter(registry, eventBus); -registry.register(osMeter); + +Registry registry = globalRegistry.getDefaultRegistry(); +osMeter = new OsMeter(registry); +SpectatorUtils.registerMeter(registry, osMeter); } public OsMeter getOsMeter() { diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/CpuMeter.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/CpuMeter.java index d6e916e..60f6cd2 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/CpuMeter.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/CpuMeter.java @@ -48,9 +48,9 @@ public class CpuMeter { rate = 0.0; } - public void calcMeasurements(List measurements, long timestap) { + public void calcMeasurements(List measurements, long msNow) { refreshCpu(); -measurements.add(new Measurement(id, timestap, rate)); +measurements.add(new Measurement(id, msNow, rate)); } /* diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/NetMeter.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/NetMeter.java index 1c1d59d..8396619 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/NetMeter.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/os/NetMeter.java @@ -26,7 +26,6 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.io.FileUtils; -import org.apache.servicecomb.foundation.metrics.PollEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,7 +50,6 @@ public class NetMeter { private Map interfaceInfoMap = new ConcurrentHashMap<>(); public static class InterfaceInfo { - private final String name; private Id sendId; @@ -76,12 +74,12 @@ public class NetMeter { this.receiveId = id.withTag(TAG_RECEIVE); } -public void
[servicecomb-java-chassis] 06/10: [SCB-1034][WIP] rest and Prometheus publisher switch to new mechanism
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 commit 10b916be22f3b0c1fa0fb0b9da2764109f2a4f7e Author: wujimin AuthorDate: Thu Nov 22 09:19:12 2018 +0800 [SCB-1034][WIP] rest and Prometheus publisher switch to new mechanism --- .../demo/springmvc/client/SpringmvcClient.java | 4 .../demo/springmvc/server/CodeFirstSpringmvc.java | 8 .../foundation/metrics/MetricsBootstrap.java | 2 +- .../metrics/core/MetricsBootListener.java | 4 .../metrics/core/publish/MetricsRestPublisher.java | 22 +++-- .../core/publish/TestMetricsRestPublisher.java | 5 ++--- .../metrics/prometheus/PrometheusPublisher.java| 23 -- .../prometheus/TestPrometheusPublisher.java| 5 ++--- 8 files changed, 42 insertions(+), 31 deletions(-) diff --git a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java index e380804..411aa11 100644 --- a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java +++ b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java @@ -125,10 +125,6 @@ public class SpringmvcClient { //TestMgr.check(true, metrics.get("jvm(name=heapUsed,statistic=gauge)") != 0); TestMgr.check(true, metrics.size() > 0); -TestMgr.check(true, -metrics.get( - "servicecomb.invocation(operation=springmvc.codeFirst.saySomething,role=PRODUCER,stage=total,statistic=count,status=200,transport=highway)") ->= 0); //prometheus integration test try { diff --git a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java index 0ab7487..36adfcb 100644 --- a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java +++ b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Part; import javax.ws.rs.QueryParam; @@ -44,6 +45,7 @@ import org.apache.servicecomb.demo.ignore.OutputModelForTestIgnore; import org.apache.servicecomb.demo.jaxbbean.JAXBPerson; import org.apache.servicecomb.demo.server.User; import org.apache.servicecomb.demo.springmvc.decoderesponse.DecodeTestResponse; +import org.apache.servicecomb.metrics.core.MetricsBootListener; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.apache.servicecomb.swagger.extend.annotations.RawJsonRequestBody; import org.apache.servicecomb.swagger.extend.annotations.ResponseHeaders; @@ -361,9 +363,15 @@ public class CodeFirstSpringmvc { return form1 + form2; } + @Inject + MetricsBootListener metricsBootListener; + //Only for Prometheus integration test @RequestMapping(path = "/prometheusForTest", method = RequestMethod.GET) public String prometheusForTest() { +// just for test, this makes client always can got latest metrics +metricsBootListener.getMetricsBootstrap().pollMeters(); + RestTemplate defaultRestTemplate = new RestTemplate(); return defaultRestTemplate.getForObject("http://localhost:9696/metrics;, String.class); } diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java index a63a98d..d2647f0 100644 --- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java +++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java @@ -72,7 +72,7 @@ public class MetricsBootstrap { TimeUnit.MILLISECONDS); } - protected void pollMeters() { + public synchronized void pollMeters() { long secondInterval = TimeUnit.MILLISECONDS.toSeconds(config.getMsPollInterval()); PolledEvent polledEvent = globalRegistry.poll(secondInterval); eventBus.post(polledEvent); diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/MetricsBootListener.java index be8963d..376c502 100644
[servicecomb-java-chassis] 10/10: [SCB-1021] publish vertx client/server meters to log
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 commit 229b3c2d40ae595a881cd7835fcb1f60b925a226 Author: wujimin AuthorDate: Mon Nov 12 16:52:36 2018 +0800 [SCB-1021] publish vertx client/server meters to log --- demo/perf/src/main/resources/microservice.yaml | 6 +- .../test/scaffolding/log/LogCollector.java | 4 + .../AbstractMeasurementNodeLogPublisher.java | 40 + .../metrics/core/publish/DefaultLogPublisher.java | 26 ++- .../core/publish/EndpointsLogPublisher.java| 78 + .../metrics/core/publish/PublishModelFactory.java | 8 + .../metrics/core/TestVertxMetersInitializer.java | 174 + 7 files changed, 332 insertions(+), 4 deletions(-) diff --git a/demo/perf/src/main/resources/microservice.yaml b/demo/perf/src/main/resources/microservice.yaml index ffa9c23..d460f19 100644 --- a/demo/perf/src/main/resources/microservice.yaml +++ b/demo/perf/src/main/resources/microservice.yaml @@ -38,10 +38,12 @@ servicecomb: client: thread-count: 8 references: -transport: rest +transport: highway metrics: window_time: 1000 -publisher.defaultLog.enabled: true +publisher.defaultLog: + enabled: true + endpoints.client.detail.enabled: true sync-count: 10 async-count: 20 diff --git a/foundations/foundation-test-scaffolding/src/main/java/org/apache/servicecomb/foundation/test/scaffolding/log/LogCollector.java b/foundations/foundation-test-scaffolding/src/main/java/org/apache/servicecomb/foundation/test/scaffolding/log/LogCollector.java index 53359e3..026408a 100644 --- a/foundations/foundation-test-scaffolding/src/main/java/org/apache/servicecomb/foundation/test/scaffolding/log/LogCollector.java +++ b/foundations/foundation-test-scaffolding/src/main/java/org/apache/servicecomb/foundation/test/scaffolding/log/LogCollector.java @@ -61,4 +61,8 @@ public class LogCollector { public void teardown() { Logger.getRootLogger().removeAppender(appender); } + + public void clear() { +events = new ArrayList<>(); + } } diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/AbstractMeasurementNodeLogPublisher.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/AbstractMeasurementNodeLogPublisher.java new file mode 100644 index 000..960c7b6 --- /dev/null +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/AbstractMeasurementNodeLogPublisher.java @@ -0,0 +1,40 @@ +/* + * 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.metrics.core.publish; + +import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementNode; +import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree; + +public abstract class AbstractMeasurementNodeLogPublisher { + protected StringBuilder sb; + + protected MeasurementNode measurementNode; + + private boolean exists; + + public AbstractMeasurementNodeLogPublisher(MeasurementTree tree, StringBuilder sb, String... childNames) { +this.sb = sb; +measurementNode = tree.findChild(childNames); +exists = measurementNode != null && !measurementNode.getMeasurements().isEmpty(); + } + + public boolean isExists() { +return exists; + } + + public abstract void print(boolean printDetail); +} diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java index 8259ff9..75a6642 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java @@ -30,6 +30,7 @@ import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementNo import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree; import
[servicecomb-java-chassis] 08/10: [SCB-1034] replace guava EventBus by simple version
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 commit a5834cbc56bae9e3c0c4086138d45e7a87c22fa3 Author: wujimin AuthorDate: Thu Nov 22 22:35:11 2018 +0800 [SCB-1034] replace guava EventBus by simple version --- .../foundation/common/event/EventBus.java | 79 --- .../foundation/common/event/EventListener.java | 26 -- .../foundation/common/event/EventManager.java | 2 +- .../foundation/common/event/SimpleEventBus.java| 92 ++ .../foundation/common/event/SimpleSubscriber.java | 85 .../foundation/common/event/TestEventBus.java | 84 .../foundation/common/event/TestEventManager.java | 66 +--- .../consumer/RSAConsumerTokenManager.java | 4 +- java-chassis-dependencies/pom.xml | 2 +- java-chassis-distribution/src/release/LICENSE | 2 +- ...rvicecomb.foundation.common.event.EventListener | 37 - 11 files changed, 235 insertions(+), 244 deletions(-) diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventBus.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventBus.java deleted file mode 100644 index 849089a..000 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventBus.java +++ /dev/null @@ -1,79 +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.foundation.common.event; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; - -import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx; -import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class EventBus { - private static final Logger LOGGER = LoggerFactory.getLogger(EventBus.class); - - //key is event object type,fast locate listener and fire - @SuppressWarnings("rawtypes") - private final Map> allEventListeners = new ConcurrentHashMapEx<>(); - - private static final EventBus INSTANCE = new EventBus(); - - public static EventBus getInstance() { -return INSTANCE; - } - - //event class will get from getEventClass method - @SuppressWarnings({"rawtypes"}) - private EventBus() { -List listeners = SPIServiceUtils.getAllService(EventListener.class); -for (EventListener listener : listeners) { - this.registerEventListener(listener); - LOGGER.info("EventBus register " + listener.getClass().getName() - + " for process " + listener.getEventClass().getName()); -} - } - - //event class will get from getEventClass method - @SuppressWarnings("rawtypes") - public void registerEventListener(EventListener eventListener) { -List eventListeners = allEventListeners -.computeIfAbsent(eventListener.getEventClass(), f -> new CopyOnWriteArrayList<>()); -eventListeners.add(eventListener); - } - - //event class will get from getEventClass method - @SuppressWarnings("rawtypes") - public void unregisterEventListener(EventListener eventListener) { -List eventListeners = allEventListeners -.computeIfAbsent(eventListener.getEventClass(), f -> new CopyOnWriteArrayList<>()); -if (eventListeners.contains(eventListener)) { - eventListeners.remove(eventListener); -} - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - public void triggerEvent(Object event) { -List eventListeners = allEventListeners.getOrDefault(event.getClass(), Collections.emptyList()); -for (EventListener eventListener : eventListeners) { - eventListener.process(event); -} - } -} diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventListener.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventListener.java deleted file mode 100644 index 7924e1d..000 ---
[servicecomb-java-chassis] branch master updated (defbfa4 -> 229b3c2)
This is an automated email from the ASF dual-hosted git repository. liubao pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git. from defbfa4 [SCB-986] Rename CseXXX to ScbXXX in discovery starter new e6def82 [SCB-1034] provide fast SimpleTimer to replace slow ServoTimer new 4175bbc [SCB-1034][WIP] globalRegistry switch from CompositeRegistry to GlobalRegistry new 746f42c [SCB-1034][WIP] invocation meters switch to new mechanism new e9381c9 [SCB-1034][WIP] os meters switch to new mechanism new 56a4668 [SCB-1034][WIP] threadPool meters switch to new mechanism new 10b916b [SCB-1034][WIP] rest and Prometheus publisher switch to new mechanism new 50365b8 [SCB-1034] log publisher switch to new mechanism new a5834cb [SCB-1034] replace guava EventBus by simple version new 5b38787 [SCB-1021] add vertx client/server meters new 229b3c2 [SCB-1021] publish vertx client/server meters to log The 10 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: .../core/transport/AbstractTransport.java | 8 +- .../demo/springmvc/client/SpringmvcClient.java | 4 - .../demo/springmvc/server/CodeFirstSpringmvc.java | 8 + demo/perf/src/main/resources/microservice.yaml | 6 +- .../foundation/common/event/EventBus.java | 79 -- .../foundation/common/event/EventListener.java | 26 -- .../foundation/common/event/EventManager.java | 2 +- .../foundation/common/event/SimpleEventBus.java| 92 +++ .../foundation/common/event/SimpleSubscriber.java | 85 +++ .../foundation/common/event/TestEventBus.java | 84 -- .../foundation/common/event/TestEventManager.java | 66 - .../com/netflix/spectator/api/SpectatorUtils.java | 22 +- .../foundation/metrics/MetricsBootstrap.java | 38 +-- .../foundation/metrics/MetricsBootstrapConfig.java | 3 + .../foundation/metrics/MetricsInitializer.java | 5 +- .../servicecomb/foundation/metrics/PollEvent.java | 32 --- .../metrics/meter/AbstractPeriodMeter.java | 33 +-- .../foundation/metrics/meter/PeriodMeter.java | 12 +- .../foundation/metrics/meter/SimpleTimer.java | 93 +++ .../metrics/publish/spectator/MeasurementTree.java | 2 +- .../metrics/registry/GlobalRegistry.java | 114 + .../foundation/metrics/TestMetricsBootstrap.java | 24 +- .../foundation/metrics/meter/TestSimpleTimer.java | 28 +- .../test/scaffolding/log/LogCollector.java | 4 + .../vertx/metrics/DefaultVertxMetrics.java | 17 +- .../metric/DefaultClientEndpointMetricManager.java | 13 +- .../metrics/metric/DefaultEndpointMetric.java | 32 +-- .../consumer/RSAConsumerTokenManager.java | 4 +- java-chassis-dependencies/pom.xml | 4 +- java-chassis-distribution/src/release/LICENSE | 6 +- .../metrics/core/DefaultRegistryInitializer.java | 20 +- .../metrics/core/InvocationMetersInitializer.java | 9 +- .../metrics/core/MetricsBootListener.java | 9 +- .../metrics/core/OsMetersInitializer.java | 15 +- .../metrics/core/ThreadPoolMetersInitializer.java | 9 +- .../metrics/core/VertxMetersInitializer.java | 61 + .../meter/invocation/AbstractInvocationMeter.java | 88 +-- .../meter/invocation/AbstractInvocationMeters.java | 10 +- .../meter/invocation/ConsumerInvocationMeter.java | 82 +++--- .../meter/invocation/ConsumerInvocationMeters.java | 7 +- .../core/meter/invocation/EdgeInvocationMeter.java | 52 ++-- .../meter/invocation/EdgeInvocationMeters.java | 7 +- .../meter/invocation/MeterInvocationConst.java | 49 ++-- .../meter/invocation/ProducerInvocationMeter.java | 58 ++--- .../meter/invocation/ProducerInvocationMeters.java | 7 +- .../metrics/core/meter/os/CpuMeter.java| 4 +- .../metrics/core/meter/os/NetMeter.java| 22 +- .../servicecomb/metrics/core/meter/os/OsMeter.java | 49 +--- .../metrics/core/meter/vertx/EndpointMeter.java| 96 +++ .../core/meter/vertx/VertxEndpointsMeter.java | 79 ++ ...va => AbstractMeasurementNodeLogPublisher.java} | 37 ++- .../metrics/core/publish/DefaultLogPublisher.java | 78 -- .../core/publish/EndpointsLogPublisher.java| 78 ++ .../metrics/core/publish/MetricsRestPublisher.java | 22 +- .../metrics/core/publish/PublishModelFactory.java | 8 + ...rvicecomb.foundation.common.event.EventListener | 37 --- ...rvicecomb.foundation.metrics.MetricsInitializer | 3 +- .../core/TestDefaultRegistryInitializer.java | 8 +- .../core/TestInvocationMetersInitializer.java | 187 --
[servicecomb-java-chassis] 07/10: [SCB-1034] log publisher switch to new mechanism
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 commit 50365b81584e8d68ecf947d02e0f7082f64bc507 Author: wujimin AuthorDate: Thu Nov 22 09:22:28 2018 +0800 [SCB-1034] log publisher switch to new mechanism --- .../metrics/publish/spectator/MeasurementTree.java | 2 +- .../metrics/core/publish/DefaultLogPublisher.java | 54 ++--- .../core/publish/TestDefaultLogPublisher.java | 56 +++--- 3 files changed, 57 insertions(+), 55 deletions(-) diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/publish/spectator/MeasurementTree.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/publish/spectator/MeasurementTree.java index a342f34..79101fa 100644 --- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/publish/spectator/MeasurementTree.java +++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/publish/spectator/MeasurementTree.java @@ -56,7 +56,7 @@ public class MeasurementTree extends MeasurementNode { Tag tag = tagFinder.find(id.tags()); if (tag == null) { if (tagFinder.skipOnNull()) { -return; +break; } throw new IllegalStateException( String.format("tag key \"%s\" not exist in %s", diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java index 6052f7e..8259ff9 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java @@ -28,6 +28,7 @@ import org.apache.servicecomb.foundation.metrics.MetricsInitializer; import org.apache.servicecomb.foundation.metrics.PolledEvent; import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementNode; import org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.metrics.core.meter.invocation.MeterInvocationConst; import org.apache.servicecomb.metrics.core.meter.os.NetMeter; @@ -44,7 +45,6 @@ import org.slf4j.LoggerFactory; import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; import com.netflix.config.DynamicPropertyFactory; -import com.netflix.spectator.api.CompositeRegistry; import com.netflix.spectator.api.Meter; import io.vertx.core.impl.VertxImplEx; @@ -56,30 +56,30 @@ public class DefaultLogPublisher implements MetricsInitializer { //sample private static final String SIMPLE_HEADER = "%s:\n simple:\n" - + "status tps latency operation\n"; + + "status tps latency operation\n"; - private static final String FIRST_LINE_SIMPLE_FORMAT = "%-15s %-13s %-42s %s\n"; + private static final String FIRST_LINE_SIMPLE_FORMAT = "%-15s %-8s %-19s %s\n"; - private static final String SIMPLE_FORMAT = "%-13s %-42s %s\n"; + private static final String SIMPLE_FORMAT = "%-8s %-19s %s\n"; //details - private static final String PRODUCER_DETAILS_FORMAT = - "prepare: %-22s queue : %-22s filtersReq : %-22s handlersReq: %s\n" - + "execute: %-22s handlersResp: %-22s filtersResp: %-22s sendResp : %s\n"; + private static final String PRODUCER_DETAILS_FORMAT = "" + + "prepare: %-19s queue : %-19s filtersReq : %-19s handlersReq: %s\n" + + "execute: %-19s handlersResp: %-19s filtersResp: %-19s sendResp : %s\n"; - private static final String CONSUMER_DETAILS_FORMAT = - "prepare : %-22s handlersReq : %-22s clientFiltersReq: %-22s sendReq : %s\n" - + "getConnect : %-22s writeBuf: %-22s waitResp : %-22s wakeConsumer: %s\n" - + "clientFiltersResp: %-22s handlersResp: %s\n"; + private static final String CONSUMER_DETAILS_FORMAT = "" + + "prepare : %-19s handlersReq : %-19s cFiltersReq: %-19s sendReq : %s\n" + + "getConnect : %-19s writeBuf: %-19s waitResp : %-19s wakeConsumer: %s\n" + + "cFiltersResp: %-19s handlersResp: %s\n"; - private static final String EDGE_DETAILS_FORMAT = - "prepare : %-22s queue : %-22s serverFiltersReq : %-22s handlersReq : %s\n" - + "
[servicecomb-java-chassis] 01/10: [SCB-1034] provide fast SimpleTimer to replace slow ServoTimer
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 commit e6def8244c6990aaf396212adfbdf75eda53d7c0 Author: wujimin AuthorDate: Thu Nov 22 08:57:49 2018 +0800 [SCB-1034] provide fast SimpleTimer to replace slow ServoTimer --- .../com/netflix/spectator/api/SpectatorUtils.java | 22 +++- .../AbstractPeriodMeter.java} | 30 -- .../foundation/metrics/meter/PeriodMeter.java} | 15 ++- .../foundation/metrics/meter/SimpleTimer.java | 93 + .../metrics/registry/GlobalRegistry.java | 114 + .../foundation/metrics/meter/TestSimpleTimer.java} | 31 -- .../metrics/metric/DefaultEndpointMetric.java | 32 +++--- java-chassis-dependencies/pom.xml | 2 +- java-chassis-distribution/src/release/LICENSE | 4 +- 9 files changed, 295 insertions(+), 48 deletions(-) diff --git a/foundations/foundation-test-scaffolding/src/main/java/com/netflix/spectator/api/SpectatorUtils.java b/foundations/foundation-metrics/src/main/java/com/netflix/spectator/api/SpectatorUtils.java similarity index 55% copy from foundations/foundation-test-scaffolding/src/main/java/com/netflix/spectator/api/SpectatorUtils.java copy to foundations/foundation-metrics/src/main/java/com/netflix/spectator/api/SpectatorUtils.java index 7a2f785..710 100644 --- a/foundations/foundation-test-scaffolding/src/main/java/com/netflix/spectator/api/SpectatorUtils.java +++ b/foundations/foundation-metrics/src/main/java/com/netflix/spectator/api/SpectatorUtils.java @@ -16,8 +16,24 @@ */ package com.netflix.spectator.api; -public class SpectatorUtils { - public static CompositeRegistry createCompositeRegistry(Clock clock) { -return new CompositeRegistry(clock); +public final class SpectatorUtils { + private SpectatorUtils() { + } + + public static Id createDefaultId(String name) { +return new DefaultId(name); + } + + public static void removeExpiredMeters(Registry registry) { +if (registry instanceof AbstractRegistry) { + ((AbstractRegistry) registry).removeExpiredMeters(); +} + } + + public static void registerMeter(Registry registry, Meter meter) { +if (!(registry instanceof AbstractRegistry)) { + throw new IllegalStateException("registry must be a AbstractRegistry, class=" + registry.getClass().getName()); +} +((AbstractRegistry) registry).getOrCreate(meter.id(), Meter.class, null, _id -> meter); } } diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/PollEvent.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/meter/AbstractPeriodMeter.java similarity index 60% copy from foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/PollEvent.java copy to foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/meter/AbstractPeriodMeter.java index 80a2055..d9e2f46 100644 --- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/PollEvent.java +++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/meter/AbstractPeriodMeter.java @@ -14,19 +14,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.servicecomb.foundation.metrics; +package org.apache.servicecomb.foundation.metrics.meter; -/** - * give not standard meters to calc measurement , eg : cpu usage, net throughput, and so on - */ -public class PollEvent { - private final long msPollInterval; +import java.util.Collections; +import java.util.List; + +import com.netflix.spectator.api.Id; +import com.netflix.spectator.api.Measurement; + +public abstract class AbstractPeriodMeter implements PeriodMeter { + protected Id id; + + protected List allMeasurements = Collections.emptyList(); + + public Id id() { +return id; + } - public PollEvent(long msPollInterval) { -this.msPollInterval = msPollInterval; + @Override + public Iterable measure() { +return allMeasurements; } - public long getMsPollInterval() { -return msPollInterval; + public boolean hasExpired() { +return false; } } diff --git a/foundations/foundation-test-scaffolding/src/main/java/com/netflix/spectator/api/SpectatorUtils.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/meter/PeriodMeter.java similarity index 68% rename from foundations/foundation-test-scaffolding/src/main/java/com/netflix/spectator/api/SpectatorUtils.java rename to foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/meter/PeriodMeter.java index 7a2f785..f91d781 100644 ---
[servicecomb-java-chassis] 09/10: [SCB-1021] add vertx client/server meters
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 commit 5b3878752627702355f62012b2d6a9e97a2e2111 Author: wujimin AuthorDate: Mon Nov 12 16:51:58 2018 +0800 [SCB-1021] add vertx client/server meters --- .../core/transport/AbstractTransport.java | 8 +- .../vertx/metrics/DefaultVertxMetrics.java | 17 +--- .../metric/DefaultClientEndpointMetricManager.java | 13 ++- .../metrics/core/VertxMetersInitializer.java | 61 ++ .../metrics/core/meter/vertx/EndpointMeter.java| 96 ++ .../core/meter/vertx/VertxEndpointsMeter.java | 79 ++ ...rvicecomb.foundation.metrics.MetricsInitializer | 3 +- 7 files changed, 257 insertions(+), 20 deletions(-) diff --git a/core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java b/core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java index 519fc1d..2d6ab98 100644 --- a/core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java +++ b/core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java @@ -59,9 +59,13 @@ public abstract class AbstractTransport implements Transport { private static final long DEFAULT_TIMEOUT_MILLIS = 3; // 所有transport使用同一个vertx实例,避免创建太多的线程 - public static TransportVertxFactory transportVertxFactory = new TransportVertxFactory(); + private static TransportVertxFactory transportVertxFactory = new TransportVertxFactory(); - protected Vertx transportVertx = transportVertxFactory.getTransportVertx(); + public static TransportVertxFactory getTransportVertxFactory() { +return transportVertxFactory; + } + + protected Vertx transportVertx = getTransportVertxFactory().getTransportVertx(); protected Endpoint endpoint; diff --git a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/DefaultVertxMetrics.java b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/DefaultVertxMetrics.java index e68e418..41cec77 100644 --- a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/DefaultVertxMetrics.java +++ b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/DefaultVertxMetrics.java @@ -49,8 +49,8 @@ public class DefaultVertxMetrics extends DummyVertxMetrics { public DefaultVertxMetrics(Vertx vertx, VertxOptions vertxOptions) { this.vertx = vertx; this.vertxOptions = vertxOptions; -// can not create DefaultClientEndpointMetricManager in this time -// because vertx is not inited +this.clientEndpointMetricManager = new DefaultClientEndpointMetricManager(vertx, +(MetricsOptionsEx) vertxOptions.getMetricsOptions()); } public Vertx getVertx() { @@ -65,17 +65,6 @@ public class DefaultVertxMetrics extends DummyVertxMetrics { return serverEndpointMetricMap; } - private void initClientEndpointMetricManager() { -if (clientEndpointMetricManager == null) { - synchronized (vertx) { -if (clientEndpointMetricManager == null) { - clientEndpointMetricManager = new DefaultClientEndpointMetricManager(vertx, - (MetricsOptionsEx) vertxOptions.getMetricsOptions()); -} - } -} - } - @Override public HttpServerMetrics createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { @@ -86,7 +75,6 @@ public class DefaultVertxMetrics extends DummyVertxMetrics { @Override public HttpClientMetrics createMetrics(HttpClient client, HttpClientOptions options) { -initClientEndpointMetricManager(); return new DefaultHttpClientMetrics(clientEndpointMetricManager); } @@ -99,7 +87,6 @@ public class DefaultVertxMetrics extends DummyVertxMetrics { @Override public TCPMetrics createMetrics(NetClientOptions options) { -initClientEndpointMetricManager(); return new DefaultTcpClientMetrics(clientEndpointMetricManager); } diff --git a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/metric/DefaultClientEndpointMetricManager.java b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/metric/DefaultClientEndpointMetricManager.java index c014d57..aa25d13 100644 --- a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/metric/DefaultClientEndpointMetricManager.java +++ b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/metrics/metric/DefaultClientEndpointMetricManager.java @@ -17,6 +17,7 @@ package org.apache.servicecomb.foundation.vertx.metrics.metric; import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; import
[servicecomb-java-chassis] 03/10: [SCB-1034][WIP] invocation meters switch to new mechanism
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 commit 746f42cf6d1211532fd848fdb30f8f9e8e99ba85 Author: wujimin AuthorDate: Thu Nov 22 09:12:35 2018 +0800 [SCB-1034][WIP] invocation meters switch to new mechanism --- .../metrics/core/InvocationMetersInitializer.java | 9 +- .../meter/invocation/AbstractInvocationMeter.java | 88 +-- .../meter/invocation/AbstractInvocationMeters.java | 10 +- .../meter/invocation/ConsumerInvocationMeter.java | 82 +++--- .../meter/invocation/ConsumerInvocationMeters.java | 7 +- .../core/meter/invocation/EdgeInvocationMeter.java | 52 ++-- .../meter/invocation/EdgeInvocationMeters.java | 7 +- .../meter/invocation/MeterInvocationConst.java | 49 ++-- .../meter/invocation/ProducerInvocationMeter.java | 58 ++--- .../meter/invocation/ProducerInvocationMeters.java | 7 +- .../core/TestInvocationMetersInitializer.java | 187 -- .../publish/TestInvocationPublishModelFactory.java | 281 +++-- 12 files changed, 557 insertions(+), 280 deletions(-) diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/InvocationMetersInitializer.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/InvocationMetersInitializer.java index 72a05ef..d265434 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/InvocationMetersInitializer.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/InvocationMetersInitializer.java @@ -19,9 +19,9 @@ package org.apache.servicecomb.metrics.core; import org.apache.servicecomb.core.Invocation; import org.apache.servicecomb.core.event.InvocationFinishEvent; import org.apache.servicecomb.core.event.InvocationStartEvent; -import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig; import org.apache.servicecomb.foundation.metrics.MetricsInitializer; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import org.apache.servicecomb.metrics.core.meter.ConsumerMeters; import org.apache.servicecomb.metrics.core.meter.EdgeMeters; import org.apache.servicecomb.metrics.core.meter.ProducerMeters; @@ -30,7 +30,6 @@ import org.apache.servicecomb.metrics.core.meter.invocation.AbstractInvocationMe import com.google.common.eventbus.AllowConcurrentEvents; import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; -import com.netflix.spectator.api.CompositeRegistry; import com.netflix.spectator.api.Registry; public class InvocationMetersInitializer implements MetricsInitializer { @@ -41,10 +40,8 @@ public class InvocationMetersInitializer implements MetricsInitializer { private EdgeMeters edgeMeters; @Override - public void init(CompositeRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { -DefaultRegistryInitializer defaultRegistryInitializer = -SPIServiceUtils.getTargetService(MetricsInitializer.class, DefaultRegistryInitializer.class); -Registry registry = defaultRegistryInitializer.getRegistry(); + public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { +Registry registry = globalRegistry.getDefaultRegistry(); consumerMeters = new ConsumerMeters(registry); producerMeters = new ProducerMeters(registry); diff --git a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/invocation/AbstractInvocationMeter.java b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/invocation/AbstractInvocationMeter.java index dd0851e..3023602 100644 --- a/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/invocation/AbstractInvocationMeter.java +++ b/metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/meter/invocation/AbstractInvocationMeter.java @@ -16,52 +16,84 @@ */ package org.apache.servicecomb.metrics.core.meter.invocation; -import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; -import org.apache.servicecomb.core.Invocation; import org.apache.servicecomb.core.event.InvocationFinishEvent; -import org.apache.servicecomb.swagger.invocation.Response; +import org.apache.servicecomb.core.invocation.InvocationStageTrace; +import org.apache.servicecomb.foundation.metrics.meter.AbstractPeriodMeter; +import org.apache.servicecomb.foundation.metrics.meter.SimpleTimer; import com.netflix.spectator.api.Id; +import com.netflix.spectator.api.Measurement; import com.netflix.spectator.api.Registry; -import com.netflix.spectator.api.Timer; -public abstract class AbstractInvocationMeter { +public abstract class AbstractInvocationMeter extends AbstractPeriodMeter { + private final
[servicecomb-java-chassis] 02/10: [SCB-1034][WIP] globalRegistry switch from CompositeRegistry to GlobalRegistry
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 commit 4175bbcf5e52fb3356a3d357eed57d11ba58bbde Author: wujimin AuthorDate: Thu Nov 22 09:08:32 2018 +0800 [SCB-1034][WIP] globalRegistry switch from CompositeRegistry to GlobalRegistry --- .../foundation/metrics/MetricsBootstrap.java | 36 ++ .../foundation/metrics/MetricsBootstrapConfig.java | 3 ++ .../foundation/metrics/MetricsInitializer.java | 5 +-- .../foundation/metrics/TestMetricsBootstrap.java | 24 ++- .../metrics/core/DefaultRegistryInitializer.java | 20 ++-- .../metrics/core/MetricsBootListener.java | 5 ++- .../core/TestDefaultRegistryInitializer.java | 8 ++--- 7 files changed, 40 insertions(+), 61 deletions(-) diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java index 3180973..a63a98d 100644 --- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java +++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java @@ -24,17 +24,13 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; -import com.google.common.collect.Lists; import com.google.common.eventbus.EventBus; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import com.netflix.spectator.api.CompositeRegistry; -import com.netflix.spectator.api.Measurement; -import com.netflix.spectator.api.Meter; public class MetricsBootstrap { - - private CompositeRegistry globalRegistry; + private GlobalRegistry globalRegistry; private EventBus eventBus; @@ -42,7 +38,7 @@ public class MetricsBootstrap { private ScheduledExecutorService executorService; - public void start(CompositeRegistry globalRegistry, EventBus eventBus) { + public void start(GlobalRegistry globalRegistry, EventBus eventBus) { this.globalRegistry = globalRegistry; this.eventBus = eventBus; this.executorService = Executors.newScheduledThreadPool(1, @@ -61,36 +57,24 @@ public class MetricsBootstrap { List initializers = new ArrayList<>(SPIServiceUtils.getSortedService(MetricsInitializer.class)); Collections.reverse(initializers); -initializers.forEach(initializer -> { - initializer.destroy(); -}); +initializers.forEach(initializer -> initializer.destroy()); } protected void loadMetricsInitializers() { - SPIServiceUtils.getSortedService(MetricsInitializer.class).forEach(initializer -> { - initializer.init(globalRegistry, eventBus, config); -}); +SPIServiceUtils.getSortedService(MetricsInitializer.class) +.forEach(initializer -> initializer.init(globalRegistry, eventBus, config)); } protected void startPoll() { executorService.scheduleAtFixedRate(this::pollMeters, -config.getMsPollInterval(), +0, config.getMsPollInterval(), TimeUnit.MILLISECONDS); } protected void pollMeters() { -eventBus.post(new PollEvent(config.getMsPollInterval())); -List meters = Lists.newArrayList(globalRegistry.iterator()); -// must collect measurements -// otherwise if there is no any period publisher, normal publisher maybe get NaN values -List measurements = new ArrayList<>(); -for (Meter meter : meters) { - meter.measure().forEach(measurements::add); -} - -PolledEvent event = new PolledEvent(meters, measurements); - -eventBus.post(event); +long secondInterval = TimeUnit.MILLISECONDS.toSeconds(config.getMsPollInterval()); +PolledEvent polledEvent = globalRegistry.poll(secondInterval); +eventBus.post(polledEvent); } } diff --git a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrapConfig.java b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrapConfig.java index d1b6be7..09322ca 100644 --- a/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrapConfig.java +++ b/foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrapConfig.java @@ -28,6 +28,9 @@ public class MetricsBootstrapConfig { public MetricsBootstrapConfig() { msPollInterval = DynamicPropertyFactory.getInstance().getIntProperty(METRICS_WINDOW_TIME, DEFAULT_METRICS_WINDOW_TIME).get(); +if (msPollInterval < 1000) { + msPollInterval = 1000; +} }
[servicecomb-java-chassis] 05/10: [SCB-1034][WIP] threadPool meters switch to new mechanism
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 commit 56a4668eb748d4a78bc620fb88d1d289f2b16c6f Author: wujimin AuthorDate: Thu Nov 22 09:17:27 2018 +0800 [SCB-1034][WIP] threadPool meters switch to new mechanism --- .../metrics/core/ThreadPoolMetersInitializer.java | 9 ++ .../core/TestThreadPoolMetersInitializer.java | 33 +- .../publish/TestThreadPoolPublishModelFactory.java | 2 ++ 3 files changed, 18 insertions(+), 26 deletions(-) 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 1637cfb..621fd0f 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 @@ -27,12 +27,11 @@ 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.foundation.common.utils.BeanUtils; -import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig; import org.apache.servicecomb.foundation.metrics.MetricsInitializer; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import com.google.common.eventbus.EventBus; -import com.netflix.spectator.api.CompositeRegistry; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.patterns.ThreadPoolMonitor; @@ -40,10 +39,8 @@ public class ThreadPoolMetersInitializer implements MetricsInitializer { private Registry registry; @Override - public void init(CompositeRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { -DefaultRegistryInitializer defaultRegistryInitializer = -SPIServiceUtils.getTargetService(MetricsInitializer.class, DefaultRegistryInitializer.class); -registry = defaultRegistryInitializer.getRegistry(); + public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) { +registry = globalRegistry.getDefaultRegistry(); createThreadPoolMeters(); } 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 378743d..4942ccf 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; import java.util.concurrent.RunnableScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; @@ -33,31 +34,31 @@ 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.foundation.common.utils.BeanUtils; -import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; -import org.apache.servicecomb.foundation.metrics.MetricsInitializer; +import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; +import org.mockito.Mockito; import org.springframework.context.ApplicationContext; import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.ManualClock; import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.patterns.PolledMeter; + import mockit.Expectations; import mockit.Mock; import mockit.MockUp; import mockit.Mocked; public class TestThreadPoolMetersInitializer { + GlobalRegistry globalRegistry = new GlobalRegistry(); + Registry registry = new DefaultRegistry(new ManualClock()); ThreadPoolMetersInitializer threadPoolMetersInitializer = new ThreadPoolMetersInitializer(); - @Mocked - DefaultRegistryInitializer defaultRegistryInitializer; - - @Mocked - ThreadPoolExecutor threadPoolExecutor; + ThreadPoolExecutor threadPoolExecutor = Mockito.mock(ThreadPoolExecutor.class); @Mocked BlockingQueue queue; @@ -65,8 +66,7 @@ public class TestThreadPoolMetersInitializer { @Mocked FixedThreadExecutor fixedThreadExecutor; - @Mocked
[GitHub] coveralls commented on issue #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep…
coveralls commented on issue #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep… URL: https://github.com/apache/servicecomb-java-chassis/pull/1006#issuecomment-441337380 [![Coverage Status](https://coveralls.io/builds/20266889/badge)](https://coveralls.io/builds/20266889) Coverage decreased (-0.02%) to 86.7% when pulling **8d45b1a575f8830822b3ec1d4bcda5ea15409e3e on jeho0815:Branch_master_SCB1043** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] wujimin commented on a change in pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep…
wujimin commented on a change in pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep… URL: https://github.com/apache/servicecomb-java-chassis/pull/1006#discussion_r236029857 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java ## @@ -160,10 +160,10 @@ protected void safeSetInstances(List pulledInstances, Stri setInstances(pulledInstances, rev); validated = true; } catch (Throwable e) { - LOGGER.error("Failed to setInstances, appId={}, microserviceName={}.", - getAppId(), - getMicroserviceName(), - e); + LOGGER.error(String.format("Failed to setInstances, AppId=%s, MicroserviceName=%s.", Review comment: when will lost exception? by my test, never happened. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] jeho0815 opened a new pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep…
jeho0815 opened a new pull request #1006: [SCB-1043] fix bug: if safeSetInstances throw an exception, the excep… URL: https://github.com/apache/servicecomb-java-chassis/pull/1006 …tion message will lost Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #997: [SCB-1021] Add vertx client server meters
coveralls edited a comment on issue #997: [SCB-1021] Add vertx client server meters URL: https://github.com/apache/servicecomb-java-chassis/pull/997#issuecomment-439906101 [![Coverage Status](https://coveralls.io/builds/20266785/badge)](https://coveralls.io/builds/20266785) Coverage increased (+0.06%) to 86.772% when pulling **ab21b7e67432d22d647165f3de5a5845617cb4a1 on wujimin:add-vertx-client-server-meters** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] codecov-io edited a comment on issue #498: SCB-993 Add the requirement of scctl
codecov-io edited a comment on issue #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498#issuecomment-441254296 # [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=h1) Report > Merging [#498](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=desc) into [master](https://codecov.io/gh/apache/servicecomb-service-center/commit/49428294a99f2a475203a7ceb04ce8d5754feb77?src=pr=desc) will **decrease** coverage by `0.02%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=tree) ```diff @@Coverage Diff @@ ## master #498 +/- ## == - Coverage 59.25% 59.23% -0.03% == Files 166 166 Lines 1388013880 == - Hits 8225 8222 -3 Misses 5072 5072 - Partials 583 586 +3 ``` | [Impacted Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/plugin/pkg/registry/etcd/tracing.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC90cmFjaW5nLmdv) | `72.72% <0%> (-9.1%)` | :arrow_down: | | [server/service/tag.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `67.4% <0%> (-0.56%)` | :arrow_down: | | [server/broker/util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci91dGlsLmdv) | `53.2% <0%> (-0.27%)` | :arrow_down: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=footer). Last update [4942829...91e6b59](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on 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] sxcooler closed issue #497: Is scctl really available?
sxcooler closed issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] sxcooler commented on issue #497: Is scctl really available?
sxcooler commented on issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497#issuecomment-441310200 @little-cui I'm sorry that I was in a rush by then so I didn't understand what u really said. I just build service-center from source and it works fine with scctl built last afternoon. so maybe your binary distribution need a rc4 now ^_^ This is an automated message from the Apache Git Service. To respond to the message, please log on 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] sxcooler edited a comment on issue #497: Is scctl really available?
sxcooler edited a comment on issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497#issuecomment-441207403 @little-cui I've already used the latest version(2018-11-21 4942829 (HEAD -> master, origin/master, origin/HEAD) SCB-993 search sc cluster when key mismatch with aggregator cache (#493) [little-cui]) This is an automated message from the Apache Git Service. To respond to the message, please log on 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] kingpage2018 closed issue #340: Saga嵌套事务支持,及如何实现前向恢复(重试)的处理
kingpage2018 closed issue #340: Saga嵌套事务支持,及如何实现前向恢复(重试)的处理 URL: https://github.com/apache/servicecomb-saga/issues/340 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] kingpage2018 commented on issue #340: Saga嵌套事务支持,及如何实现前向恢复(重试)的处理
kingpage2018 commented on issue #340: Saga嵌套事务支持,及如何实现前向恢复(重试)的处理 URL: https://github.com/apache/servicecomb-saga/issues/340#issuecomment-441267945 @zhfeng @WillemJiang Thank you for your warm answers. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] codecov-io commented on issue #499: SCB-1041 scctl version command does not print sc verison
codecov-io commented on issue #499: SCB-1041 scctl version command does not print sc verison URL: https://github.com/apache/servicecomb-service-center/pull/499#issuecomment-441259819 # [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=h1) Report > Merging [#499](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=desc) into [master](https://codecov.io/gh/apache/servicecomb-service-center/commit/49428294a99f2a475203a7ceb04ce8d5754feb77?src=pr=desc) will **decrease** coverage by `0.02%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/499/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=tree) ```diff @@Coverage Diff @@ ## master #499 +/- ## == - Coverage 59.25% 59.23% -0.03% == Files 166 166 Lines 1388013880 == - Hits 8225 8222 -3 Misses 5072 5072 - Partials 583 586 +3 ``` | [Impacted Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/plugin/pkg/registry/etcd/tracing.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/499/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC90cmFjaW5nLmdv) | `72.72% <0%> (-9.1%)` | :arrow_down: | | [pkg/tlsutil/tlsutil.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/499/diff?src=pr=tree#diff-cGtnL3Rsc3V0aWwvdGxzdXRpbC5nbw==) | `73.58% <0%> (-0.95%)` | :arrow_down: | | [server/service/tag.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/499/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `67.4% <0%> (-0.56%)` | :arrow_down: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=footer). Last update [4942829...a86b662](https://codecov.io/gh/apache/servicecomb-service-center/pull/499?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls commented on issue #499: SCB-1041 scctl version command does not print sc verison
coveralls commented on issue #499: SCB-1041 scctl version command does not print sc verison URL: https://github.com/apache/servicecomb-service-center/pull/499#issuecomment-441259764 [![Coverage Status](https://coveralls.io/builds/20261047/badge)](https://coveralls.io/builds/20261047) Coverage decreased (-0.03%) to 61.627% when pulling **a86b6620a6df8ea4109e5c9ccc453850deb5f4d1 on little-cui:bug** into **49428294a99f2a475203a7ceb04ce8d5754feb77 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui commented on issue #499: SCB-1041 scctl version command does not print sc verison
little-cui commented on issue #499: SCB-1041 scctl version command does not print sc verison URL: https://github.com/apache/servicecomb-service-center/pull/499#issuecomment-441254578 #497 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls commented on issue #498: SCB-993 Add the requirement of scctl
coveralls commented on issue #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498#issuecomment-441254509 [![Coverage Status](https://coveralls.io/builds/20260744/badge)](https://coveralls.io/builds/20260744) Coverage decreased (-0.04%) to 61.625% when pulling **e7675bc2feb4fc54d4b9e1f19f3459047c3d1b13 on little-cui:docs** into **49428294a99f2a475203a7ceb04ce8d5754feb77 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui opened a new pull request #499: SCB-1041 scctl version command does not print sc verison
little-cui opened a new pull request #499: SCB-1041 scctl version command does not print sc verison URL: https://github.com/apache/servicecomb-service-center/pull/499 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `go build` `go test` `go fmt` `go vet` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] codecov-io commented on issue #498: SCB-993 Add the requirement of scctl
codecov-io commented on issue #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498#issuecomment-441254296 # [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=h1) Report > Merging [#498](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=desc) into [master](https://codecov.io/gh/apache/servicecomb-service-center/commit/49428294a99f2a475203a7ceb04ce8d5754feb77?src=pr=desc) will **increase** coverage by `0.01%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=tree) ```diff @@Coverage Diff @@ ## master #498 +/- ## == + Coverage 59.25% 59.27% +0.01% == Files 166 166 Lines 1388013880 == + Hits 8225 8227 +2 Misses 5072 5072 + Partials 583 581 -2 ``` | [Impacted Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/tag.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `67.4% <0%> (-0.56%)` | :arrow_down: | | [pkg/log/logrotate.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-cGtnL2xvZy9sb2dyb3RhdGUuZ28=) | `34.28% <0%> (+0.57%)` | :arrow_up: | | [server/service/notification/websocket.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvbm90aWZpY2F0aW9uL3dlYnNvY2tldC5nbw==) | `84.51% <0%> (+0.64%)` | :arrow_up: | | [...erver/plugin/pkg/tracing/buildin/file\_collector.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/498/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdHJhY2luZy9idWlsZGluL2ZpbGVfY29sbGVjdG9yLmdv) | `64.07% <0%> (+0.97%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=footer). Last update [4942829...e7675bc](https://codecov.io/gh/apache/servicecomb-service-center/pull/498?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui opened a new pull request #498: SCB-993 Add the requirement of scctl
little-cui opened a new pull request #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `go build` `go test` `go fmt` `go vet` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui commented on issue #498: SCB-993 Add the requirement of scctl
little-cui commented on issue #498: SCB-993 Add the requirement of scctl URL: https://github.com/apache/servicecomb-service-center/pull/498#issuecomment-441249300 #497 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui commented on issue #497: Is scctl really available?
little-cui commented on issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497#issuecomment-441247665 It is strange! It is work in my env... ```bash MacBook-Air:~ $go version go version go1.11 darwin/amd64 # build the sc with the latest code MacBook-Air:~ $git clone https://github.com/apache/servicecomb-service-center.git $GOPATH/src/github.com/apache/servicecomb-service-center MacBook-Air:~ $cd $GOPATH/src/github.com/apache/servicecomb-service-center MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center $go build -o etc/service-center main.go MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center $cd etc MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center $./service-center ... # build the scctl with the latest code MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center $cd scctl/ MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center/scctl $go build MacBook-Air:~/Downloads/prj/go/src/github.com/apache/servicecomb-service-center/scctl $./scctl version scctl Version: 0.0.1 Build tag: Not provided Go version: go1.11 OS/Arch: darwin/amd64 ``` This is an automated message from the Apache Git Service. To respond to the message, please log on 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] codecov-io edited a comment on issue #496: SCB-1032 Support compress the response
codecov-io edited a comment on issue #496: SCB-1032 Support compress the response URL: https://github.com/apache/servicecomb-service-center/pull/496#issuecomment-440691271 # [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=h1) Report > Merging [#496](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=desc) into [master](https://codecov.io/gh/apache/servicecomb-service-center/commit/49428294a99f2a475203a7ceb04ce8d5754feb77?src=pr=desc) will **not change** coverage. > The diff coverage is `0%`. [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #496 +/- ## === Coverage 59.25% 59.25% === Files 166 166 Lines 1388013880 === Hits 8225 8225 Misses 5072 5072 Partials 583 583 ``` | [Impacted Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=tree) | Coverage Δ | | |---|---|---| | [...er/plugin/pkg/discovery/servicecenter/aggregate.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L3NlcnZpY2VjZW50ZXIvYWdncmVnYXRlLmdv) | `8% <0%> (ø)` | :arrow_up: | | [server/service/tag.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `67.4% <0%> (-0.56%)` | :arrow_down: | | [server/broker/util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci91dGlsLmdv) | `53.2% <0%> (-0.27%)` | :arrow_down: | | [server/govern/service.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/diff?src=pr=tree#diff-c2VydmVyL2dvdmVybi9zZXJ2aWNlLmdv) | `72.93% <0%> (+0.33%)` | :arrow_up: | | [pkg/log/logrotate.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/496/diff?src=pr=tree#diff-cGtnL2xvZy9sb2dyb3RhdGUuZ28=) | `34.28% <0%> (+0.57%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=footer). Last update [4942829...32d0e20](https://codecov.io/gh/apache/servicecomb-service-center/pull/496?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on 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
svn commit: r31056 - /dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/
Author: asifdxtreme Date: Fri Nov 23 11:09:25 2018 New Revision: 31056 Log: Add ServiceComb Service-Center 1.1.0 RC-02 Release Added: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/ dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.asc (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.sha512 (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz.asc (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz.sha512 (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-src.tar.gz (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-src.tar.gz.asc (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-src.tar.gz.sha512 (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-windows-amd64.tar.gz (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-windows-amd64.tar.gz.asc (with props) dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-windows-amd64.tar.gz.sha512 (with props) Added: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz == Binary file - no diff available. Propchange: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz -- svn:mime-type = application/octet-stream Added: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.asc == --- dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.asc (added) +++ dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.asc Fri Nov 23 11:09:25 2018 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEQsDXlA/N5eYw5Krj3JP2lr16TWkFAlv33yMACgkQ3JP2lr16 +TWn4ihAAjMBDyzzIoRTlC4cD6W+AmKtek+uo+yQ+SWpb82+2ugGVuRzOyiXpSTQF +wgmVyH5TguN7IqKD5c+Z5LK+WZQRSQT4Dzt9YONmXhZHD19+6ru2IIQ+xbnLq8Xa +NBWRhKtLaORli5R0Y1hqXZoIxtybyhjOYMdtgLpSQ2kzyPlWEWqWA9fXqcxddAhm +pD/sHceCcDJC5QWYc3K0cOknexq7M7bs+qR3juEDJCAYYs7wRv8EAsaSOGreKtD2 +uTchVArJFPNK5wYH9jZXkGVzBlgji6rqHShDmiA+uvO08WfwQICEEgzjWlI9mmqv +Qmf9JhMhaHeyxzfSiNJOz4CUL8xniziXf05th/gQzFwNRssbejSwb6JbyGnSW+Kh +uyLiaM7klC42M9mU8WAcdSzqicjGKD6aRRpyisFXTF6I9TnkSD4VGro6V7mc6yWb +PS/74/VaV4Xok9vKOeNau8RV+tvXeNSWe4WNLVjzFm35kSi60eUnGVlivk4CllTP +IVVndBoTLUYMxtCGIP0oBZH7sS+4rLutfXUFRpVmhqP3enRrqjnXP/UgduXsCoG3 +geXgW7u7zNyapYo7RgDQCUFj+z0Uz+Zsd/My9W0rQQTpHEtpbY7KeFHM/rbtJ8iI +mJmDUgD34pEzm5uRAqz5jUaolkmEXFu6e1yVBNYLjrAHlgXn8mc= +=ZbsD +-END PGP SIGNATURE- Propchange: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.asc -- svn:eol-style = native Added: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.sha512 == --- dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.sha512 (added) +++ dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.sha512 Fri Nov 23 11:09:25 2018 @@ -0,0 +1 @@ +671a629ae1ddb7f5bafd9d6cd3c5eff1fea7b3d0be0c3da7e6298ecd879fe421499d7f594402931365ff154776c3863f49a79e8402f2b9c8edb9fc150221713d apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz Propchange: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-darwin-amd64.tar.gz.sha512 -- svn:eol-style = native Added: dev/servicecomb/servicecomb-service-center/1.1.0/rc-02/apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz
[servicecomb-service-center] annotated tag 1.1.0 updated (4942829 -> 48dba30)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a change to annotated tag 1.1.0 in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git. *** WARNING: tag 1.1.0 was modified! *** from 4942829 (commit) to 48dba30 (tag) tagging 49428294a99f2a475203a7ceb04ce8d5754feb77 (commit) replaces 1.0.0 by asifdxtreme on Fri Nov 23 16:22:47 2018 +0530 - Log - Service-Center 1.1.0 Release --- No new revisions were added by this update. Summary of changes:
[servicecomb-service-center] annotated tag 1.1.0 deleted (was add1c45)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a change to annotated tag 1.1.0 in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git. *** WARNING: tag 1.1.0 was deleted! *** tag was add1c45 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.
[GitHub] coveralls edited a comment on issue #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing
coveralls edited a comment on issue #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing URL: https://github.com/apache/servicecomb-java-chassis/pull/1005#issuecomment-441192550 [![Coverage Status](https://coveralls.io/builds/20257491/badge)](https://coveralls.io/builds/20257491) Coverage decreased (-0.02%) to 86.695% when pulling **3a3322f66e3c0f827f5459ae7c36fe394cc23419 on liubao68:fix_inpr** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] asifdxtreme closed issue #485: Latest code binaries creates core-dump
asifdxtreme closed issue #485: Latest code binaries creates core-dump URL: https://github.com/apache/servicecomb-service-center/issues/485 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] little-cui commented on issue #497: Is scctl really available?
little-cui commented on issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497#issuecomment-441200231 Please compile Service-Center with the latest source code and retry. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] asifdxtreme commented on issue #497: Is scctl really available?
asifdxtreme commented on issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497#issuecomment-441199780 Hi @sxcooler , thanks for raising this concern. scctl will be available from 1.1.0 release onwards in the release package, we are expecting 1.1.0 release to be available by end of this month. For 404 issue, I guess you can check the status of Service-Center first, service-center needs to be running for scctl to connect. We will be updating the platform information soon This is an automated message from the Apache Git Service. To respond to the message, please log on 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] sxcooler opened a new issue #497: Is scctl really available?
sxcooler opened a new issue #497: Is scctl really available? URL: https://github.com/apache/servicecomb-service-center/issues/497 **Describe the bug** I can't use scctl except the "version" command. **To Reproduce** Steps to reproduce the behavior: 1. follow the guide in https://github.com/apache/servicecomb-service-center/blob/master/scctl/README.md ![image](https://user-images.githubusercontent.com/3192045/48937535-615dfa00-ef49-11e8-8be5-84eeba09604f.png) 2. after build, I ran "./scctl get service" 3. then I got "Internal server error(404 page not found )" **Expected behavior** scctl behavior like the doc(https://github.com/apache/servicecomb-service-center/blob/master/scctl/pkg/plugin/README.md) said. **Platform (please complete the following information):** - OS: MacOS 10.13.6 - Browser Doesn't matter - Version 0.0.1 scctl Version: 0.0.1 Build tag: Not provided Go version: go1.11.2 OS/Arch: darwin/amd64 **Additional context** btw I can't find scctl binary in the package from https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/ (like https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0/rc-03/apache-servicecomb-incubating-service-center-1.0.0-darwin-amd64.tar.gz) This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
coveralls edited a comment on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#issuecomment-441166462 [![Coverage Status](https://coveralls.io/builds/20257049/badge)](https://coveralls.io/builds/20257049) Coverage decreased (-0.1%) to 86.582% when pulling **ced95605966d2984ef592c2c59213d9261a72e3f on weichao666:defaultvaluenew** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls commented on issue #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing
coveralls commented on issue #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing URL: https://github.com/apache/servicecomb-java-chassis/pull/1005#issuecomment-441192550 [![Coverage Status](https://coveralls.io/builds/20256876/badge)](https://coveralls.io/builds/20256876) Coverage decreased (-0.02%) to 86.699% when pulling **11233f6ce3bc212d6a19e956dfcb7233ae7f56ab on liubao68:fix_inpr** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] weichao666 commented on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
weichao666 commented on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#issuecomment-441191265 Springmvc, Generating schema: if do not write defaultValue, required's value is what user write if have written defaultValue,No matter how the user writes,required is false running: When param is not transmitted,if required is true, report error When param is not transmitted , if required is false, handle it with defaultValue This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls commented on issue #1002: [SCB-1034] Metrics performance optimize
coveralls commented on issue #1002: [SCB-1034] Metrics performance optimize URL: https://github.com/apache/servicecomb-java-chassis/pull/1002#issuecomment-441189770 [![Coverage Status](https://coveralls.io/builds/20256723/badge)](https://coveralls.io/builds/20256723) Coverage decreased (-0.02%) to 86.699% when pulling **ec351baf92f798445e021d19051258e8f377c69b on wujimin:metrics-performance-optimize** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] liubao68 closed pull request #892: [SCB-613]delete useless EndpointsCache related classs
liubao68 closed pull request #892: [SCB-613]delete useless EndpointsCache related classs URL: https://github.com/apache/servicecomb-java-chassis/pull/892 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java index dcd877f40..e1e89056f 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -30,7 +30,6 @@ import org.apache.servicecomb.core.BootListener.EventType; import org.apache.servicecomb.core.definition.MicroserviceMeta; import org.apache.servicecomb.core.definition.loader.SchemaListenerManager; -import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache; import org.apache.servicecomb.core.event.InvocationFinishEvent; import org.apache.servicecomb.core.event.InvocationStartEvent; import org.apache.servicecomb.core.handler.HandlerConfigUtils; @@ -208,7 +207,6 @@ private void doInit() throws Exception { eventBus.register(this); consumerProviderManager.setAppManager(RegistryUtils.getServiceRegistry().getAppManager()); -AbstractEndpointsCache.init(RegistryUtils.getInstanceCacheManager(), transportManager); triggerEvent(EventType.BEFORE_HANDLER); HandlerConfigUtils.init(); diff --git a/core/src/main/java/org/apache/servicecomb/core/endpoint/AbstractEndpointsCache.java b/core/src/main/java/org/apache/servicecomb/core/endpoint/AbstractEndpointsCache.java deleted file mode 100644 index 8501013cc..0 --- a/core/src/main/java/org/apache/servicecomb/core/endpoint/AbstractEndpointsCache.java +++ /dev/null @@ -1,119 +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.endpoint; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.servicecomb.core.Transport; -import org.apache.servicecomb.core.transport.TransportManager; -import org.apache.servicecomb.serviceregistry.cache.CacheEndpoint; -import org.apache.servicecomb.serviceregistry.cache.InstanceCache; -import org.apache.servicecomb.serviceregistry.cache.InstanceCacheManager; -import org.springframework.util.StringUtils; - -/** - * registry模块不理解core中的概念 - * 所以要将字符串的各种信息转义一下,方便运行时使用 - */ -public abstract class AbstractEndpointsCache { - protected static InstanceCacheManager instanceCacheManager; - - protected static TransportManager transportManager; - - protected List endpoints = new ArrayList<>(); - - protected String transportName; - - protected InstanceCache instanceCache = null; - - public static void init(InstanceCacheManager instanceCacheManager, TransportManager transportManager) { -AbstractEndpointsCache.instanceCacheManager = instanceCacheManager; -AbstractEndpointsCache.transportManager = transportManager; - } - - /* - * transportName 可能为"",表示走任意健康的地址即可 - */ - public AbstractEndpointsCache(String appId, String microserviceName, String microserviceVersionRule, - String transportName) { -this.transportName = transportName; -this.instanceCache = new InstanceCache(appId, microserviceName, microserviceVersionRule, null); - } - - public List getLatestEndpoints() { -InstanceCache newCache = instanceCacheManager.getOrCreate(instanceCache.getAppId(), -instanceCache.getMicroserviceName(), -instanceCache.getMicroserviceVersionRule()); -if (!instanceCache.cacheChanged(newCache)) { - return endpoints; -} - -// 走到这里,肯定已经是存在"有效"地址了(可能是个空列表,表示没有存活的实例) -// 先创建,成功了,再走下面的更新逻辑 -List tmpEndpoints = createEndpoints(newCache); - -this.instanceCache = newCache; -this.endpoints = tmpEndpoints; -return endpoints; - } - - protected List createEndpoints(InstanceCache newCache) { -Map> transportMap = getOrCreateTransportMap(newCache); - -return createEndpoints(transportMap); - }
[GitHub] liubao68 opened a new pull request #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing
liubao68 opened a new pull request #1005: [SCB-1038]Fix some bugs and logs improvement reported by users when testing URL: https://github.com/apache/servicecomb-java-chassis/pull/1005 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on 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] coveralls edited a comment on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired
coveralls edited a comment on issue #1004: [SCB-925] Springmvc, when have defaultValue, required should be false, when param not exist, should check isRequired URL: https://github.com/apache/servicecomb-java-chassis/pull/1004#issuecomment-441166462 [![Coverage Status](https://coveralls.io/builds/20256353/badge)](https://coveralls.io/builds/20256353) Coverage decreased (-0.1%) to 86.597% when pulling **1d905046fd20fa8164dfd1fde456646850539f36 on weichao666:defaultvaluenew** into **defbfa4e67504356f309a0c447840dae06f22726 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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-saga] branch master updated: SCB-1039 Add a check for the compensable retires setting
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-saga.git The following commit(s) were added to refs/heads/master by this push: new 08ad149 SCB-1039 Add a check for the compensable retires setting 08ad149 is described below commit 08ad1497a00559f5bff9619d85700a3bec8f4977 Author: Willem Jiang AuthorDate: Fri Nov 23 15:17:07 2018 +0800 SCB-1039 Add a check for the compensable retires setting --- .../spring/CompensableMethodCheckingCallback.java | 7 ++- .../spring/CompensableAnnotationCheckingTest.java | 14 ++ .../spring/MisconfiguredRetriesService.java}| 21 +++-- .../omega/transaction/annotations/Compensable.java | 10 ++ 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java b/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java index e3f4907..bf2b5ce 100644 --- a/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java +++ b/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java @@ -32,7 +32,12 @@ class CompensableMethodCheckingCallback extends MethodCheckingCallback { if (!method.isAnnotationPresent(Compensable.class)) { return; } -String compensationMethod = method.getAnnotation(Compensable.class).compensationMethod(); +Compensable compensable = method.getAnnotation(Compensable.class); +String compensationMethod = compensable.compensationMethod(); +// we don't support the retries number below -1. +if (compensable.retries() < -1) { + throw new IllegalArgumentException(String.format("Compensable %s of method %s, the retries should not below -1.", compensable, method.getName())); +} loadMethodContext(method, compensationMethod); } } diff --git a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableAnnotationCheckingTest.java b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableAnnotationCheckingTest.java index 0bf6dce..6cbf8f9 100644 --- a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableAnnotationCheckingTest.java +++ b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableAnnotationCheckingTest.java @@ -18,6 +18,7 @@ package org.apache.servicecomb.saga.omega.transaction.spring; import static com.seanyinx.github.unit.scaffolding.AssertUtils.expectFailing; +import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; @@ -42,6 +43,19 @@ public class CompensableAnnotationCheckingTest { } @Test + public void blowsUpWhenCompensateRetriesIsBelowNegativeOne() throws Exception { +try { + try (ConfigurableApplicationContext ignored = new SpringApplicationBuilder(TransactionTestMain.class) + .profiles("annotation-retries-checking") + .run()) { +expectFailing(BeanCreationException.class); + } +} catch (BeanCreationException e) { + assertThat(e.getCause().getMessage(), endsWith("the retries should not below -1.")); +} + } + + @Test public void blowsUpWhenAnnotationOnWrongType() throws Exception { try { try (ConfigurableApplicationContext ignored = new SpringApplicationBuilder(TransactionTestMain.class) diff --git a/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/MisconfiguredRetriesService.java similarity index 60% copy from omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java copy to omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/MisconfiguredRetriesService.java index e3f4907..e68c99c 100644 --- a/omega/omega-spring-tx/src/main/java/org/apache/servicecomb/saga/omega/transaction/spring/CompensableMethodCheckingCallback.java +++ b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/MisconfiguredRetriesService.java @@ -17,22 +17,15 @@ package org.apache.servicecomb.saga.omega.transaction.spring; -import java.lang.reflect.Method; -import org.apache.servicecomb.saga.omega.context.CallbackContext; import org.apache.servicecomb.saga.omega.transaction.annotations.Compensable; +import
[GitHub] WillemJiang closed pull request #341: SCB-1039 Add a check for the compensable retries setting
WillemJiang closed pull request #341: SCB-1039 Add a check for the compensable retries setting URL: https://github.com/apache/servicecomb-saga/pull/341 This is an automated message from the Apache Git Service. To respond to the message, please log on 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