[GitHub] heyile opened a new issue #994: map interface to java class automatically

2018-11-13 Thread GitBox
heyile opened a new issue #994:  map interface to java class automatically 
URL: https://github.com/apache/servicecomb-java-chassis/issues/994
 
 
   need to map interface to some java class to make the swagger work properly. 
   As we do not support the return and the param type of method  is interface
   


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233341233
 
 

 ##
 File path: 
foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java
 ##
 @@ -108,6 +108,48 @@ public void testCanTcpListenYes() throws IOException {
 Assert.assertTrue(NetUtils.canTcpListen(address, port));
   }
 
+  @Test
+  public void humanReadableBytes() throws IOException {
+Assert.assertEquals("0 B", NetUtils.humanReadableBytes(0L));
+Assert.assertEquals("1 B", NetUtils.humanReadableBytes(1L));
+Assert.assertEquals("1023 B", NetUtils.humanReadableBytes(1023L));
+
+Assert.assertEquals("1.000 KB", NetUtils.humanReadableBytes(1024L));
+Assert.assertEquals("1.001 KB", NetUtils.humanReadableBytes(1025L));
+Assert.assertEquals("1023.999 KB", NetUtils.humanReadableBytes(1024L * 
1024 - 1));
+
+Assert.assertEquals("1.000 MB", NetUtils.humanReadableBytes(1024L * 1024));
+Assert.assertEquals("1.000 MB", NetUtils.humanReadableBytes(1024L * 1024 + 
1));
+Assert.assertEquals("1.001 MB", NetUtils.humanReadableBytes(1024L * 1024 + 
1024));
+Assert.assertEquals("1023.999 MB", NetUtils.humanReadableBytes(1024L * 
1024 * 1024 - 1024));
+Assert.assertEquals("1024.000 MB", NetUtils.humanReadableBytes(1024L * 
1024 * 1024 - 1));
+
+Assert.assertEquals("1.000 GB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024));
+Assert.assertEquals("1.000 GB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 + 1));
+Assert.assertEquals("1.000 GB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 + 1024));
+Assert.assertEquals("1023.999 GB", NetUtils.humanReadableBytes(1024L * 
1024 * 1024 * 1024 - 1024 * 1024));
+Assert.assertEquals("1024.000 GB", NetUtils.humanReadableBytes(1024L * 
1024 * 1024 * 1024 - 1024));
+Assert.assertEquals("1.000 TB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 * 1024));
+Assert.assertEquals("1.001 TB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 * 1024 + 1024 * 1024 * 1024));
+Assert.assertEquals("1023.999 TB",
+NetUtils.humanReadableBytes(1024L * 1024 * 1024 * 1024 * 1024 - 1024L 
* 1024 * 1024));
+
+Assert.assertEquals("1.000 PB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 * 1024 * 1024));
+Assert.assertEquals("1.001 PB",
+NetUtils.humanReadableBytes(1024L * 1024 * 1024 * 1024 * 1024 + 1024L 
* 1024 * 1024 * 1024));
+Assert.assertEquals("1023.999 PB",
+NetUtils.humanReadableBytes(1024L * 1024 * 1024 * 1024 * 1024 * 1024 - 
1024L * 1024 * 1024 * 1024));
+
+Assert.assertEquals("1.000 EB", NetUtils.humanReadableBytes(1024L * 1024 * 
1024 * 1024 * 1024 * 1024));
+Assert.assertEquals("1.001 EB",
+NetUtils.humanReadableBytes(1024L * 1024 * 1024 * 1024 * 1024 * 1024 + 
1024L * 1024 * 1024 * 1024 * 1024));
+Assert.assertEquals("8.000 EB", 
NetUtils.humanReadableBytes(Long.MAX_VALUE));
+  }
+
+  public static void main(String[] args) {
 
 Review comment:
   remove main function


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 asf-site updated (f4bc0bd -> 4e28a01)

2018-11-13 Thread ningjiang
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 f4bc0bd  Publish the website
 add aae7705  Add the section 'About Apache ServiceComb'
 add 30dbc13  Fix typo
 add 2bb84b5  Adjust the content and structure. - Bold the points in 
conversations - Underline the points of answers - Add the organizor info
 add 56b951f  Update 2018-11-05-talk-to-apache-experts.md
 add 457801b  Refresh website based on the latest community updates
 new 7a40e11  Merge branch 'master' into asf-site
 new 4e28a01  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:
 _developers/cn/contributing.md | 22 ++--
 _developers/cn/developer-guide.md  | 12 +--
 _developers/cn/release_guide.md| 16 +++
 _developers/cn/setup-develop-environment.md|  4 ++--
 _developers/cn/submit-codes.md | 22 ++--
 _developers/cn/subscribe-mail-list.md  |  6 +++---
 _developers/contributing.md| 14 ++---
 _developers/developer-guide.md | 12 +--
 _developers/release_guide.md   | 16 +++
 _developers/setup-develop-environment.md   |  4 ++--
 _developers/submit-codes.md| 24 +++---
 _docs/cn/load-balance.md   |  2 +-
 _docs/cn/quick-start-bmi.md|  2 +-
 _docs/cn/quick-start-dataconsistency.md|  6 +++---
 _docs/cn/quick-start.md|  4 ++--
 _docs/load-balance.md  |  2 +-
 _docs/quick-start-bmi.md   |  2 +-
 _docs/quick-start-dataconsistency.md   |  6 +++---
 _docs/quick-start.md   |  4 ++--
 _faqs/cn/faq.md|  4 ++--
 _faqs/faq.md   |  2 +-
 _users/cn/deploy-mode.md   |  6 +++---
 _users/cn/develop-with-jax-rs.md   |  4 ++--
 _users/cn/develop-with-springboot-starter.md   |  2 +-
 _users/cn/develop-with-springmvc.md|  4 ++--
 _users/cn/develop-with-transparent-rpc.md  |  4 ++--
 _users/cn/edge-in-1.0.0-m1.md  |  2 +-
 _users/cn/metrics-in-0.5.0.md  |  2 +-
 _users/cn/metrics-in-1.0.0-m1.md   |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 ...-write-file-extension-and-sample-in-1.0.0-m1.md |  2 +-
 _users/cn/setup-environment.md |  6 +++---
 _users/develop-with-jax-rs.md  |  4 ++--
 _users/develop-with-springboot-starter.md  |  2 +-
 _users/develop-with-springmvc.md   |  4 ++--
 _users/develop-with-transparent-rpc.md |  4 ++--
 _users/edge-in-1.0.0-m1.md |  2 +-
 _users/faq.md  |  2 +-
 _users/metrics-in-1.0.0-m1.md  |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 content/cn/developers/contributing.html| 22 ++--
 content/cn/developers/index.html   | 12 +--
 content/cn/developers/release-guide/index.html | 16 +++
 .../setup-develop-environment/index.html   |  4 ++--
 content/cn/developers/submit-codes/index.html  | 22 ++--
 .../cn/developers/subscribe-mail-list/index.html   | 20 +-
 .../quick-start-advance/load-balance/index.html|  2 +-
 content/cn/docs/quick-start-bmi/index.html |  2 +-
 .../cn/docs/quick-start-dataconsistency/index.html |  6 +++---
 content/cn/docs/quick-start/index.html |  4 ++--
 content/cn/faqs/index.html |  4 ++--
 content/cn/users/deploy-mode/index.html|  6 +++---
 content/cn/users/develop-with-jax-rs/index.html|  4 ++--
 .../develop-with-spring-boot-starter/index.html|  2 +-
 content/cn/users/develop-with-springmvc/index.html |  4 ++--
 .../users/develop-with-transparent-rpc/index.html  |  4 ++--
 content/cn/users/edge-in-1.0.0-m1/index.html   |  2 +-
 content/cn/users/metrics-in-0.5.0/index.html   |  2 +-
 content/cn/users/metrics-in-1.0.0-m1/index.html|  2 +-
 .../index.html |  2 +-
 .../index.html |  2 +-
 content/cn/users/setup-environment/index.html  |  6 +++---
 content/developers/contributing.html   | 14 ++---
 

[servicecomb-website] 02/02: Publish the website

2018-11-13 Thread ningjiang
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 4e28a014976ffd200a2f690926ea09472e982d59
Author: Willem Jiang 
AuthorDate: Wed Nov 14 13:22:27 2018 +0800

Publish the website
---
 content/cn/developers/contributing.html| 22 ++--
 content/cn/developers/index.html   | 12 +--
 content/cn/developers/release-guide/index.html | 16 +++
 .../setup-develop-environment/index.html   |  4 ++--
 content/cn/developers/submit-codes/index.html  | 22 ++--
 .../cn/developers/subscribe-mail-list/index.html   | 20 +-
 .../quick-start-advance/load-balance/index.html|  2 +-
 content/cn/docs/quick-start-bmi/index.html |  2 +-
 .../cn/docs/quick-start-dataconsistency/index.html |  6 +++---
 content/cn/docs/quick-start/index.html |  4 ++--
 content/cn/faqs/index.html |  4 ++--
 content/cn/users/deploy-mode/index.html|  6 +++---
 content/cn/users/develop-with-jax-rs/index.html|  4 ++--
 .../develop-with-spring-boot-starter/index.html|  2 +-
 content/cn/users/develop-with-springmvc/index.html |  4 ++--
 .../users/develop-with-transparent-rpc/index.html  |  4 ++--
 content/cn/users/edge-in-1.0.0-m1/index.html   |  2 +-
 content/cn/users/metrics-in-0.5.0/index.html   |  2 +-
 content/cn/users/metrics-in-1.0.0-m1/index.html|  2 +-
 .../index.html |  2 +-
 .../index.html |  2 +-
 content/cn/users/setup-environment/index.html  |  6 +++---
 content/developers/contributing.html   | 14 ++---
 content/developers/index.html  | 12 +--
 content/developers/release-guide/index.html| 16 +++
 .../setup-develop-environment/index.html   |  4 ++--
 content/developers/submit-codes/index.html | 24 +++---
 .../quick-start-advance/load-balance/index.html|  2 +-
 content/docs/quick-start-bmi/index.html|  2 +-
 .../docs/quick-start-dataconsistency/index.html|  6 +++---
 content/docs/quick-start/index.html|  4 ++--
 content/faqs/index.html|  2 +-
 content/feed.xml   |  2 +-
 content/script/bootstrap   |  2 +-
 content/script/deploy  |  2 +-
 content/users/develop-with-jax-rs/index.html   |  4 ++--
 .../develop-with-spring-boot-starter/index.html|  2 +-
 content/users/develop-with-springmvc/index.html|  4 ++--
 .../users/develop-with-transparent-rpc/index.html  |  4 ++--
 content/users/edge-in-1.0.0-m1/index.html  |  2 +-
 content/users/faq/index.html   |  2 +-
 content/users/metrics-in-1.0.0-m1/index.html   |  2 +-
 .../index.html |  2 +-
 43 files changed, 132 insertions(+), 132 deletions(-)

diff --git a/content/cn/developers/contributing.html 
b/content/cn/developers/contributing.html
index 0813135..976fb39 100644
--- a/content/cn/developers/contributing.html
+++ b/content/cn/developers/contributing.html
@@ -435,8 +435,8 @@
 
   浏览文档,这样可以加深您对ServiceComb的了解,学习到知识,一旦发现文档写得不清晰或逻辑混乱的地方,请通知我们;
   下载代码,试一试我们介绍的功能,看看它是否与您预想的一样工作;
-  分析源代码,如果希望了解更多技术细节,请在http://servicecomb.incubator.apache.org/cn/developers/use-gitter/;>Gitter上提问,大家会尽快解答;
-  希望炫一把黑科技体现您的实力?看看我们的 https://issues.apache.org/jira/browse/SCB;>issue tracker 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交http://servicecomb.incubator.apache.org/cn/developers/submit-codes/;>PR,成为贡献者之一;
+  分析源代码,如果希望了解更多技术细节,请在http://servicecomb.apache.org/cn/developers/use-gitter/;>Gitter上提问,大家会尽快解答;
+  希望炫一把黑科技体现您的实力?看看我们的 https://issues.apache.org/jira/browse/SCB;>issue tracker 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交http://servicecomb.apache.org/cn/developers/submit-codes/;>PR,成为贡献者之一;
   如果您接触 ServiceComb不久并且很希望帮助我们,您可以先从https://issues.apache.org/jira/browse/SCB-333?jql=project%20%3D%20SCB%20AND%20status%20%3D%20Open%20AND%20fixVersion%20in%20(EMPTY%2C%20java-chassis-1.0.0-m2)%20AND%20labels%20%3D%20newbie">简单的任务入手,循序渐进,甚至成长为Committer;
   
如果在使用ServiceComb的过程中发现有功能无法满足您的需求或出现问题,请在Issues中记录,并Watch项目,这样一旦这个问题有进展,都会第一时间通知到您。
 
@@ -445,7 +445,7 @@
 有下面的方式加入ServcieComb社区:
 
 
-  订阅我们的http://servicecomb.incubator.apache.org/cn/developers/subscribe-mail-list;>邮件列表,并为您关注的话题发表意见;
+  订阅我们的http://servicecomb.apache.org/cn/developers/subscribe-mail-list;>邮件列表,并为您关注的话题发表意见;
   来https://gitter.im/ServiceCombUsers/Lobby;>Gitter和大家打个招呼吧!
 
 
@@ -454,15 +454,15 @@
 
 因此如果您对改进文档的质量感兴趣,不论是修订一个页面的地址、更正一个链接、以及写一篇更优秀的入门文档,我们都非常欢迎!
 
-我们的文档大多数是使用markdown格式编写的,您需要同步我们的https://github.com/apache/incubator-servicecomb-website;>Website项目,直接在
 github上编辑后提交PR即可。

[servicecomb-website] 01/02: Merge branch 'master' into asf-site

2018-11-13 Thread ningjiang
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 7a40e11068a993f4b9927d23899fc73deb468ba8
Merge: f4bc0bd 457801b
Author: Willem Jiang 
AuthorDate: Wed Nov 14 12:56:32 2018 +0800

Merge branch 'master' into asf-site

 _developers/cn/contributing.md | 22 ++--
 _developers/cn/developer-guide.md  | 12 +--
 _developers/cn/release_guide.md| 16 +++
 _developers/cn/setup-develop-environment.md|  4 ++--
 _developers/cn/submit-codes.md | 22 ++--
 _developers/cn/subscribe-mail-list.md  |  6 +++---
 _developers/contributing.md| 14 ++---
 _developers/developer-guide.md | 12 +--
 _developers/release_guide.md   | 16 +++
 _developers/setup-develop-environment.md   |  4 ++--
 _developers/submit-codes.md| 24 +++---
 _docs/cn/load-balance.md   |  2 +-
 _docs/cn/quick-start-bmi.md|  2 +-
 _docs/cn/quick-start-dataconsistency.md|  6 +++---
 _docs/cn/quick-start.md|  4 ++--
 _docs/load-balance.md  |  2 +-
 _docs/quick-start-bmi.md   |  2 +-
 _docs/quick-start-dataconsistency.md   |  6 +++---
 _docs/quick-start.md   |  4 ++--
 _faqs/cn/faq.md|  4 ++--
 _faqs/faq.md   |  2 +-
 _users/cn/deploy-mode.md   |  6 +++---
 _users/cn/develop-with-jax-rs.md   |  4 ++--
 _users/cn/develop-with-springboot-starter.md   |  2 +-
 _users/cn/develop-with-springmvc.md|  4 ++--
 _users/cn/develop-with-transparent-rpc.md  |  4 ++--
 _users/cn/edge-in-1.0.0-m1.md  |  2 +-
 _users/cn/metrics-in-0.5.0.md  |  2 +-
 _users/cn/metrics-in-1.0.0-m1.md   |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 ...-write-file-extension-and-sample-in-1.0.0-m1.md |  2 +-
 _users/cn/setup-environment.md |  6 +++---
 _users/develop-with-jax-rs.md  |  4 ++--
 _users/develop-with-springboot-starter.md  |  2 +-
 _users/develop-with-springmvc.md   |  4 ++--
 _users/develop-with-transparent-rpc.md |  4 ++--
 _users/edge-in-1.0.0-m1.md |  2 +-
 _users/faq.md  |  2 +-
 _users/metrics-in-1.0.0-m1.md  |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 script/bootstrap   |  2 +-
 script/deploy  |  2 +-
 42 files changed, 124 insertions(+), 124 deletions(-)

diff --cc _users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
index d0fbfef,24d87a9..01e5f96
--- a/_users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
+++ b/_users/cn/metrics-integration-with-prometheus-in-1.0.0-m1.md
@@@ -10,10 -10,10 +10,10 @@@ redirect_from
  ---
  
  {% include toc %}
- 微服务框架从0.5.0版本开始支持监控功能Metrics,1.0.0-m1版本正式发布,请通过查看用户手册和[Release 
Note](https://github.com/apache/incubator-servicecomb-java-chassis/releases)获取更多信息,我们也会继续追加新特性新功能,欢迎订阅ServiceComb邮件列表(dev-subscr...@servicecomb.incubator.apache.org)参与讨论。
+ 微服务框架从0.5.0版本开始支持监控功能Metrics,1.0.0-m1版本正式发布,请通过查看用户手册和[Release 
Note](https://github.com/apache/servicecomb-java-chassis/releases)获取更多信息,我们也会继续追加新特性新功能,欢迎订阅ServiceComb邮件列表(dev-subscr...@servicecomb.apache.org)参与讨论。
  
  ## 背景
 -[普罗米修斯](http://www.prometheus.io/)是相似于Google 
Borgmon的一个开源监控系统,也是[CNCF](https://www.cncf.io/)的成员之一,目前社区非常活跃,Java Chassis 
Metrics在1.0.0-m1中支持对接普罗米修斯,并进一步实现使用[Grafana](https://grafana.com/)查询Metrics数据。
 +[prometheus](http://www.prometheus.io/)是相似于Google 
Borgmon的一个开源监控系统,也是[CNCF](https://www.cncf.io/)的成员之一,目前社区非常活跃,Java Chassis 
Metrics在1.0.0-m1中支持对接prometheus,并进一步实现使用[Grafana](https://grafana.com/)查询Metrics数据。
  
  ## 对接原理
  由于Java Chassis由Java语言开发,我们使用[prometheus java 
client](https://github.com/prometheus/client_java)中的Simple 
Client作为对接SDK,版本为0.1.0。  



[GitHub] WillemJiang closed pull request #152: Refresh website based on the latest community updates

2018-11-13 Thread GitBox
WillemJiang closed pull request #152: Refresh website based on the latest 
community updates
URL: https://github.com/apache/servicecomb-website/pull/152
 
 
   

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/_developers/cn/contributing.md b/_developers/cn/contributing.md
old mode 100644
new mode 100755
index 0b5136c0..a058c223
--- a/_developers/cn/contributing.md
+++ b/_developers/cn/contributing.md
@@ -12,15 +12,15 @@ last_modified_at: 2018-05-20T19:18:43+08:00
 
 * 浏览文档,这样可以加深您对ServiceComb的了解,学习到知识,一旦发现文档写得不清晰或逻辑混乱的地方,请通知我们;
 * 下载代码,试一试我们介绍的功能,看看它是否与您预想的一样工作;
-* 
分析源代码,如果希望了解更多技术细节,请在[Gitter](http://servicecomb.incubator.apache.org/cn/developers/use-gitter/)上提问,大家会尽快解答;
-* 希望炫一把黑科技体现您的实力?看看我们的 [issue 
tracker](https://issues.apache.org/jira/browse/SCB) 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交[PR](http://servicecomb.incubator.apache.org/cn/developers/submit-codes/),成为贡献者之一;
+* 
分析源代码,如果希望了解更多技术细节,请在[Gitter](http://servicecomb.apache.org/cn/developers/use-gitter/)上提问,大家会尽快解答;
+* 希望炫一把黑科技体现您的实力?看看我们的 [issue 
tracker](https://issues.apache.org/jira/browse/SCB) 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交[PR](http://servicecomb.apache.org/cn/developers/submit-codes/),成为贡献者之一;
 * 如果您接触 
ServiceComb不久并且很希望帮助我们,您可以先从[简单的任务](https://issues.apache.org/jira/browse/SCB-333?jql=project%20%3D%20SCB%20AND%20status%20%3D%20Open%20AND%20fixVersion%20in%20(EMPTY%2C%20java-chassis-1.0.0-m2)%20AND%20labels%20%3D%20newbie)入手,循序渐进,甚至成长为Committer;
 * 
如果在使用ServiceComb的过程中发现有功能无法满足您的需求或出现问题,请在Issues中记录,并Watch项目,这样一旦这个问题有进展,都会第一时间通知到您。
 
 ## 初次接触
 有下面的方式加入ServcieComb社区:
 
-- 
订阅我们的[邮件列表](http://servicecomb.incubator.apache.org/cn/developers/subscribe-mail-list),并为您关注的话题发表意见;
 
+- 
订阅我们的[邮件列表](http://servicecomb.apache.org/cn/developers/subscribe-mail-list),并为您关注的话题发表意见;
 
 - 来[Gitter](https://gitter.im/ServiceCombUsers/Lobby)和大家打个招呼吧!
 
 ## 改进文档
@@ -28,21 +28,21 @@ last_modified_at: 2018-05-20T19:18:43+08:00
 
 因此如果您对改进文档的质量感兴趣,不论是修订一个页面的地址、更正一个链接、以及写一篇更优秀的入门文档,我们都非常欢迎!
 
-我们的文档大多数是使用markdown格式编写的,您需要同步我们的[Website](https://github.com/apache/incubator-servicecomb-website)项目,直接在
 github上编辑后提交PR即可。
+我们的文档大多数是使用markdown格式编写的,您需要同步我们的[Website](https://github.com/apache/servicecomb-website)项目,直接在
 github上编辑后提交PR即可。
 
 ## 如果发现了一个Bug或问题
 
-请提交一个新的Issue在我们的[issue 
tracker](https://issues.apache.org/jira/browse/SCB)上,如果您能够提供一个JUnit测试用例来复现这个问题,那么我们就能够更快的解决它,例如已经有的[例子](https://github.com/apache/incubator-servicecomb-saga/tree/master/alpha/alpha-core/src/test/java/org/apache/servicecomb/saga/alpha/core),并且我们还能够持续的确认这个问题不会再次出现在未来的版本中。
+请提交一个新的Issue在我们的[issue 
tracker](https://issues.apache.org/jira/browse/SCB)上,如果您能够提供一个JUnit测试用例来复现这个问题,那么我们就能够更快的解决它,例如已经有的[例子](https://github.com/apache/servicecomb-saga/tree/master/alpha/alpha-core/src/test/java/org/apache/servicecomb/saga/alpha/core),并且我们还能够持续的确认这个问题不会再次出现在未来的版本中。
 
 ## 编写代码
 
-ServiceComb的所有项目都在 
[Github](https://github.com/apache?q=incubator-servicecomb)上,包含下面几个子项目:
+ServiceComb的所有项目都在 
[Github](https://github.com/search?q=org%3Aapache+servicecomb)上,包含下面几个子项目:
 
 | 项目名 | 项目介绍 | 语言 |
 
|---||--|
-| [Java Chassis](https://github.com/apache/incubator-servicecomb-java-chassis) 
 | Java微服务框架(SDK) | Java |
-| [Service 
Center](https://github.com/apache/incubator-servicecomb-service-center) 
  | 服务注册和发现 | Go   |
-| [Saga](https://github.com/apache/incubator-servicecomb-saga) 
  | 微服务最终一致性解决方案 | Java |
-| [Website](https://github.com/apache/incubator-servicecomb-website) | 
ServiceComb主站 | Markdown |
+| [Java Chassis](https://github.com/apache/servicecomb-java-chassis)  | 
Java微服务框架(SDK) | Java |
+| [Service Center](https://github.com/apache/servicecomb-service-center)   
| 服务注册和发现 | Go   |
+| [Saga](https://github.com/apache/servicecomb-saga)   
| 微服务最终一致性解决方案 | Java |
+| [Website](https://github.com/apache/servicecomb-website) | ServiceComb主站 | 
Markdown |
 
-如果希望给ServiceComb提交代码,您需要从github上fork对应的项目至您的项目空间下,为您提交的代码创建一个新的分支,添加源项目为upstream,并提交PR,更详细的步骤可以参考[这篇文档](http://servicecomb.incubator.apache.org/cn/developers/submit-codes/)。
\ No newline at end of file
+如果希望给ServiceComb提交代码,您需要从github上fork对应的项目至您的项目空间下,为您提交的代码创建一个新的分支,添加源项目为upstream,并提交PR,更详细的步骤可以参考[这篇文档](http://servicecomb.apache.org/cn/developers/submit-codes/)。
\ No newline at end of file
diff --git a/_developers/cn/developer-guide.md 
b/_developers/cn/developer-guide.md
index 7741c2d7..675a2442 100755
--- a/_developers/cn/developer-guide.md
+++ b/_developers/cn/developer-guide.md
@@ -8,18 +8,18 @@ last_modified_at: 2017-06-24T19:18:43+08:00
 ---
 {% include toc %}
 
-**ServiceComb** 

[servicecomb-website] branch master updated: Refresh website based on the latest community updates

2018-11-13 Thread ningjiang
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-website.git


The following commit(s) were added to refs/heads/master by this push:
 new 457801b  Refresh website based on the latest community updates
457801b is described below

commit 457801b4b39fec6ebe1bb60ec0edcf2f9c23554d
Author: MabinGo 
AuthorDate: Wed Nov 14 10:41:07 2018 +0800

Refresh website based on the latest community updates

Signed-off-by: MabinGo 
---
 _developers/cn/contributing.md | 22 ++--
 _developers/cn/developer-guide.md  | 12 +--
 _developers/cn/release_guide.md| 16 +++
 _developers/cn/setup-develop-environment.md|  4 ++--
 _developers/cn/submit-codes.md | 22 ++--
 _developers/cn/subscribe-mail-list.md  |  6 +++---
 _developers/contributing.md| 14 ++---
 _developers/developer-guide.md | 12 +--
 _developers/release_guide.md   | 16 +++
 _developers/setup-develop-environment.md   |  4 ++--
 _developers/submit-codes.md| 24 +++---
 _docs/cn/load-balance.md   |  2 +-
 _docs/cn/quick-start-bmi.md|  2 +-
 _docs/cn/quick-start-dataconsistency.md|  6 +++---
 _docs/cn/quick-start.md|  4 ++--
 _docs/load-balance.md  |  2 +-
 _docs/quick-start-bmi.md   |  2 +-
 _docs/quick-start-dataconsistency.md   |  6 +++---
 _docs/quick-start.md   |  4 ++--
 _faqs/cn/faq.md|  4 ++--
 _faqs/faq.md   |  2 +-
 _users/cn/deploy-mode.md   |  6 +++---
 _users/cn/develop-with-jax-rs.md   |  4 ++--
 _users/cn/develop-with-springboot-starter.md   |  2 +-
 _users/cn/develop-with-springmvc.md|  4 ++--
 _users/cn/develop-with-transparent-rpc.md  |  4 ++--
 _users/cn/edge-in-1.0.0-m1.md  |  2 +-
 _users/cn/metrics-in-0.5.0.md  |  2 +-
 _users/cn/metrics-in-1.0.0-m1.md   |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 ...-write-file-extension-and-sample-in-1.0.0-m1.md |  2 +-
 _users/cn/setup-environment.md |  6 +++---
 _users/develop-with-jax-rs.md  |  4 ++--
 _users/develop-with-springboot-starter.md  |  2 +-
 _users/develop-with-springmvc.md   |  4 ++--
 _users/develop-with-transparent-rpc.md |  4 ++--
 _users/edge-in-1.0.0-m1.md |  2 +-
 _users/faq.md  |  2 +-
 _users/metrics-in-1.0.0-m1.md  |  2 +-
 ...rics-integration-with-prometheus-in-1.0.0-m1.md |  2 +-
 script/bootstrap   |  2 +-
 script/deploy  |  2 +-
 42 files changed, 124 insertions(+), 124 deletions(-)

diff --git a/_developers/cn/contributing.md b/_developers/cn/contributing.md
old mode 100644
new mode 100755
index 0b5136c..a058c22
--- a/_developers/cn/contributing.md
+++ b/_developers/cn/contributing.md
@@ -12,15 +12,15 @@ last_modified_at: 2018-05-20T19:18:43+08:00
 
 * 浏览文档,这样可以加深您对ServiceComb的了解,学习到知识,一旦发现文档写得不清晰或逻辑混乱的地方,请通知我们;
 * 下载代码,试一试我们介绍的功能,看看它是否与您预想的一样工作;
-* 
分析源代码,如果希望了解更多技术细节,请在[Gitter](http://servicecomb.incubator.apache.org/cn/developers/use-gitter/)上提问,大家会尽快解答;
-* 希望炫一把黑科技体现您的实力?看看我们的 [issue 
tracker](https://issues.apache.org/jira/browse/SCB) 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交[PR](http://servicecomb.incubator.apache.org/cn/developers/submit-codes/),成为贡献者之一;
+* 
分析源代码,如果希望了解更多技术细节,请在[Gitter](http://servicecomb.apache.org/cn/developers/use-gitter/)上提问,大家会尽快解答;
+* 希望炫一把黑科技体现您的实力?看看我们的 [issue 
tracker](https://issues.apache.org/jira/browse/SCB) 
吧,欢迎您承接Open状态的Issues和未完成的特性,提交[PR](http://servicecomb.apache.org/cn/developers/submit-codes/),成为贡献者之一;
 * 如果您接触 
ServiceComb不久并且很希望帮助我们,您可以先从[简单的任务](https://issues.apache.org/jira/browse/SCB-333?jql=project%20%3D%20SCB%20AND%20status%20%3D%20Open%20AND%20fixVersion%20in%20(EMPTY%2C%20java-chassis-1.0.0-m2)%20AND%20labels%20%3D%20newbie)入手,循序渐进,甚至成长为Committer;
 * 
如果在使用ServiceComb的过程中发现有功能无法满足您的需求或出现问题,请在Issues中记录,并Watch项目,这样一旦这个问题有进展,都会第一时间通知到您。
 
 ## 初次接触
 有下面的方式加入ServcieComb社区:
 
-- 
订阅我们的[邮件列表](http://servicecomb.incubator.apache.org/cn/developers/subscribe-mail-list),并为您关注的话题发表意见;
 
+- 
订阅我们的[邮件列表](http://servicecomb.apache.org/cn/developers/subscribe-mail-list),并为您关注的话题发表意见;
 
 - 来[Gitter](https://gitter.im/ServiceCombUsers/Lobby)和大家打个招呼吧!
 
 ## 改进文档
@@ -28,21 +28,21 @@ last_modified_at: 2018-05-20T19:18:43+08:00
 
 

[GitHub] MabinGo opened a new pull request #152: Refresh website based on the latest community updates

2018-11-13 Thread GitBox
MabinGo opened a new pull request #152: Refresh website based on the latest 
community updates
URL: https://github.com/apache/servicecomb-website/pull/152
 
 
   Signed-off-by: MabinGo 


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] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233294191
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
+  @Override
+  public int getOrder() {
+return Short.MAX_VALUE;
+  }
+
+  @Override
+  public DiscoveryTreeNode discovery(DiscoveryContext context, 
DiscoveryTreeNode parent) {
+return parent.children()
+.computeIfAbsent(context.getInputParameters(), etn -> 
createDiscoveryTreeNode(context, parent));
+  }
+
+  @SuppressWarnings("unchecked")
+  protected DiscoveryTreeNode createDiscoveryTreeNode(DiscoveryContext 
context,
+  DiscoveryTreeNode parent) {
+String serviceName = context.getInputParameters();
+List instances = new ArrayList<>();
+for (MicroserviceInstance instance : ((Map) parent.data()).values()) {
+  for (String endpoint : instance.getEndpoints()) {
+  String scheme = endpoint.split(":", 2)[0];
+  if (!scheme.equalsIgnoreCase(Const.RESTFUL)) {
+LOGGER.info("Endpoint {} is not supported in Spring Cloud, 
ignoring.", endpoint);
+continue;
+  }
+  URIEndpointObject uri = new URIEndpointObject(endpoint);
+  instances.add(new DefaultServiceInstance(serviceId, 
uri.getHostOrIp(), uri.getPort(), uri.isSslEnabled()));
+  }
+}
+return new DiscoveryTreeNode()
+.subName(parent, serviceName)
+.data(instances);
+  }
+};
+
 DiscoveryContext context = new DiscoveryContext();
 context.setInputParameters(serviceId);
+
 DiscoveryTree discoveryTree = discoveryTrees.computeIfAbsent(serviceId, 
key -> {
-  return new DiscoveryTree();
+  DiscoveryTree tree =  new DiscoveryTree();
+  tree.addFilter(new InstanceDiscoveryFilter());
+  return tree;
 });
+
 VersionedCache serversVersionedCache = discoveryTree.discovery(context,
 RegistryUtils.getAppId(),
 serviceId,
 DefinitionConst.VERSION_RULE_ALL);
-Map servers = serversVersionedCache.data();
-List instances = new ArrayList<>(servers.size());
-for (MicroserviceInstance s : servers.values()) {
-  for (String endpoint : s.getEndpoints()) {
-URIEndpointObject uri = new URIEndpointObject(endpoint);
-instances.add(new DefaultServiceInstance(serviceId, uri.getHostOrIp(), 
uri.getPort(), uri.isSslEnabled()));
-  }
-}
-return instances;
+
+return serversVersionedCache.data();
 
 Review comment:
   It's OK for the versionedCache to be empty. As it will not be NULL. When 
there are associated filters and the children data is null, an Exception will 
be raised.


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] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233294191
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
+  @Override
+  public int getOrder() {
+return Short.MAX_VALUE;
+  }
+
+  @Override
+  public DiscoveryTreeNode discovery(DiscoveryContext context, 
DiscoveryTreeNode parent) {
+return parent.children()
+.computeIfAbsent(context.getInputParameters(), etn -> 
createDiscoveryTreeNode(context, parent));
+  }
+
+  @SuppressWarnings("unchecked")
+  protected DiscoveryTreeNode createDiscoveryTreeNode(DiscoveryContext 
context,
+  DiscoveryTreeNode parent) {
+String serviceName = context.getInputParameters();
+List instances = new ArrayList<>();
+for (MicroserviceInstance instance : ((Map) parent.data()).values()) {
+  for (String endpoint : instance.getEndpoints()) {
+  String scheme = endpoint.split(":", 2)[0];
+  if (!scheme.equalsIgnoreCase(Const.RESTFUL)) {
+LOGGER.info("Endpoint {} is not supported in Spring Cloud, 
ignoring.", endpoint);
+continue;
+  }
+  URIEndpointObject uri = new URIEndpointObject(endpoint);
+  instances.add(new DefaultServiceInstance(serviceId, 
uri.getHostOrIp(), uri.getPort(), uri.isSslEnabled()));
+  }
+}
+return new DiscoveryTreeNode()
+.subName(parent, serviceName)
+.data(instances);
+  }
+};
+
 DiscoveryContext context = new DiscoveryContext();
 context.setInputParameters(serviceId);
+
 DiscoveryTree discoveryTree = discoveryTrees.computeIfAbsent(serviceId, 
key -> {
-  return new DiscoveryTree();
+  DiscoveryTree tree =  new DiscoveryTree();
+  tree.addFilter(new InstanceDiscoveryFilter());
+  return tree;
 });
+
 VersionedCache serversVersionedCache = discoveryTree.discovery(context,
 RegistryUtils.getAppId(),
 serviceId,
 DefinitionConst.VERSION_RULE_ALL);
-Map servers = serversVersionedCache.data();
-List instances = new ArrayList<>(servers.size());
-for (MicroserviceInstance s : servers.values()) {
-  for (String endpoint : s.getEndpoints()) {
-URIEndpointObject uri = new URIEndpointObject(endpoint);
-instances.add(new DefaultServiceInstance(serviceId, uri.getHostOrIp(), 
uri.getPort(), uri.isSslEnabled()));
-  }
-}
-return instances;
+
+return serversVersionedCache.data();
 
 Review comment:
   It's OK for the versionedCache to be empty. As it will not be empty. When 
there are associated filters and the children data is null, an Exception will 
be raised.


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] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233294215
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
+  @Override
+  public int getOrder() {
+return Short.MAX_VALUE;
+  }
+
+  @Override
+  public DiscoveryTreeNode discovery(DiscoveryContext context, 
DiscoveryTreeNode parent) {
+return parent.children()
+.computeIfAbsent(context.getInputParameters(), etn -> 
createDiscoveryTreeNode(context, parent));
+  }
+
+  @SuppressWarnings("unchecked")
+  protected DiscoveryTreeNode createDiscoveryTreeNode(DiscoveryContext 
context,
+  DiscoveryTreeNode parent) {
+String serviceName = context.getInputParameters();
+List instances = new ArrayList<>();
 
 Review comment:
   Will fix


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] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233293815
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
 
 Review comment:
   Will move to a separate class


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] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233293742
 
 

 ##
 File path: spring-boot-starter/spring-boot-starter-discovery/pom.xml
 ##
 @@ -75,5 +75,9 @@
   org.apache.servicecomb
   service-registry
 
+
 
 Review comment:
   That's for Const.RESTFUL


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-1015 Support the forth microservice version number registration (#488)

2018-11-13 Thread littlecui
This is an automated email from the ASF dual-hosted git repository.

littlecui 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 09040b9  SCB-1015 Support the forth microservice version number 
registration (#488)
09040b9 is described below

commit 09040b90d0dc3c87f976caec1e0b6d2c5b1d86db
Author: little-cui 
AuthorDate: Wed Nov 14 08:55:22 2018 +0800

SCB-1015 Support the forth microservice version number registration (#488)
---
 server/plugin/pkg/registry/etcd/etcd_test.go |  2 +-
 server/service/microservice_test.go  | 24 +++-
 server/service/util/versionrule.go   |  4 ++--
 server/service/util/versionrule_test.go  |  7 +++
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/server/plugin/pkg/registry/etcd/etcd_test.go 
b/server/plugin/pkg/registry/etcd/etcd_test.go
index 79aed50..aa4e69f 100644
--- a/server/plugin/pkg/registry/etcd/etcd_test.go
+++ b/server/plugin/pkg/registry/etcd/etcd_test.go
@@ -120,7 +120,7 @@ func TestEtcdClient(t *testing.T) {
 
// base test
inst := NewRegistry()
-   if inst == nil || firstEndpoint != endpoint {
+   if inst == nil || strings.Index(endpoint, firstEndpoint) < 0 {
t.Fatalf("TestEtcdClient failed, %s != %s", firstEndpoint, 
endpoint)
}
old1 := registry.Configuration().ClusterAddresses
diff --git a/server/service/microservice_test.go 
b/server/service/microservice_test.go
index 4b7792a..420c25c 100644
--- a/server/service/microservice_test.go
+++ b/server/service/microservice_test.go
@@ -64,7 +64,7 @@ var _ = Describe("'Micro-service' service", func() {
Service: {
AppId:   
TOO_LONG_APPID[:len(TOO_LONG_APPID)-1],
ServiceName: 
TOO_LONG_SERVICENAME[:len(TOO_LONG_SERVICENAME)-1],
-   Version: 
"32767.32767.32767",
+   Version: 
"32767.32767.32767.32767",
Alias:   
TOO_LONG_ALIAS[:len(TOO_LONG_ALIAS)-1],
Level:   "BACK",
Status:  "UP",
@@ -495,6 +495,20 @@ var _ = Describe("'Micro-service' service", func() {
Expect(err).To(BeNil())

Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
 
+   By("invalid version 4")
+   r = {
+   Service: {
+   AppId:   "default",
+   ServiceName: "service-validate",
+   Version: "1.1.0.0.0",
+   Level:   "BACK",
+   Status:  "UP",
+   },
+   }
+   resp, err = 
serviceResource.Create(getContext(), r)
+   Expect(err).To(BeNil())
+   
Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
+
By("invalid level")
r = {
Service: {
@@ -840,6 +854,14 @@ var _ = Describe("'Micro-service' service", func() {
})
Expect(err).To(BeNil())

Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
+   resp, err = serviceResource.Exist(getContext(), 
{
+   Type:"microservice",
+   AppId:   "default",
+   ServiceName: "exist-invalid-version",
+   Version: "3.0.0.0.0",
+   })
+   Expect(err).To(BeNil())
+   
Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
 
By("version is empty")
resp, err = serviceResource.Exist(getContext(), 
{
diff --git a/server/service/util/versionrule.go 
b/server/service/util/versionrule.go
index 78feb9a..ed7f360 100644
--- a/server/service/util/versionrule.go
+++ b/server/service/util/versionrule.go
@@ -254,9 +254,9 @@ func (vr *VersionRegexp) validateVersionRule(versionRule 
string) (err error) {
 func NewVersionRegexp(fuzzy bool) (vr *VersionRegexp) {
vr = {Fuzzy: fuzzy}
if fuzzy {
-

[GitHub] little-cui closed pull request #488: SCB-1015 Support the forth microservice version number registration

2018-11-13 Thread GitBox
little-cui closed pull request #488: SCB-1015 Support the forth microservice 
version number registration
URL: https://github.com/apache/servicecomb-service-center/pull/488
 
 
   

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/server/plugin/pkg/registry/etcd/etcd_test.go 
b/server/plugin/pkg/registry/etcd/etcd_test.go
index 79aed508..aa4e69f6 100644
--- a/server/plugin/pkg/registry/etcd/etcd_test.go
+++ b/server/plugin/pkg/registry/etcd/etcd_test.go
@@ -120,7 +120,7 @@ func TestEtcdClient(t *testing.T) {
 
// base test
inst := NewRegistry()
-   if inst == nil || firstEndpoint != endpoint {
+   if inst == nil || strings.Index(endpoint, firstEndpoint) < 0 {
t.Fatalf("TestEtcdClient failed, %s != %s", firstEndpoint, 
endpoint)
}
old1 := registry.Configuration().ClusterAddresses
diff --git a/server/service/microservice_test.go 
b/server/service/microservice_test.go
index 4b7792a6..420c25c7 100644
--- a/server/service/microservice_test.go
+++ b/server/service/microservice_test.go
@@ -64,7 +64,7 @@ var _ = Describe("'Micro-service' service", func() {
Service: {
AppId:   
TOO_LONG_APPID[:len(TOO_LONG_APPID)-1],
ServiceName: 
TOO_LONG_SERVICENAME[:len(TOO_LONG_SERVICENAME)-1],
-   Version: 
"32767.32767.32767",
+   Version: 
"32767.32767.32767.32767",
Alias:   
TOO_LONG_ALIAS[:len(TOO_LONG_ALIAS)-1],
Level:   "BACK",
Status:  "UP",
@@ -495,6 +495,20 @@ var _ = Describe("'Micro-service' service", func() {
Expect(err).To(BeNil())

Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
 
+   By("invalid version 4")
+   r = {
+   Service: {
+   AppId:   "default",
+   ServiceName: "service-validate",
+   Version: "1.1.0.0.0",
+   Level:   "BACK",
+   Status:  "UP",
+   },
+   }
+   resp, err = 
serviceResource.Create(getContext(), r)
+   Expect(err).To(BeNil())
+   
Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
+
By("invalid level")
r = {
Service: {
@@ -840,6 +854,14 @@ var _ = Describe("'Micro-service' service", func() {
})
Expect(err).To(BeNil())

Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
+   resp, err = serviceResource.Exist(getContext(), 
{
+   Type:"microservice",
+   AppId:   "default",
+   ServiceName: "exist-invalid-version",
+   Version: "3.0.0.0.0",
+   })
+   Expect(err).To(BeNil())
+   
Expect(resp.Response.Code).To(Equal(scerr.ErrInvalidParams))
 
By("version is empty")
resp, err = serviceResource.Exist(getContext(), 
{
diff --git a/server/service/util/versionrule.go 
b/server/service/util/versionrule.go
index 78feb9a9..ed7f3600 100644
--- a/server/service/util/versionrule.go
+++ b/server/service/util/versionrule.go
@@ -254,9 +254,9 @@ func (vr *VersionRegexp) validateVersionRule(versionRule 
string) (err error) {
 func NewVersionRegexp(fuzzy bool) (vr *VersionRegexp) {
vr = {Fuzzy: fuzzy}
if fuzzy {
-   vr.Regex, _ = 
regexp.Compile(`^\d+(\.\d+){0,2}\+?$|^\d+(\.\d+){0,2}-\d+(\.\d+){0,2}$|^latest$`)
+   vr.Regex, _ = 
regexp.Compile(`^\d+(\.\d+){0,3}\+?$|^\d+(\.\d+){0,3}-\d+(\.\d+){0,3}$|^latest$`)
return
}
-   vr.Regex, _ = regexp.Compile(`^\d+(\.\d+){0,2}$`)
+   vr.Regex, _ = regexp.Compile(`^\d+(\.\d+){0,3}$`)
return
 }
diff --git 

[GitHub] wujimin commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233160380
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
+  @Override
+  public int getOrder() {
+return Short.MAX_VALUE;
+  }
+
+  @Override
+  public DiscoveryTreeNode discovery(DiscoveryContext context, 
DiscoveryTreeNode parent) {
+return parent.children()
+.computeIfAbsent(context.getInputParameters(), etn -> 
createDiscoveryTreeNode(context, parent));
+  }
+
+  @SuppressWarnings("unchecked")
+  protected DiscoveryTreeNode createDiscoveryTreeNode(DiscoveryContext 
context,
+  DiscoveryTreeNode parent) {
+String serviceName = context.getInputParameters();
+List instances = new ArrayList<>();
+for (MicroserviceInstance instance : ((Map) parent.data()).values()) {
+  for (String endpoint : instance.getEndpoints()) {
+  String scheme = endpoint.split(":", 2)[0];
+  if (!scheme.equalsIgnoreCase(Const.RESTFUL)) {
+LOGGER.info("Endpoint {} is not supported in Spring Cloud, 
ignoring.", endpoint);
+continue;
+  }
+  URIEndpointObject uri = new URIEndpointObject(endpoint);
+  instances.add(new DefaultServiceInstance(serviceId, 
uri.getHostOrIp(), uri.getPort(), uri.isSslEnabled()));
+  }
+}
+return new DiscoveryTreeNode()
+.subName(parent, serviceName)
+.data(instances);
+  }
+};
+
 DiscoveryContext context = new DiscoveryContext();
 context.setInputParameters(serviceId);
+
 DiscoveryTree discoveryTree = discoveryTrees.computeIfAbsent(serviceId, 
key -> {
-  return new DiscoveryTree();
+  DiscoveryTree tree =  new DiscoveryTree();
+  tree.addFilter(new InstanceDiscoveryFilter());
+  return tree;
 });
+
 VersionedCache serversVersionedCache = discoveryTree.discovery(context,
 RegistryUtils.getAppId(),
 serviceId,
 DefinitionConst.VERSION_RULE_ALL);
-Map servers = serversVersionedCache.data();
-List instances = new ArrayList<>(servers.size());
-for (MicroserviceInstance s : servers.values()) {
-  for (String endpoint : s.getEndpoints()) {
-URIEndpointObject uri = new URIEndpointObject(endpoint);
-instances.add(new DefaultServiceInstance(serviceId, uri.getHostOrIp(), 
uri.getPort(), uri.isSslEnabled()));
-  }
-}
-return instances;
+
+return serversVersionedCache.data();
 
 Review comment:
   what happened when serversVersionedCache  is empty?


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 #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233159768
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
 
 Review comment:
   put class InstanceDiscoveryFilter  in "getInstances", make "getInstances" 
logic not clear
   


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 #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233158144
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
 ##
 @@ -44,24 +51,55 @@ public String description() {
 
   @Override
   public List getInstances(final String serviceId) {
+class InstanceDiscoveryFilter implements DiscoveryFilter {
+  @Override
+  public int getOrder() {
+return Short.MAX_VALUE;
+  }
+
+  @Override
+  public DiscoveryTreeNode discovery(DiscoveryContext context, 
DiscoveryTreeNode parent) {
+return parent.children()
+.computeIfAbsent(context.getInputParameters(), etn -> 
createDiscoveryTreeNode(context, parent));
+  }
+
+  @SuppressWarnings("unchecked")
+  protected DiscoveryTreeNode createDiscoveryTreeNode(DiscoveryContext 
context,
+  DiscoveryTreeNode parent) {
+String serviceName = context.getInputParameters();
+List instances = new ArrayList<>();
 
 Review comment:
   not align?


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
heyile commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233124172
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
 
 Review comment:
   I have removed the tip


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 #487: SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread GitBox
codecov-io edited a comment on issue #487: SCB-993 Fixed the error of 
microservice registration in multi-dc
URL: 
https://github.com/apache/servicecomb-service-center/pull/487#issuecomment-438181426
 
 
   # 
[Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=h1)
 Report
   > Merging 
[#487](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/servicecomb-service-center/commit/c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40?src=pr=desc)
 will **decrease** coverage by `0.08%`.
   > The diff coverage is `14.28%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #487  +/-   ##
   ==
   - Coverage   60.35%   60.27%   -0.09% 
   ==
 Files 159  159  
 Lines   1353413537   +3 
   ==
   - Hits 8169 8159  -10 
   - Misses   4787 4796   +9 
   - Partials  578  582   +4
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC91dGlsLmdv)
 | `80% <0%> (-20%)` | :arrow_down: |
   | 
[server/core/microservice.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvbWljcm9zZXJ2aWNlLmdv)
 | `70.27% <20%> (-0.97%)` | :arrow_down: |
   | 
[server/service/notification/listwatcher.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvbm90aWZpY2F0aW9uL2xpc3R3YXRjaGVyLmdv)
 | `69.01% <0%> (-9.86%)` | :arrow_down: |
   | 
[pkg/util/tree.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-cGtnL3V0aWwvdHJlZS5nbw==)
 | `81.25% <0%> (-3.13%)` | :arrow_down: |
   | 
[pkg/tlsutil/tlsutil.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-cGtnL3Rsc3V0aWwvdGxzdXRpbC5nbw==)
 | `73.58% <0%> (-0.95%)` | :arrow_down: |
   | 
[server/service/instance.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2UuZ28=)
 | `67.61% <0%> (-0.2%)` | :arrow_down: |
   | 
[server/broker/service.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci9zZXJ2aWNlLmdv)
 | `57.78% <0%> (-0.16%)` | :arrow_down: |
   | 
[pkg/log/logrotate.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/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/487?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/487?src=pr=footer).
 Last update 
[c3f06f1...dfffe33](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?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 #488: SCB-1015 Support the forth microservice version number registration

2018-11-13 Thread GitBox
coveralls commented on issue #488: SCB-1015 Support the forth microservice 
version number registration
URL: 
https://github.com/apache/servicecomb-service-center/pull/488#issuecomment-438320734
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20079377/badge)](https://coveralls.io/builds/20079377)
   
   Coverage decreased (-0.04%) to 62.817% when pulling 
**2d324cf4df6bdb90163d99b6c861051e1475268a on little-cui:ver** into 
**c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40 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 #487: SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread GitBox
coveralls edited a comment on issue #487: SCB-993 Fixed the error of 
microservice registration in multi-dc
URL: 
https://github.com/apache/servicecomb-service-center/pull/487#issuecomment-438181672
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20079398/badge)](https://coveralls.io/builds/20079398)
   
   Coverage decreased (-0.08%) to 62.783% when pulling 
**dfffe333979ddb794c36dab21c675cd4048b430f on little-cui:master** into 
**c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40 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 commented on issue #488: SCB-1015 Support the forth microservice version number registration

2018-11-13 Thread GitBox
codecov-io commented on issue #488: SCB-1015 Support the forth microservice 
version number registration
URL: 
https://github.com/apache/servicecomb-service-center/pull/488#issuecomment-438319857
 
 
   # 
[Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?src=pr=h1)
 Report
   > Merging 
[#488](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/servicecomb-service-center/commit/c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `100%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #488   +/-   ##
   ===
 Coverage   60.35%   60.35%   
   ===
 Files 159  159   
 Lines   1353413534   
   ===
 Hits 8169 8169   
 Misses   4787 4787   
 Partials  578  578
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/versionrule.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC92ZXJzaW9ucnVsZS5nbw==)
 | `100% <100%> (ø)` | :arrow_up: |
   | 
[pkg/util/tree.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-cGtnL3V0aWwvdHJlZS5nbw==)
 | `81.25% <0%> (-3.13%)` | :arrow_down: |
   | 
[pkg/tlsutil/tlsutil.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-cGtnL3Rsc3V0aWwvdGxzdXRpbC5nbw==)
 | `73.58% <0%> (-0.95%)` | :arrow_down: |
   | 
[server/service/instance.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2UuZ28=)
 | `67.61% <0%> (-0.2%)` | :arrow_down: |
   | 
[server/broker/service.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci9zZXJ2aWNlLmdv)
 | `57.78% <0%> (-0.16%)` | :arrow_down: |
   | 
[server/broker/util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci91dGlsLmdv)
 | `53.47% <0%> (+0.26%)` | :arrow_up: |
   | 
[pkg/log/logrotate.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-cGtnL2xvZy9sb2dyb3RhdGUuZ28=)
 | `34.28% <0%> (+0.57%)` | :arrow_up: |
   | 
[scctl/pkg/plugin/diagnose/compare\_holder.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2NjdGwvcGtnL3BsdWdpbi9kaWFnbm9zZS9jb21wYXJlX2hvbGRlci5nbw==)
 | `96.15% <0%> (+1.28%)` | :arrow_up: |
   | 
[server/service/util/tag\_util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/488/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC90YWdfdXRpbC5nbw==)
 | `65.38% <0%> (+3.84%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?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/488?src=pr=footer).
 Last update 
[c3f06f1...2d324cf](https://codecov.io/gh/apache/servicecomb-service-center/pull/488?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] heyile commented on a change in pull request #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
heyile commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233089028
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
 
 Review comment:
   just give a tip... NumberFormat have removed 


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
heyile commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233088462
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -47,6 +53,8 @@
 
   public static final String ENABLED = 
"servicecomb.metrics.publisher.defaultLog.enabled";
 
+  public static final String METRICS_OS_ENABLED = 
"servicecomb.metrics.publisher.defaultLog.printOs.enabled";
 
 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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
heyile commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233089097
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
+NumberFormat nt = NumberFormat.getPercentInstance();
+if (rate > 0.0) {
+  nt.setMaximumFractionDigits(3);
+  ratePercentStr = nt.format(rate);
+}
+sb.append("os:\n")
+.append(String.format("  cpu: %s\n", ratePercentStr));
+  }
+  if (netNode != null && !netNode.getMeasurements().isEmpty()) {
+sb.append("  net:\ninterface send  
 recv\n");
+for (MeasurementNode iNode : netNode.getChildren().values()) {
+  double sendRate = 
iNode.findChild(OsNetMeter.tagBytesTransmit.value()).summary();
+  double receiveRate = 
iNode.findChild(OsNetMeter.tagBytesReceive.value()).summary();
+  if (sendRate == 0.0 && receiveRate == 0.0) {
+//interface with rate 0.0 should be skipped
+continue;
+  }
+  String sendRateStr = "calc ...";
+  String receiveRateStr = "calc ...";
+  if (sendRate != OsNetMeter.DEFAULT_INIT_RATE || receiveRate != 
OsNetMeter.DEFAULT_INIT_RATE) {
+sendRateStr = getRealTimeNetStr(sendRate);
+receiveRateStr = getRealTimeNetStr(receiveRate);
+  }
+  sb.append(String.format("%-29s %-42s %s\n",
+  iNode.getName(), sendRateStr, receiveRateStr));
+}
+  }
+}
+  }
+
+  private String getRealTimeNetStr(Double netBytes) {
 
 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] little-cui commented on issue #489: Add microservice properties tab on service detail page

2018-11-13 Thread GitBox
little-cui commented on issue #489: Add microservice properties tab on service 
detail page
URL: 
https://github.com/apache/servicecomb-service-center/issues/489#issuecomment-438309151
 
 
   @asifdxtreme 


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 issue #489: Add microservice properties tab on service detail page

2018-11-13 Thread GitBox
little-cui opened a new issue #489: Add microservice properties tab on service 
detail page
URL: https://github.com/apache/servicecomb-service-center/issues/489
 
 
   Now, it is hard to query microservice properties. So i think we can add a 
"properties" tab on service details page at frontend


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233083251
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
+NumberFormat nt = NumberFormat.getPercentInstance();
+if (rate > 0.0) {
+  nt.setMaximumFractionDigits(3);
+  ratePercentStr = nt.format(rate);
+}
+sb.append("os:\n")
+.append(String.format("  cpu: %s\n", ratePercentStr));
+  }
+  if (netNode != null && !netNode.getMeasurements().isEmpty()) {
+sb.append("  net:\ninterface send  
 recv\n");
+for (MeasurementNode iNode : netNode.getChildren().values()) {
+  double sendRate = 
iNode.findChild(OsNetMeter.tagBytesTransmit.value()).summary();
+  double receiveRate = 
iNode.findChild(OsNetMeter.tagBytesReceive.value()).summary();
+  if (sendRate == 0.0 && receiveRate == 0.0) {
+//interface with rate 0.0 should be skipped
+continue;
+  }
+  String sendRateStr = "calc ...";
+  String receiveRateStr = "calc ...";
+  if (sendRate != OsNetMeter.DEFAULT_INIT_RATE || receiveRate != 
OsNetMeter.DEFAULT_INIT_RATE) {
+sendRateStr = getRealTimeNetStr(sendRate);
+receiveRateStr = getRealTimeNetStr(receiveRate);
+  }
+  sb.append(String.format("%-29s %-42s %s\n",
+  iNode.getName(), sendRateStr, receiveRateStr));
+}
+  }
+}
+  }
+
+  private String getRealTimeNetStr(Double netBytes) {
 
 Review comment:
   ```
 public static String humanReadableBytes(long bytes) {
   int unit = 1024;
   if (bytes < unit) {
 return bytes + " B";
   }
   
   int exp = (int) (Math.log(bytes) / Math.log(unit));
   char pre = "KMGTPE".charAt(exp - 1);
   return String.format("%.3f %cB", bytes / Math.pow(unit, exp), pre);
 }
   ```
   
   put it to org.apache.servicecomb.foundation.common.net.NetUtils


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233083251
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
+NumberFormat nt = NumberFormat.getPercentInstance();
+if (rate > 0.0) {
+  nt.setMaximumFractionDigits(3);
+  ratePercentStr = nt.format(rate);
+}
+sb.append("os:\n")
+.append(String.format("  cpu: %s\n", ratePercentStr));
+  }
+  if (netNode != null && !netNode.getMeasurements().isEmpty()) {
+sb.append("  net:\ninterface send  
 recv\n");
+for (MeasurementNode iNode : netNode.getChildren().values()) {
+  double sendRate = 
iNode.findChild(OsNetMeter.tagBytesTransmit.value()).summary();
+  double receiveRate = 
iNode.findChild(OsNetMeter.tagBytesReceive.value()).summary();
+  if (sendRate == 0.0 && receiveRate == 0.0) {
+//interface with rate 0.0 should be skipped
+continue;
+  }
+  String sendRateStr = "calc ...";
+  String receiveRateStr = "calc ...";
+  if (sendRate != OsNetMeter.DEFAULT_INIT_RATE || receiveRate != 
OsNetMeter.DEFAULT_INIT_RATE) {
+sendRateStr = getRealTimeNetStr(sendRate);
+receiveRateStr = getRealTimeNetStr(receiveRate);
+  }
+  sb.append(String.format("%-29s %-42s %s\n",
+  iNode.getName(), sendRateStr, receiveRateStr));
+}
+  }
+}
+  }
+
+  private String getRealTimeNetStr(Double netBytes) {
 
 Review comment:
 public static String humanReadableBytes(long bytes) {
   int unit = 1024;
   if (bytes < unit) {
 return bytes + " B";
   }
   
   int exp = (int) (Math.log(bytes) / Math.log(unit));
   char pre = "KMGTPE".charAt(exp - 1);
   return String.format("%.3f %cB", bytes / Math.pow(unit, exp), pre);
 }
   
   put it to org.apache.servicecomb.foundation.common.net.NetUtils


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233082550
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
 
 Review comment:
   extract cpu/net to two print 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] wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233082171
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -102,14 +111,67 @@ protected void printLog(List meters) {
 DefaultPublishModel model = factory.createDefaultPublishModel();
 
 printThreadPoolMetrics(model, sb);
-
+printOsLog(factory.getTree(), sb);
 printConsumerLog(model, sb);
 printProducerLog(model, sb);
 printEdgeLog(model, sb);
 
 LOGGER.info(sb.toString());
   }
 
+  protected void printOsLog(MeasurementTree tree, StringBuilder sb) {
+if (!DynamicPropertyFactory.getInstance()
+.getBooleanProperty(METRICS_OS_ENABLED, false)
+.get()) {
+  return;
+}
+MeasurementNode OsNode = 
tree.findChild(OsStatisticsMeter.OS_STATISTICS_NAME);
+if (OsNode != null && !OsNode.getMeasurements().isEmpty()) {
+  MeasurementNode netNode = OsNode.findChild("net");
+  MeasurementNode cpuNode = OsNode.findChild("cpu");
+  if (cpuNode != null && !cpuNode.getMeasurements().isEmpty()) {
+double rate = cpuNode.findChild("allCpu", 
OsCpuMeter.tagCpuRate.value()).summary();
+String ratePercentStr = "calc ...";
 
 Review comment:
   why "calc ..."?
   why NumberFormat ?


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233081553
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultLogPublisher.java
 ##
 @@ -47,6 +53,8 @@
 
   public static final String ENABLED = 
"servicecomb.metrics.publisher.defaultLog.enabled";
 
+  public static final String METRICS_OS_ENABLED = 
"servicecomb.metrics.publisher.defaultLog.printOs.enabled";
 
 Review comment:
   why need this flag?


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 #987: [SCB-1017]add os cpu net info in the metrics with linux os

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r233080475
 
 

 ##
 File path: 
demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 ##
 @@ -148,7 +148,7 @@ public static void run() {
 for (String metricLine : metricLines) {
   if (!metricLine.startsWith("#")) {
 String[] metricKeyAndValue = metricLine.split(" ");
-if (!metricKeyAndValue[0].startsWith("jvm")) {
+if (!metricKeyAndValue[0].startsWith("jvm") && 
!metricKeyAndValue[0].startsWith("servicecomb_os")) {
 
 Review comment:
   rename "servicecomb_os" to "os"


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 #314: [SCB-891] Add kamon metrics to Omega client

2018-11-13 Thread GitBox
coveralls edited a comment on issue #314: [SCB-891] Add kamon metrics to Omega 
client
URL: https://github.com/apache/servicecomb-saga/pull/314#issuecomment-423996583
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20076916/badge)](https://coveralls.io/builds/20076916)
   
   Coverage decreased (-1.7%) to 89.905% when pulling 
**67a04c3ca80c8e469298d1757376ed3c9960e809 on maheshrajus:master** into 
**5350a86c0e3137db50db305d2788de2b3f357960 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] laijianbin commented on issue #988: [SCB-1019]consumer support application/xml MIME type

2018-11-13 Thread GitBox
laijianbin commented on issue #988: [SCB-1019]consumer support application/xml 
MIME type
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/988#issuecomment-438264014
 
 
   @wujimin , I find still have problem 
   postman->edge->A,result is {"message":"Parameter is not valid."}
   postman->A result is 
ok({"name":"name","age":18,"role":"role","weight":"111","job":{"name":"nnn","content":"ccc"}})


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 #488: SCB-1015 Support the forth microservice version number registration

2018-11-13 Thread GitBox
little-cui opened a new pull request #488: SCB-1015 Support the forth 
microservice version number registration
URL: https://github.com/apache/servicecomb-service-center/pull/488
 
 
   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] wujimin commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
wujimin commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r233011372
 
 

 ##
 File path: spring-boot-starter/spring-boot-starter-discovery/pom.xml
 ##
 @@ -75,5 +75,9 @@
   org.apache.servicecomb
   service-registry
 
+
 
 Review comment:
   no , you add new core dependence


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] WillemJiang commented on a change in pull request #317: [SCB-935] [WIP] Saga transaction management console UI initial commit

2018-11-13 Thread GitBox
WillemJiang commented on a change in pull request #317: [SCB-935] [WIP] Saga 
transaction management console UI initial commit
URL: https://github.com/apache/servicecomb-saga/pull/317#discussion_r232987173
 
 

 ##
 File path: 
saga-web/src/main/resources/saga-frontend/src/app/@core/core.module.ts
 ##
 @@ -0,0 +1,75 @@
+import { ModuleWithProviders, NgModule, Optional, SkipSelf } from 
'@angular/core';
 
 Review comment:
   I need to know if this file is generated or write by hand. 
   If it is write by hand we need to apply the apache License header here. 
   If not, we should find a right way to specify the license.


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] WillemJiang commented on a change in pull request #317: [SCB-935] [WIP] Saga transaction management console UI initial commit

2018-11-13 Thread GitBox
WillemJiang commented on a change in pull request #317: [SCB-935] [WIP] Saga 
transaction management console UI initial commit
URL: https://github.com/apache/servicecomb-saga/pull/317#discussion_r232987173
 
 

 ##
 File path: 
saga-web/src/main/resources/saga-frontend/src/app/@core/core.module.ts
 ##
 @@ -0,0 +1,75 @@
+import { ModuleWithProviders, NgModule, Optional, SkipSelf } from 
'@angular/core';
 
 Review comment:
   We need to apply the apache License header here.


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: Implement Saga Console API's

2018-11-13 Thread ningjiang
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 10cdd07  Implement Saga Console API's
10cdd07 is described below

commit 10cdd07742497d349c087c8f641e466455b137bb
Author: asifdxtreme 
AuthorDate: Tue Oct 30 16:28:22 2018 +0530

Implement Saga Console API's
---
 .../alpha/server/TxEventEnvelopeRepository.java| 137 ++-
 .../console/saga/SagaTransactionsController.java   | 255 +
 .../alpha/server/console/saga/model/Stats.java | 103 +
 3 files changed, 494 insertions(+), 1 deletion(-)

diff --git 
a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
 
b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
index 89808c9..ebb7610 100644
--- 
a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
+++ 
b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
@@ -28,7 +28,7 @@ import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.CrudRepository;
 
-interface TxEventEnvelopeRepository extends CrudRepository {
+public interface TxEventEnvelopeRepository extends CrudRepository {
   List findByGlobalTxId(String globalTxId);
 
   @Query("SELECT t FROM TxEvent t "
@@ -124,6 +124,141 @@ interface TxEventEnvelopeRepository extends 
CrudRepository {
   + "  AND t1.surrogateId > t.surrogateId )")
   List findDuplicateEventsByType(String type);
 
+  List findByServiceName(String serviceName);
+
+  @Query("SELECT count(t) FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent'))")
+  int findCountOfCompensatingEvents();
+
+  @Query("SELECT t FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCompensatingEvents();
+
+  @Query("SELECT t FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCompensatingEvents(Pageable pageable);
+
+  @Query("SELECT count(t) FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent'))\n")
+  int findCountOfCommittedEvents();
+
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCommittedEvents();
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCommittedEvents(Pageable pageable);
+
+  @Query("SELECT count(t) FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId " +
+  "FROM TxEvent t1 WHERE t1.globalTxId = t.globalTxId  " +
+  "AND 

[GitHub] WillemJiang closed pull request #325: SCB-995 Implement Saga Console API's

2018-11-13 Thread GitBox
WillemJiang closed pull request #325: SCB-995 Implement Saga Console API's
URL: https://github.com/apache/servicecomb-saga/pull/325
 
 
   

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/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
 
b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
index 89808c90..ebb76102 100644
--- 
a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
+++ 
b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java
@@ -28,7 +28,7 @@
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.CrudRepository;
 
-interface TxEventEnvelopeRepository extends CrudRepository {
+public interface TxEventEnvelopeRepository extends CrudRepository {
   List findByGlobalTxId(String globalTxId);
 
   @Query("SELECT t FROM TxEvent t "
@@ -124,6 +124,141 @@
   + "  AND t1.surrogateId > t.surrogateId )")
   List findDuplicateEventsByType(String type);
 
+  List findByServiceName(String serviceName);
+
+  @Query("SELECT count(t) FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent'))")
+  int findCountOfCompensatingEvents();
+
+  @Query("SELECT t FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCompensatingEvents();
+
+  @Query("SELECT t FROM TxEvent t" +
+  " WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCompensatingEvents(Pageable pageable);
+
+  @Query("SELECT count(t) FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent'))\n")
+  int findCountOfCommittedEvents();
+
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCommittedEvents();
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('TxAbortedEvent', 'TxCompensatedEvent')) " +
+  "AND EXISTS(  SELECT t1.globalTxId FROM TxEvent t1 " +
+  "WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findCommittedEvents(Pageable pageable);
+
+  @Query("SELECT count(t) FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId " +
+  "FROM TxEvent t1 WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent'))\n")
+  int findCountOfPendingEvents();
+
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 'SagaStartedEvent' " +
+  "AND NOT EXISTS(  SELECT t1.globalTxId " +
+  "FROM TxEvent t1 WHERE t1.globalTxId = t.globalTxId  " +
+  "AND t1.type IN ('SagaEndedEvent')) " +
+  "ORDER BY t.surrogateId DESC")
+  List findPendingEvents();
+
+  @Query("SELECT t FROM TxEvent t " +
+  "WHERE t.type = 

[GitHub] wujimin opened a new pull request #993: [SCB-1022] measure tcpServer and tcpClient

2018-11-13 Thread GitBox
wujimin opened a new pull request #993: [SCB-1022] measure tcpServer and 
tcpClient
URL: https://github.com/apache/servicecomb-java-chassis/pull/993
 
 
   


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-docs] branch master updated (203d7e5 -> 412c2f2)

2018-11-13 Thread yaohaishi
This is an automated email from the ASF dual-hosted git repository.

yaohaishi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-docs.git.


from 203d7e5  3rd-party-service-invoke add to SUMMAY.md
 add 1993b82  [SCB-1014] update the description about 
ExceptionToProducerResponseConverter
 add 02cb402  [SCB-1014] rename ExceptionToResponseConverter to 
ExceptionToProducerResponseConverter in other pages
 new 412c2f2  Merge pull request #75 from 
yhs0092/update_ExceptionToProducerResponseConverter_description

The 1 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:
 .../configuration/parameter-validator.md   |  10 +-
 .../en_US/general-development/error-handling.md| 118 +++--
 .../configuration/parameter-validator.md   |  10 +-
 .../zh_CN/general-development/error-handling.md| 112 ++-
 4 files changed, 133 insertions(+), 117 deletions(-)



[GitHub] yhs0092 closed pull request #75: [SCB-1014] Update the description about ExceptionToResponseConverter

2018-11-13 Thread GitBox
yhs0092 closed pull request #75: [SCB-1014] Update the description about 
ExceptionToResponseConverter
URL: https://github.com/apache/servicecomb-docs/pull/75
 
 
   

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/java-chassis-reference/en_US/build-provider/configuration/parameter-validator.md
 
b/java-chassis-reference/en_US/build-provider/configuration/parameter-validator.md
index 9d13827..96abcd8 100644
--- 
a/java-chassis-reference/en_US/build-provider/configuration/parameter-validator.md
+++ 
b/java-chassis-reference/en_US/build-provider/configuration/parameter-validator.md
@@ -84,13 +84,13 @@ public class Student {
 
    Return error can be customized with the SPI mechanism.
 
-* Developer can customize the returned error information by implementing the 
interface ExceptionToResponseConverter, taking the 
ConstraintViolationExceptionToResponseConverter as an example.
+* Developer can customize the returned error information by implementing the 
interface ExceptionToProducerResponseConverter, taking the 
ConstraintViolationExceptionToProducerResponseConverter as an example.
 
-   1. Implement the ExceptionToResponseConverter interface, override the 
method, the return value of the getOrder method indicates the priority of the 
validator. The smaller the value, the higher the priority.
+   1. Implement the ExceptionToProducerResponseConverter interface, override 
the method, the return value of the getOrder method indicates the priority of 
the validator. The smaller the value, the higher the priority.
 
  ```java
- public class ConstraintViolationExceptionToResponseConverter
- implements ExceptionToResponseConverter 
{
+ public class ConstraintViolationExceptionToProducerResponseConverter
+ implements 
ExceptionToProducerResponseConverter {
@Override
public Class getExceptionClass() {
  return ConstraintViolationException.class;
@@ -108,4 +108,4 @@ public class Student {
  }
  ```
 
-  2. Add a file in the services folder under META-INF, with the implemented 
interface x.x.x.ExceptionToResponseConverter(with package name\) as the name, 
and the implementation class 
x.x.x.ConstraintViolationExceptionToResponseConverter(with package name\) as 
the content.
+  2. Add a file in the services folder under META-INF, with the implemented 
interface x.x.x.ExceptionToProducerResponseConverter(with package name\) as the 
name, and the implementation class 
x.x.x.ConstraintViolationExceptionToProducerResponseConverter(with package 
name\) as the content.
diff --git a/java-chassis-reference/en_US/general-development/error-handling.md 
b/java-chassis-reference/en_US/general-development/error-handling.md
index 11737ad..614c6aa 100644
--- a/java-chassis-reference/en_US/general-development/error-handling.md
+++ b/java-chassis-reference/en_US/general-development/error-handling.md
@@ -2,29 +2,31 @@
 
 ServiceComb has three categories of exceptions:
 * User Defined Exceptions:Exceptions defined in API. These exceptions are 
generated to swagger.
+
 * Control Messages Exceptions:Most of them are thrown by handlers. e.g. Flow 
control throws TOO_MANY_REQUESTS_STATUS.
 
-```
-CommonExceptionData errorData = new CommonExceptionData("rejected by qps 
flowcontrol");
-asyncResp.producerFail(new 
InvocationException(QpsConst.TOO_MANY_REQUESTS_STATUS, errorData));
-```
+  ```java
+  CommonExceptionData errorData = new CommonExceptionData("rejected by qps 
flowcontrol");
+  asyncResp.producerFail(new 
InvocationException(QpsConst.TOO_MANY_REQUESTS_STATUS, errorData));
+  ```
 
-* Unknown Exceptions:Unkown exceptions may throw by service implementation 
like NullPointerException or network SocketException. These exceptions will be 
caught by ServiceComb and return 490, 590 like error code. e.g. 
+* Unknown Exceptions:Unkown exceptions may throw by service implementation 
like NullPointerException or network SocketException. These exceptions will be 
caught by ServiceComb and return 490, 590 like error code. e.g.
 
-```
-CommonExceptionData errorData = new CommonExceptionData(cause.getMessage());
-asyncResp.producerFail(new InvocationException(590, errorData)
-
-or
-asyncResp.consumerFail(new InvocationException(490, errorData)
-```
+  ```java
+  CommonExceptionData errorData = new CommonExceptionData(cause.getMessage());
+  asyncResp.producerFail(new InvocationException(590, errorData)
+  ```
+  or
+  ```java
+  asyncResp.consumerFail(new InvocationException(490, errorData)
+  ```
 
 
 ## User Defined Exceptions
 
-Users can use @ApiResonse to define different types of exceptions。e.g.
+Users can use @ApiResonse to define different types of exceptions. e.g.
 
-```
+```java
   @Path("/errorCode")
   @POST
   @ApiResponses({
@@ -51,9 +53,9 @@ 

[servicecomb-docs] 01/01: Merge pull request #75 from yhs0092/update_ExceptionToProducerResponseConverter_description

2018-11-13 Thread yaohaishi
This is an automated email from the ASF dual-hosted git repository.

yaohaishi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-docs.git

commit 412c2f2cbdd74c9f5686c266f822ce5b7efdce7f
Merge: 203d7e5 02cb402
Author: yhs0092 
AuthorDate: Tue Nov 13 17:12:26 2018 +0800

Merge pull request #75 from 
yhs0092/update_ExceptionToProducerResponseConverter_description

[SCB-1014] Update the description about ExceptionToResponseConverter

 .../configuration/parameter-validator.md   |  10 +-
 .../en_US/general-development/error-handling.md| 118 +++--
 .../configuration/parameter-validator.md   |  10 +-
 .../zh_CN/general-development/error-handling.md| 112 ++-
 4 files changed, 133 insertions(+), 117 deletions(-)



[GitHub] little-cui edited a comment on issue #485: Latest code binaries creates core-dump

2018-11-13 Thread GitBox
little-cui edited a comment on issue #485: Latest code binaries creates 
core-dump
URL: 
https://github.com/apache/servicecomb-service-center/issues/485#issuecomment-438167921
 
 
   2018-11-13T10:22:27.653+0530 ERROR   etcdsync/mutex.go:138   Key 
/cse/etcdsync/cse-sr/lock/global is locked, waiting for other node releases it, 
id=asif-20051-20181113-10:22:27.653110076
   2018-11-13T10:22:27.653+0530 INFOetcdsync/mutex.go:113   Trying to 
create a lock: key=/cse/etcdsync/cse-sr/lock/global, 
id=asif-20051-20181113-10:22:27.653110076
   
   Do you run SC with a shared etcd cluster? Thiis log show there is another SC 
lock the etcd.
   If not, please check the modifications of etc/conf/app.conf and retry 
execute the shell script after one minutes.


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 edited a comment on issue #485: Latest code binaries creates core-dump

2018-11-13 Thread GitBox
little-cui edited a comment on issue #485: Latest code binaries creates 
core-dump
URL: 
https://github.com/apache/servicecomb-service-center/issues/485#issuecomment-438167921
 
 
   2018-11-13T10:22:27.653+0530 ERROR   etcdsync/mutex.go:138   Key 
/cse/etcdsync/cse-sr/lock/global is locked, waiting for other node releases it, 
id=asif-20051-20181113-10:22:27.653110076
   2018-11-13T10:22:27.653+0530 INFOetcdsync/mutex.go:113   Trying to 
create a lock: key=/cse/etcdsync/cse-sr/lock/global, 
id=asif-20051-20181113-10:22:27.653110076
   
   Do you run SC with a shared etcd cluster? Thiis log show there is another SC 
lock the etcd.
   If not, please check the modifications etc/conf/app.conf and retry execute 
the shell script after one minutes.


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 #487: WIP SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread GitBox
coveralls commented on issue #487: WIP SCB-993 Fixed the error of microservice 
registration in multi-dc
URL: 
https://github.com/apache/servicecomb-service-center/pull/487#issuecomment-438181672
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20071064/badge)](https://coveralls.io/builds/20071064)
   
   Coverage decreased (-0.2%) to 62.684% when pulling 
**be0335d0a7afbe72a1fe6bb24ffc164ea4a787d5 on little-cui:master** into 
**c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40 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 commented on issue #487: WIP SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread GitBox
codecov-io commented on issue #487: WIP SCB-993 Fixed the error of microservice 
registration in multi-dc
URL: 
https://github.com/apache/servicecomb-service-center/pull/487#issuecomment-438181426
 
 
   # 
[Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=h1)
 Report
   > Merging 
[#487](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/servicecomb-service-center/commit/c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40?src=pr=desc)
 will **decrease** coverage by `<.01%`.
   > The diff coverage is `14.28%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #487  +/-   ##
   ==
   - Coverage   60.35%   60.35%   -0.01% 
   ==
 Files 159  159  
 Lines   1353413537   +3 
   ==
   + Hits 8169 8170   +1 
   - Misses   4787 4789   +2 
 Partials  578  578
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC91dGlsLmdv)
 | `80% <0%> (-20%)` | :arrow_down: |
   | 
[server/core/microservice.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvbWljcm9zZXJ2aWNlLmdv)
 | `70.27% <20%> (-0.97%)` | :arrow_down: |
   | 
[server/service/instance.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2UuZ28=)
 | `67.61% <0%> (-0.2%)` | :arrow_down: |
   | 
[server/broker/service.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci9zZXJ2aWNlLmdv)
 | `57.78% <0%> (-0.16%)` | :arrow_down: |
   | 
[server/govern/service.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL2dvdmVybi9zZXJ2aWNlLmdv)
 | `72.93% <0%> (+0.33%)` | :arrow_up: |
   | 
[scctl/pkg/plugin/diagnose/compare\_holder.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2NjdGwvcGtnL3BsdWdpbi9kaWFnbm9zZS9jb21wYXJlX2hvbGRlci5nbw==)
 | `96.15% <0%> (+1.28%)` | :arrow_up: |
   | 
[server/service/util/tag\_util.go](https://codecov.io/gh/apache/servicecomb-service-center/pull/487/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC90YWdfdXRpbC5nbw==)
 | `65.38% <0%> (+3.84%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?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/487?src=pr=footer).
 Last update 
[c3f06f1...be0335d](https://codecov.io/gh/apache/servicecomb-service-center/pull/487?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] yhs0092 opened a new pull request #75: [SCB-1014] Update the description about ExceptionToResponseConverter

2018-11-13 Thread GitBox
yhs0092 opened a new pull request #75: [SCB-1014] Update the description about 
ExceptionToResponseConverter
URL: https://github.com/apache/servicecomb-docs/pull/75
 
 
   
更新关于`ExceptionToResponseConverter`的描述,将`ExceptionToResponseConverter`重命名为`ExceptionToProducerResponseConverter`。


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 #487: SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread GitBox
little-cui opened a new pull request #487: SCB-993 Fixed the error of 
microservice registration in multi-dc
URL: https://github.com/apache/servicecomb-service-center/pull/487
 
 
   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


[servicecomb-service-center] 01/01: SCB-993 Update the design document (#486)

2018-11-13 Thread littlecui
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git

commit c3f06f1b40f8e3cb2f4fa60bcdf02e447e3aba40
Author: little-cui 
AuthorDate: Tue Nov 13 15:55:29 2018 +0800

SCB-993 Update the design document (#486)
---
 docs/aggregator-design.PNG | Bin 39224 -> 49598 bytes
 docs/design.md |  20 +---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/docs/aggregator-design.PNG b/docs/aggregator-design.PNG
index 5f67d1a..06b4bf7 100644
Binary files a/docs/aggregator-design.PNG and b/docs/aggregator-design.PNG 
differ
diff --git a/docs/design.md b/docs/design.md
index 12c73f6..fc81afd 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -1,10 +1,24 @@
 ## Service-Center Design
 
 Service-Center(SC) is a service registry that allows services to register 
their instance information and to discover providers of a given service.
-SC uses etcd to store all the information of micro-service and its instances. 
Below is the diagram stating the working principles and flow of SC.
+Generally, SC uses etcd to store all the information of micro-service and its 
instances.
+
+![architecture](/docs/aggregator-design.PNG)
+
+- **API Layer**: To expose the RESTful and gRPC service.
+- **Metedata**: The business logic to manage microservice, instance, schema, 
tag, dependency and ACL rules.
+- **Server Core**: Including data model, requests handle chain and so on.
+- **Aggregator**: It is the bridge between Core and Registry, includes the 
cache manager and indexer of registry.
+- **Registry Adaptor**: An abstract layer of registry, exposing a unified 
interface for upper layer calls.
+
+Below is the diagram stating the working principles and flow of SC.
 
  On StartUp
-Here we assume that micro-services are written using 
[java-chassis](https://github.com/ServiceComb/java-chassis) sdk. So when 
micro-service boots up then java-chassis sdk does the following list of tasks.
+Here describes a standard client registration process.
+We assume that micro-services are written using 
+[java-chassis](https://github.com/ServiceComb/java-chassis) sdk or 
+[go-chassis](https://github.com/go-chassis/go-chassis) sdk.
+So when micro-service boots up then java-chassis sdk does the following list 
of tasks.
 
 1. On startup provider registers the micro-service to SC if not registered 
earlier and also register its instance information like its Ip and Port on 
which instance is running.
 2. SC stores the provider information in etcd.
@@ -23,4 +37,4 @@ Provider instance regularly sends heartbeat signal every 30 
seconds to SC, if SC
 Consumer watches the information of provider instances from SC and if there is 
any change then the cache is updated.  
 When Consumer needs to communicate to Provider then consumer reads endpoints 
of the provider instances from cache and do loadbalancing to communicate to 
Provider.
 
-Note: This document is in beta stage, feel free to contribute to this document.
+Note: Feel free to contribute to this document.



[servicecomb-service-center] branch master updated (1a4c2df -> c3f06f1)

2018-11-13 Thread littlecui
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/servicecomb-service-center.git.


 discard 1a4c2df  SCB-993 Fixed the error of microservice registration in 
multi-dc
 new c3f06f1  SCB-993 Update the design document (#486)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1a4c2df)
\
 N -- N -- N   refs/heads/master (c3f06f1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:
 docs/aggregator-design.PNG   | Bin 39224 -> 49598 bytes
 docs/design.md   |  20 ---
 server/admin/admin_suite_test.go |   3 +--
 server/core/microservice.go  |  12 -
 server/govern/govern_suite_test.go   |   3 +--
 server/handler/cache/cache.go|   4 ---
 server/plugin/pkg/discovery/aggregate/adaptor.go |  10 +---
 server/plugin/pkg/discovery/aggregate/common.go  |  17 ++---
 server/plugin/pkg/discovery/aggregate/indexer.go |  31 ---
 server/plugin/pkg/registry/common.go |   2 --
 server/plugin/pkg/registry/config.go |   2 +-
 server/plugin/pkg/registry/option.go |   5 
 server/service/util/common.go|   9 +++
 server/service/util/util.go  |   3 ---
 14 files changed, 38 insertions(+), 83 deletions(-)



[servicecomb-service-center] 01/01: SCB-993 Fixed the error of microservice registration in multi-dc

2018-11-13 Thread littlecui
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git

commit 1a4c2df7282f26084ed0982a5b1746370fce02d0
Author: little-cui 
AuthorDate: Tue Nov 13 15:41:22 2018 +0800

SCB-993 Fixed the error of microservice registration in multi-dc
---
 server/admin/admin_suite_test.go |  3 ++-
 server/core/microservice.go  | 12 +
 server/govern/govern_suite_test.go   |  3 ++-
 server/handler/cache/cache.go|  4 +++
 server/plugin/pkg/discovery/aggregate/adaptor.go | 10 +++-
 server/plugin/pkg/discovery/aggregate/common.go  | 17 +++--
 server/plugin/pkg/discovery/aggregate/indexer.go | 31 
 server/plugin/pkg/registry/common.go |  2 ++
 server/plugin/pkg/registry/config.go |  2 +-
 server/plugin/pkg/registry/option.go |  5 
 server/service/util/common.go|  9 ---
 server/service/util/util.go  |  3 +++
 12 files changed, 80 insertions(+), 21 deletions(-)

diff --git a/server/admin/admin_suite_test.go b/server/admin/admin_suite_test.go
index 8053859..9c11b87 100644
--- a/server/admin/admin_suite_test.go
+++ b/server/admin/admin_suite_test.go
@@ -20,6 +20,7 @@ import _ 
"github.com/apache/servicecomb-service-center/server/init"
 import _ "github.com/apache/servicecomb-service-center/server/bootstrap"
 import (
"github.com/apache/servicecomb-service-center/pkg/util"
+   serviceUtil 
"github.com/apache/servicecomb-service-center/server/service/util"
"github.com/astaxie/beego"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/reporters"
@@ -45,5 +46,5 @@ var _ = BeforeSuite(func() {
 func getContext() context.Context {
return util.SetContext(
util.SetDomainProject(context.Background(), "default", 
"default"),
-   "noCache", "1")
+   serviceUtil.CTX_NOCACHE, "1")
 }
diff --git a/server/core/microservice.go b/server/core/microservice.go
index 25765a1..9331e2c 100644
--- a/server/core/microservice.go
+++ b/server/core/microservice.go
@@ -45,7 +45,8 @@ const (
REGISTRY_DEFAULT_LEASE_RENEWALINTERVAL int32 = 30
REGISTRY_DEFAULT_LEASE_RETRYTIMES  int32 = 3
 
-   IS_SC_SELF = "sc_self"
+   CTX_SC_SELF = "_sc_self"
+   CTX_SC_REGISTRY = "_registryOnly"
 )
 
 func init() {
@@ -85,9 +86,10 @@ func prepareSelfRegistration() {
 }
 
 func AddDefaultContextValue(ctx context.Context) context.Context {
-   return util.SetContext(
-   util.SetDomainProject(ctx, REGISTRY_DOMAIN, REGISTRY_PROJECT),
-   IS_SC_SELF, true)
+   return util.SetContext(util.SetContext(util.SetDomainProject(ctx,
+   REGISTRY_DOMAIN, REGISTRY_PROJECT),
+   CTX_SC_SELF, true),
+   CTX_SC_REGISTRY, "1")
 }
 
 func IsDefaultDomainProject(domainProject string) bool {
@@ -116,7 +118,7 @@ func IsShared(key *pb.MicroServiceKey) bool {
 }
 
 func IsSCInstance(ctx context.Context) bool {
-   b, _ := ctx.Value(IS_SC_SELF).(bool)
+   b, _ := ctx.Value(CTX_SC_SELF).(bool)
return b
 }
 
diff --git a/server/govern/govern_suite_test.go 
b/server/govern/govern_suite_test.go
index 2b20ef0..0954f22 100644
--- a/server/govern/govern_suite_test.go
+++ b/server/govern/govern_suite_test.go
@@ -25,6 +25,7 @@ import (
pb "github.com/apache/servicecomb-service-center/server/core/proto"
"github.com/apache/servicecomb-service-center/server/govern"
"github.com/apache/servicecomb-service-center/server/service"
+   serviceUtil 
"github.com/apache/servicecomb-service-center/server/service/util"
"github.com/astaxie/beego"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/reporters"
@@ -54,5 +55,5 @@ var _ = BeforeSuite(func() {
 func getContext() context.Context {
return util.SetContext(
util.SetDomainProject(context.Background(), "default", 
"default"),
-   "noCache", "1")
+   serviceUtil.CTX_NOCACHE, "1")
 }
diff --git a/server/handler/cache/cache.go b/server/handler/cache/cache.go
index 7bda9d4..4bb6fd5 100644
--- a/server/handler/cache/cache.go
+++ b/server/handler/cache/cache.go
@@ -32,6 +32,10 @@ func (l *CacheResponse) Handle(i *chain.Invocation) {
r := i.Context().Value(rest.CTX_REQUEST).(*http.Request)
query := r.URL.Query()
 
+   if r.Method != http.MethodGet {
+   i.WithContext(serviceUtil.CTX_REGISTRYONLY, "1")
+   }
+
noCache := query.Get(serviceUtil.CTX_NOCACHE) == "1"
if noCache {
i.WithContext(serviceUtil.CTX_NOCACHE, "1")
diff --git a/server/plugin/pkg/discovery/aggregate/adaptor.go 
b/server/plugin/pkg/discovery/aggregate/adaptor.go
index 6efb2c5..e56e7c3 100644
--- 

[GitHub] yangbor commented on a change in pull request #990: [SCB-986] Cache instances result in CseDiscoveryClient

2018-11-13 Thread GitBox
yangbor commented on a change in pull request #990: [SCB-986] Cache instances 
result in CseDiscoveryClient
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/990#discussion_r232929218
 
 

 ##
 File path: spring-boot-starter/spring-boot-starter-discovery/pom.xml
 ##
 @@ -75,5 +75,9 @@
   org.apache.servicecomb
   service-registry
 
+
 
 Review comment:
   The DiscoveryFilter interface is defined in this package


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