[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480185#comment-16480185
 ] 

ASF GitHub Bot commented on SCB-548:


coveralls commented on issue #693: [SCB-548] support gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-387664923
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17047620/badge)](https://coveralls.io/builds/17047620)
   
   Coverage increased (+0.2%) to 87.551% when pulling 
**4b5722cfafb0acf0de7863c1d8ab5d58a289ded3 on zhengyangyong:SCB-548** into 
**5c29a7cd224e788cb357e8c640a5f3473ceb0209 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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480137#comment-16480137
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189162929
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/consumer/InvokerUtils.java
 ##
 @@ -32,31 +35,31 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(InvokerUtils.class);
 
   public static Object syncInvoke(String microserviceName, String schemaId, 
String operationName, Object[] args) {
-ReferenceConfig referenceConfig = 
ReferenceConfigUtils.getForInvoke(microserviceName);
-SchemaMeta schemaMeta = 
referenceConfig.getMicroserviceMeta().ensureFindSchemaMeta(schemaId);
-Invocation invocation = InvocationFactory.forConsumer(referenceConfig, 
schemaMeta, operationName, args);
-return syncInvoke(invocation);
+validCanInvoke();
 
 Review comment:
   Done


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480118#comment-16480118
 ] 

ASF GitHub Bot commented on SCB-587:


coveralls commented on issue #709: [SCB-587] Fix archetypes readme
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/709#issuecomment-389490999
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17047175/badge)](https://coveralls.io/builds/17047175)
   
   Coverage increased (+0.005%) to 87.376% when pulling 
**cf50718741f52adf7d94cd65979547c42d81d477 on zhengyangyong:SCB-587** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480119#comment-16480119
 ] 

ASF GitHub Bot commented on SCB-587:


coveralls commented on issue #709: [SCB-587] Fix archetypes readme
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/709#issuecomment-389490999
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17047179/badge)](https://coveralls.io/builds/17047179)
   
   Coverage increased (+0.005%) to 87.376% when pulling 
**cf50718741f52adf7d94cd65979547c42d81d477 on zhengyangyong:SCB-587** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-592) Spring Zuul Tracing Integration Tests CI failed

2018-05-17 Thread yangyongzheng (JIRA)
yangyongzheng created SCB-592:
-

 Summary: Spring Zuul Tracing Integration Tests CI failed
 Key: SCB-592
 URL: https://issues.apache.org/jira/browse/SCB-592
 Project: Apache ServiceComb
  Issue Type: Bug
  Components: Java-Chassis
Affects Versions: java-chassis-1.0.0-m2
Reporter: yangyongzheng
 Fix For: java-chassis-1.0.0-m2


Spring Zuul Tracing Integration Tests is easy failed by : 

Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test 
(default-test) on project spring-zuul-tracing-tests: 
ExecutionException Error occurred in starting fork, check output in 
log -> [Help 1]

 

we need fix it



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480091#comment-16480091
 ] 

ASF GitHub Bot commented on SCB-587:


zhengyangyong closed pull request #709: [SCB-587] Fix archetypes readme
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/709
 
 
   

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/archetypes/README.md b/archetypes/README.md
index a16ce0377..687a6f4ca 100644
--- a/archetypes/README.md
+++ b/archetypes/README.md
@@ -45,7 +45,8 @@ mvn archetype:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes -Dar
 
 In console Interactive mode, input your GroupId, ArtifactId and Version of new 
project(module), after a while the new project will be generated.
 
-*Notice: We will publish these archetypes to maven center repository since 
1.0.0-m2, if you would like to use an archetype from an unreleased version : *
+*Notice: We will publish these archetypes to maven center repository since 
1.0.0-m2, if you would like to use an archetype from an unreleased version, 
must use `archetypeRepository` option in the version 2.4 of archetype-plugin in 
order to set maven repository to apache snapshot groups: *
+
 ```bash
-mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=${archetype-version} 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=1.0.0-m2-SNAPSHOT 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
 ```
\ No newline at end of file


 


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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480092#comment-16480092
 ] 

ASF GitHub Bot commented on SCB-587:


zhengyangyong opened a new pull request #709: [SCB-587] Fix archetypes readme
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/709
 
 
   Signed-off-by: zhengyangyong 
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] 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.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [x] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   update generate from snapshot repo command


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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480086#comment-16480086
 ] 

ASF GitHub Bot commented on SCB-548:


WillemJiang commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189155630
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/consumer/InvokerUtils.java
 ##
 @@ -32,31 +35,31 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(InvokerUtils.class);
 
   public static Object syncInvoke(String microserviceName, String schemaId, 
String operationName, Object[] args) {
-ReferenceConfig referenceConfig = 
ReferenceConfigUtils.getForInvoke(microserviceName);
-SchemaMeta schemaMeta = 
referenceConfig.getMicroserviceMeta().ensureFindSchemaMeta(schemaId);
-Invocation invocation = InvocationFactory.forConsumer(referenceConfig, 
schemaMeta, operationName, args);
-return syncInvoke(invocation);
+validCanInvoke();
 
 Review comment:
   "validCanInvoke" is a bad name (It just check the status of Engine), how 
about using the "checkEngineStatus".


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480058#comment-16480058
 ] 

ASF GitHub Bot commented on SCB-587:


zhengyangyong commented on a change in pull request #709: [SCB-587] Fix 
archetypes readme
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/709#discussion_r189152140
 
 

 ##
 File path: archetypes/README.md
 ##
 @@ -46,6 +46,7 @@ mvn archetype:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes -Dar
 In console Interactive mode, input your GroupId, ArtifactId and Version of new 
project(module), after a while the new project will be generated.
 
 *Notice: We will publish these archetypes to maven center repository since 
1.0.0-m2, if you would like to use an archetype from an unreleased version : *
+
 ```bash
-mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=${archetype-version} 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=1.0.0-m2-SNAPSHOT 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
 
 Review comment:
   Done


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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480040#comment-16480040
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189149707
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/filter/IsolationServerListFilter.java
 ##
 @@ -112,10 +116,18 @@ private boolean allowVisit(Server server) {
   LOGGER.info("The Service {}'s instance {} has been break, will give a 
single test opportunity.",
   microserviceName,
   server);
+  EventManager.post(new IsolationServerEvent(microserviceName, 
totalRequest, currentCountinuousFailureCount,
 
 Review comment:
   done.


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480037#comment-16480037
 ] 

ASF GitHub Bot commented on SCB-591:


wujimin commented on a change in pull request #713:  [SCB-591] configcenter 
need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#discussion_r189149432
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -329,8 +329,14 @@ private void sendHeartbeat(WebSocket ws) {
 
 public void refreshConfig(String configcenter, boolean wait) {
   CountDownLatch latch = new CountDownLatch(1);
+  String encodeServiceName = "";
+  try {
+encodeServiceName = 
URLEncoder.encode(StringUtils.deleteWhitespace(serviceName), "UTF-8");
+  } catch (UnsupportedEncodingException e) {
+LOGGER.error("encode error: {}",e.getMessage());
 
 Review comment:
   1.not format code
   2.failed but still continue?
   3."UTF-8" can changed to java.nio.charset.StandardCharsets.UTF_8.name()


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-579) NullPointerException is thrown when consumer upload null

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480033#comment-16480033
 ] 

ASF GitHub Bot commented on SCB-579:


yhs0092 commented on issue #714: [SCB-579] fix NullPointerException when 
consumer upload null file
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/714#issuecomment-390074524
 
 
   @WillemJiang  This PR deal with the situation that the uploaded file is null 
(Instead of file name).
   Users may write operations that their parameters contains both uploaded 
files and other params like string and int. Sometimes people may call these 
operations but they don't want to upload files.
   So we should ensure that when the uploaded file is null, the microservice 
instances still work well.


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


> NullPointerException is thrown when consumer upload null
> 
>
> Key: SCB-579
> URL: https://issues.apache.org/jira/browse/SCB-579
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> When consumer upload null file, there is a NullPointerException
> {quote}
> Caused by: java.lang.NullPointerException
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFile(RestClientRequestImpl.java:172)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFiles(RestClientRequestImpl.java:157)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.doEndWithUpload(RestClientRequestImpl.java:109)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.end(RestClientRequestImpl.java:94)
> at 
> org.apache.servicecomb.transport.rest.client.http.VertxHttpMethod.lambda$doMethod$1(VertxHttpMethod.java:101)
> ... 7 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480023#comment-16480023
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189147432
 
 

 ##
 File path: 
handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/event/CircutBreakerEventNotifier.java
 ##
 @@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.bizkeeper.event;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.event.AlarmEvent.Type;
+
+import com.netflix.hystrix.HystrixCommandKey;
+import com.netflix.hystrix.HystrixEventType;
+import com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier;
+
+public class CircutBreakerEventNotifier extends HystrixEventNotifier {
+
+  /**
+   * 使用circuitMarker来记录被熔断的接口
+   */
+  private static ConcurrentHashMap circuitMarker = new 
ConcurrentHashMap<>();
+
+  @Override
+  public void markEvent(HystrixEventType eventType, HystrixCommandKey key) {
+String keyName = key.name();
+switch (eventType) {
+  case SHORT_CIRCUITED:
+if (circuitMarker.get(keyName) == null) {
 
 Review comment:
   Succeeded/failed is not used and has been deleted. Open/close is used to 
indicate circuit and isolation status.


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480025#comment-16480025
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189148033
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/filter/TestIsolationServerListFilter.java
 ##
 @@ -45,6 +48,8 @@
 
   LoadBalancerStats loadBalancerStats = null;
 
+  private List taskList;
+
 
 Review comment:
   done


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480024#comment-16480024
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189147665
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/filter/TestIsolationServerListFilter.java
 ##
 @@ -60,29 +63,26 @@ public static void classTeardown() {
 Deencapsulation.setField(ConfigurationManager.class, "instance", null);
 Deencapsulation.setField(ConfigurationManager.class, 
"customConfigurationInstalled", false);
 Deencapsulation.setField(DynamicPropertyFactory.class, "config", null);
+ArchaiusUtils.resetConfig();
 
 Review comment:
   done,removed other reflections.


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480020#comment-16480020
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189147962
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/filter/TestIsolationServerListFilter.java
 ##
 @@ -60,29 +63,26 @@ public static void classTeardown() {
 Deencapsulation.setField(ConfigurationManager.class, "instance", null);
 Deencapsulation.setField(ConfigurationManager.class, 
"customConfigurationInstalled", false);
 Deencapsulation.setField(DynamicPropertyFactory.class, "config", null);
+ArchaiusUtils.resetConfig();
   }
 
   @Before
   public void setUp() throws Exception {
 IsolationServerListFilter = new IsolationServerListFilter();
 loadBalancerStats = new LoadBalancerStats("loadBalancer");
-
-AbstractConfiguration configuration =
-(AbstractConfiguration) 
DynamicPropertyFactory.getBackingConfigurationSource();
-configuration.clearProperty("cse.loadbalance.isolation.enabled");
-configuration.addProperty("cse.loadbalance.isolation.enabled",
+ArchaiusUtils.setProperty("cse.loadbalance.isolation.enabled",
 "true");
-
configuration.clearProperty("cse.loadbalance.isolation.enableRequestThreshold");
-
configuration.addProperty("cse.loadbalance.isolation.enableRequestThreshold",
+
ArchaiusUtils.setProperty("cse.loadbalance.isolation.enableRequestThreshold",
 "3");
 
 taskList = new ArrayList<>();
-EventManager.register(new Object() {
+receiveEvent = new Object() {
   @Subscribe
   public void onEvent(AlarmEvent isolationServerEvent) {
 taskList.add(isolationServerEvent);
   }
-});
+};
+EventManager.register(receiveEvent);
 
 Review comment:
done,save a reference in filter when UT create a new instance for it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480022#comment-16480022
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r188549839
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/filter/IsolationServerListFilter.java
 ##
 @@ -91,19 +94,20 @@ private boolean allowVisit(Server server) {
 ServerStats serverStats = stats.getSingleServerStat(server);
 long totalRequest = serverStats.getTotalRequestsCount();
 long failureRequest = serverStats.getSuccessiveConnectionFailureCount();
-
+int currentCountinuousFailureCount = ((CseServer) 
server).getCountinuousFailureCount();
 
 Review comment:
   The event post needs these values,  these are used as the parameters for the 
event post.


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480021#comment-16480021
 ] 

ASF GitHub Bot commented on SCB-506:


xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r189147541
 
 

 ##
 File path: 
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/event/IsolationServerEvent.java
 ##
 @@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.loadbalance.event;
+
+import java.util.HashMap;
+
+import org.apache.servicecomb.foundation.common.event.AlarmEvent;
+
+public class IsolationServerEvent extends AlarmEvent {
+
+  private String microserviceName;
+
+  //当前实例总请求数
+  private long currentTotalRequest;
+
+  //当前实例连续出错次数
+  private int currentCountinuousFailureCount;
+
+  //当前实例出错百分比
+  private double currentErrorPercentage;
+
+  private long enableRequestThreshold;
+
+  private int continuousFailureThreshold;
+
+  private int errorThresholdPercentage;
+
+  private long singleTestTime;
+
+  public IsolationServerEvent(String microserviceName, long totalRequest, int 
currentCountinuousFailureCount,
+  double currentErrorPercentage, int continuousFailureThreshold,
+  int errorThresholdPercentage, long enableRequestThreshold, long 
singleTestTime, Type type) {
+super(type);
+HashMap msg = new HashMap<>();
+this.microserviceName = microserviceName;
+this.currentTotalRequest = totalRequest;
+this.currentCountinuousFailureCount = currentCountinuousFailureCount;
+this.currentErrorPercentage = currentErrorPercentage;
+this.enableRequestThreshold = enableRequestThreshold;
+this.continuousFailureThreshold = continuousFailureThreshold;
+this.errorThresholdPercentage = errorThresholdPercentage;
+this.singleTestTime = singleTestTime;
+msg.put("microserviceName", this.microserviceName);
 
 Review comment:
   done,Removed map


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


> 服务治理相关的需要事件上报
> -
>
> Key: SCB-506
> URL: https://issues.apache.org/jira/browse/SCB-506
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: xuyiyun
>Assignee: xuyiyun
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480013#comment-16480013
 ] 

ASF GitHub Bot commented on SCB-548:


coveralls commented on issue #693: [SCB-548] support gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-387664923
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17046378/badge)](https://coveralls.io/builds/17046378)
   
   Coverage increased (+0.2%) to 87.551% when pulling 
**8f1bc8ffc574f947c5e26ad639466f7fa60bbcb5 on zhengyangyong:SCB-548** into 
**5c29a7cd224e788cb357e8c640a5f3473ceb0209 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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480008#comment-16480008
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189146562
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+  

[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480002#comment-16480002
 ] 

ASF GitHub Bot commented on SCB-591:


coveralls commented on issue #713:  [SCB-591] configcenter need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#issuecomment-389913479
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17046239/badge)](https://coveralls.io/builds/17046239)
   
   Coverage decreased (-0.02%) to 87.347% when pulling 
**b7c8e5bd188da019bd90c84ffb6265db557a6749 on weichao666:configencoding** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479976#comment-16479976
 ] 

ASF GitHub Bot commented on SCB-591:


weichao666 commented on a change in pull request #713:  [SCB-591] configcenter 
need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#discussion_r189142225
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -329,8 +329,14 @@ private void sendHeartbeat(WebSocket ws) {
 
 public void refreshConfig(String configcenter, boolean wait) {
   CountDownLatch latch = new CountDownLatch(1);
+  String encodeServiceName = "";
+  try {
+encodeServiceName = URLEncoder.encode(serviceName, "UTF-8");
+  } catch (UnsupportedEncodingException e1) {
+e1.printStackTrace();
+  }
+  String path = URIConst.ITEMS + "?dimensionsInfo=" + 
StringUtils.deleteWhitespace(encodeServiceName);
 
 Review comment:
   done


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479975#comment-16479975
 ] 

ASF GitHub Bot commented on SCB-591:


weichao666 commented on a change in pull request #713:  [SCB-591] configcenter 
need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#discussion_r189142200
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -329,8 +329,14 @@ private void sendHeartbeat(WebSocket ws) {
 
 public void refreshConfig(String configcenter, boolean wait) {
   CountDownLatch latch = new CountDownLatch(1);
+  String encodeServiceName = "";
+  try {
+encodeServiceName = URLEncoder.encode(serviceName, "UTF-8");
+  } catch (UnsupportedEncodingException e1) {
+e1.printStackTrace();
 
 Review comment:
   done


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479974#comment-16479974
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189142184
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+  

[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479966#comment-16479966
 ] 

ASF GitHub Bot commented on SCB-548:


wujimin commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189141531
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/consumer/InvokerUtils.java
 ##
 @@ -32,31 +35,31 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(InvokerUtils.class);
 
   public static Object syncInvoke(String microserviceName, String schemaId, 
String operationName, Object[] args) {
-ReferenceConfig referenceConfig = 
ReferenceConfigUtils.getForInvoke(microserviceName);
-SchemaMeta schemaMeta = 
referenceConfig.getMicroserviceMeta().ensureFindSchemaMeta(schemaId);
-Invocation invocation = InvocationFactory.forConsumer(referenceConfig, 
schemaMeta, operationName, args);
-return syncInvoke(invocation);
+validCanInvoke();
 
 Review comment:
   ok,will changed in future PR


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479962#comment-16479962
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r189140652
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/consumer/InvokerUtils.java
 ##
 @@ -32,31 +35,31 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(InvokerUtils.class);
 
   public static Object syncInvoke(String microserviceName, String schemaId, 
String operationName, Object[] args) {
-ReferenceConfig referenceConfig = 
ReferenceConfigUtils.getForInvoke(microserviceName);
-SchemaMeta schemaMeta = 
referenceConfig.getMicroserviceMeta().ensureFindSchemaMeta(schemaId);
-Invocation invocation = InvocationFactory.forConsumer(referenceConfig, 
schemaMeta, operationName, args);
-return syncInvoke(invocation);
+validCanInvoke();
 
 Review comment:
   Considering the check cost is low, I think it's no problem becasuse these 
method are all public and user may direct use them for general invoke.
   


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-531) x-java-interface change from require to optional

2018-05-17 Thread wujimin (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujimin resolved SCB-531.
-
Resolution: Done

> x-java-interface change from require to optional
> 
>
> Key: SCB-531
> URL: https://issues.apache.org/jira/browse/SCB-531
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-531) x-java-interface change from require to optional

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479951#comment-16479951
 ] 

ASF GitHub Bot commented on SCB-531:


wujimin closed pull request #703: [SCB-531] change demo to test schema without 
x-java-interface declared.
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/703
 
 
   

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/demo/demo-schema/src/main/resources/microservices/pojo/server.yaml 
b/demo/demo-schema/src/main/resources/microservices/pojo/server.yaml
index 543f39fbf..ac4d37e62 100644
--- a/demo/demo-schema/src/main/resources/microservices/pojo/server.yaml
+++ b/demo/demo-schema/src/main/resources/microservices/pojo/server.yaml
@@ -129,7 +129,8 @@ paths:
 - name: index
   in: query
   required: true
-  type: number
+  type: integer
+  format: int32
 - name: user
   in: body
   schema:
@@ -187,7 +188,7 @@ paths:
 definitions:
   Error:
 type: object
-x-java-class: org.apache.servicecomb.core.exception.CommonExceptionData
+x-java-class: 
org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData
 properties:
   message:
 type: string
diff --git 
a/demo/demo-schema/src/main/resources/microservices/pojo/smartcare.yaml 
b/demo/demo-schema/src/main/resources/microservices/pojo/smartcare.yaml
index 49a8ac93e..0879c3bda 100644
--- a/demo/demo-schema/src/main/resources/microservices/pojo/smartcare.yaml
+++ b/demo/demo-schema/src/main/resources/microservices/pojo/smartcare.yaml
@@ -21,7 +21,8 @@ swagger: '2.0'
 info:
   title: smartcare test
   version: 1.0.0
-  x-java-interface: org.apache.servicecomb.demo.smartcare.SmartCare
+# x-java-interface is optional, remove it should works well, but sometimes 
need to generate more class in memory
+#  x-java-interface: org.apache.servicecomb.demo.smartcare.SmartCare
 
 # the domain of the service
 #host: api.uber.com


 


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


> x-java-interface change from require to optional
> 
>
> Key: SCB-531
> URL: https://issues.apache.org/jira/browse/SCB-531
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-579) NullPointerException is thrown when consumer upload null

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479926#comment-16479926
 ] 

ASF GitHub Bot commented on SCB-579:


WillemJiang commented on issue #714: [SCB-579] fix NullPointerException when 
consumer upload null file
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/714#issuecomment-390052022
 
 
   Not sure if the file name is null is common use case. If it is not, we'd 
better to use Info to tell the system operator there is something is abnormal. 


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


> NullPointerException is thrown when consumer upload null
> 
>
> Key: SCB-579
> URL: https://issues.apache.org/jira/browse/SCB-579
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> When consumer upload null file, there is a NullPointerException
> {quote}
> Caused by: java.lang.NullPointerException
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFile(RestClientRequestImpl.java:172)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFiles(RestClientRequestImpl.java:157)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.doEndWithUpload(RestClientRequestImpl.java:109)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.end(RestClientRequestImpl.java:94)
> at 
> org.apache.servicecomb.transport.rest.client.http.VertxHttpMethod.lambda$doMethod$1(VertxHttpMethod.java:101)
> ... 7 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-587) Fix archetypes readme

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479918#comment-16479918
 ] 

ASF GitHub Bot commented on SCB-587:


WillemJiang commented on a change in pull request #709: [SCB-587] Fix 
archetypes readme
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/709#discussion_r189133984
 
 

 ##
 File path: archetypes/README.md
 ##
 @@ -46,6 +46,7 @@ mvn archetype:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes -Dar
 In console Interactive mode, input your GroupId, ArtifactId and Version of new 
project(module), after a while the new project will be generated.
 
 *Notice: We will publish these archetypes to maven center repository since 
1.0.0-m2, if you would like to use an archetype from an unreleased version : *
+
 ```bash
-mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=${archetype-version} 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=1.0.0-m2-SNAPSHOT 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
 
 Review comment:
   In the release version we do need to specify the archetypeRepository. 
   I think it's better explain -DarchetypeXXX options to avoid making user 
confused.


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


> Fix archetypes readme
> -
>
> Key: SCB-587
> URL: https://issues.apache.org/jira/browse/SCB-587
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In archetype readme.md,generate from SNAPSHOT repo command is :
> mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=${archetype-version} 
> -DarchetypeRepository=[https://repository.apache.org/content/groups/snapshots-group]
>  
> if version of archetype plugin  is 3.0+, archetypeRepository had 
> deleted,[https://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html]
> We need replace it with :
> mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
> -DarchetypeGroupId=org.apache.servicecomb.archetypes 
> -DarchetypeArtifactId=business-service-jaxrs-archetype 
> -DarchetypeVersion=1.0.0-m2-SNAPSHOT 
> -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-582) Provide a way to protection for instance removal

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479907#comment-16479907
 ] 

ASF GitHub Bot commented on SCB-582:


WillemJiang commented on a change in pull request #704: [SCB-582]Provide a way 
to protect instance removal
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/704#discussion_r189133149
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -169,6 +166,28 @@ private void setInstances(List 
pulledInstances, String rev
 }
   }
 
+  private List mergeInstances(List 
pulledInstances,
+  List inUseInstances) {
+List upInstances = pulledInstances
+.stream()
+.filter(instance -> {
+  return MicroserviceInstanceStatus.UP.equals(instance.getStatus());
+})
+.collect(Collectors.toList());
+if (upInstances.isEmpty() && inUseInstances != null && 
ServiceRegistryConfig.INSTANCE.isEmptyInstanceProtectionEnabled()) {
+  MicroserviceInstancePing ping = 
SPIServiceUtils.getPriorityHighestService(MicroserviceInstancePing.class);
+  inUseInstances.stream()
+  .forEach(instance -> {
+if (!upInstances.contains(instance)) {
+  if (ping.ping(instance)) {
 
 Review comment:
   As the ping method could take some time. It could take a while if there are 
lots of upInstances need to be merged.


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


> Provide a way to protection for instance removal
> 
>
> Key: SCB-582
> URL: https://issues.apache.org/jira/browse/SCB-582
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: liubao
>Assignee: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In some applications, each microservice have fixed instances and rarely 
> change. But for some reason, heartbeat to service center is not stable. In 
> this scenario, instances will get lost and result in invocation failure. 
>  
> To deal with this problem, we need to provide a way to protect instance 
> removal. That's when there is instance removal, we first check(ping)the 
> instance to see if it is reachable. If it's reachable, we don't remove it. 
>  
> Since this protection is not fit for docker applications or scenarios where 
> instances are constantly removed and added, and resources(hosts ,ip, port) 
> are reused, this feature is an optional feature and users can open it when 
> necessary. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-582) Provide a way to protection for instance removal

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479902#comment-16479902
 ] 

ASF GitHub Bot commented on SCB-582:


WillemJiang commented on a change in pull request #704: [SCB-582]Provide a way 
to protect instance removal
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/704#discussion_r189132762
 
 

 ##
 File path: demo/demo-pojo/pojo-client/src/main/resources/microservice.yaml
 ##
 @@ -23,6 +23,12 @@ servicecomb:
   service:
 registry:
   address: http://127.0.0.1:30100
+  instance:
+healthCheck:
+  interval: 2
+watch: false
+empty:
 
 Review comment:
   Please update document if there is new option introduced. 
   Is there any other empty related options? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Provide a way to protection for instance removal
> 
>
> Key: SCB-582
> URL: https://issues.apache.org/jira/browse/SCB-582
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: liubao
>Assignee: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> In some applications, each microservice have fixed instances and rarely 
> change. But for some reason, heartbeat to service center is not stable. In 
> this scenario, instances will get lost and result in invocation failure. 
>  
> To deal with this problem, we need to provide a way to protect instance 
> removal. That's when there is instance removal, we first check(ping)the 
> instance to see if it is reachable. If it's reachable, we don't remove it. 
>  
> Since this protection is not fit for docker applications or scenarios where 
> instances are constantly removed and added, and resources(hosts ,ip, port) 
> are reused, this feature is an optional feature and users can open it when 
> necessary. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-589) allow consumer upgrade before producer

2018-05-17 Thread wujimin (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujimin updated SCB-589:

Description: 
1.normal consumer use PrivateMicroserviceClassLoaderFactory, just like edge

2.consumer microserviceMeta will not save in microserviceMetaManager any more, 
just like edge, use appManager

3.protobuf dynamic class created in microservice classloader

4.edge remains task should be finished: 
https://issues.apache.org/jira/browse/SCB-279

5.seems that can delete MicroserviceMetaManager

  was:
1.normal consumer use PrivateMicroserviceClassLoaderFactory, just like edge

2.consumer microserviceMeta will not save in microserviceMetaManager any more, 
just like edge, use appManager

3.protobuf dynamic class created in microservice classloader

4.edge remains task should be finished: 
https://issues.apache.org/jira/browse/SCB-279


> allow consumer upgrade before producer
> --
>
> Key: SCB-589
> URL: https://issues.apache.org/jira/browse/SCB-589
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
>
> 1.normal consumer use PrivateMicroserviceClassLoaderFactory, just like edge
> 2.consumer microserviceMeta will not save in microserviceMetaManager any 
> more, just like edge, use appManager
> 3.protobuf dynamic class created in microservice classloader
> 4.edge remains task should be finished: 
> https://issues.apache.org/jira/browse/SCB-279
> 5.seems that can delete MicroserviceMetaManager



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-579) NullPointerException is thrown when consumer upload null

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479397#comment-16479397
 ] 

ASF GitHub Bot commented on SCB-579:


coveralls commented on issue #714: [SCB-579] fix NullPointerException when 
consumer upload null file
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/714#issuecomment-389939918
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17037680/badge)](https://coveralls.io/builds/17037680)
   
   Coverage decreased (-0.03%) to 87.345% when pulling 
**a93e627a8e56af655508e8503a0b1f87bb52d3df on 
yhs0092:NullPointerException_is_thrown_when_null_file_is_uploaded** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> NullPointerException is thrown when consumer upload null
> 
>
> Key: SCB-579
> URL: https://issues.apache.org/jira/browse/SCB-579
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> When consumer upload null file, there is a NullPointerException
> {quote}
> Caused by: java.lang.NullPointerException
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFile(RestClientRequestImpl.java:172)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFiles(RestClientRequestImpl.java:157)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.doEndWithUpload(RestClientRequestImpl.java:109)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.end(RestClientRequestImpl.java:94)
> at 
> org.apache.servicecomb.transport.rest.client.http.VertxHttpMethod.lambda$doMethod$1(VertxHttpMethod.java:101)
> ... 7 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-579) NullPointerException is thrown when consumer upload null

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479295#comment-16479295
 ] 

ASF GitHub Bot commented on SCB-579:


yhs0092 opened a new pull request #714: [SCB-579] fix NullPointerException when 
consumer upload null file
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/714
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   See details in [SCB-579](https://issues.apache.org/jira/browse/SCB-579)


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


> NullPointerException is thrown when consumer upload null
> 
>
> Key: SCB-579
> URL: https://issues.apache.org/jira/browse/SCB-579
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> When consumer upload null file, there is a NullPointerException
> {quote}
> Caused by: java.lang.NullPointerException
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFile(RestClientRequestImpl.java:172)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.attachFiles(RestClientRequestImpl.java:157)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.doEndWithUpload(RestClientRequestImpl.java:109)
> at 
> org.apache.servicecomb.common.rest.codec.param.RestClientRequestImpl.end(RestClientRequestImpl.java:94)
> at 
> org.apache.servicecomb.transport.rest.client.http.VertxHttpMethod.lambda$doMethod$1(VertxHttpMethod.java:101)
> ... 7 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479240#comment-16479240
 ] 

ASF GitHub Bot commented on SCB-591:


coveralls commented on issue #713:  [SCB-591] configcenter need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#issuecomment-389913479
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17035942/badge)](https://coveralls.io/builds/17035942)
   
   Coverage decreased (-0.03%) to 87.341% when pulling 
**80021490e0d50da40dff26702275cf1a4c964e63 on weichao666:configencoding** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479111#comment-16479111
 ] 

ASF GitHub Bot commented on SCB-548:


wujimin commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188971043
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+

[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479107#comment-16479107
 ] 

ASF GitHub Bot commented on SCB-591:


wujimin commented on a change in pull request #713:  [SCB-591] configcenter 
need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#discussion_r188969749
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -329,8 +329,14 @@ private void sendHeartbeat(WebSocket ws) {
 
 public void refreshConfig(String configcenter, boolean wait) {
   CountDownLatch latch = new CountDownLatch(1);
+  String encodeServiceName = "";
+  try {
+encodeServiceName = URLEncoder.encode(serviceName, "UTF-8");
+  } catch (UnsupportedEncodingException e1) {
+e1.printStackTrace();
+  }
+  String path = URIConst.ITEMS + "?dimensionsInfo=" + 
StringUtils.deleteWhitespace(encodeServiceName);
 
 Review comment:
   delete whitespace before or after encode?


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479106#comment-16479106
 ] 

ASF GitHub Bot commented on SCB-591:


wujimin commented on a change in pull request #713:  [SCB-591] configcenter 
need to do encode
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/713#discussion_r188969579
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -329,8 +329,14 @@ private void sendHeartbeat(WebSocket ws) {
 
 public void refreshConfig(String configcenter, boolean wait) {
   CountDownLatch latch = new CountDownLatch(1);
+  String encodeServiceName = "";
+  try {
+encodeServiceName = URLEncoder.encode(serviceName, "UTF-8");
+  } catch (UnsupportedEncodingException e1) {
+e1.printStackTrace();
 
 Review comment:
   print?


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-590) Update the validator version to latest(6.0.2)

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479102#comment-16479102
 ] 

ASF GitHub Bot commented on SCB-590:


wujimin commented on a change in pull request #712: [SCB-590] Update the 
validator version
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/712#discussion_r188968905
 
 

 ##
 File path: java-chassis-dependencies/pom.xml
 ##
 @@ -324,7 +324,7 @@
   
 org.hibernate
 hibernate-validator-annotation-processor
-5.2.2.Final
+6.0.2.Final
 
 Review comment:
   license file need to be updated too.


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


> Update the validator version to latest(6.0.2)
> -
>
> Key: SCB-590
> URL: https://issues.apache.org/jira/browse/SCB-590
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: sukesh
>Assignee: sukesh
>Priority: Minor
> Fix For: java-chassis-1.0.0-m2
>
>
> Update the validator and its dependent versions to latest



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479088#comment-16479088
 ] 

ASF GitHub Bot commented on SCB-591:


weichao666 opened a new pull request #713:  [SCB-591] configcenter need to do 
encode
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/713
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   huawei's huangyun set up an agent to modify the special characters '#',which 
led to the governance inoperative


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


> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-591) configcenter need to do encode

2018-05-17 Thread WeiChao (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479065#comment-16479065
 ] 

WeiChao commented on SCB-591:
-

huawei's huangyun set up an agent to modify the special characters '#',which 
led to the governance inoperative

> configcenter need to do encode
> --
>
> Key: SCB-591
> URL: https://issues.apache.org/jira/browse/SCB-591
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-591) configcenter need to do encode

2018-05-17 Thread WeiChao (JIRA)
WeiChao created SCB-591:
---

 Summary: configcenter need to do encode
 Key: SCB-591
 URL: https://issues.apache.org/jira/browse/SCB-591
 Project: Apache ServiceComb
  Issue Type: Bug
  Components: Java-Chassis
Reporter: WeiChao
Assignee: WeiChao






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (SCB-562) Java Chassis will throw NPE when producer impl do not contain any method

2018-05-17 Thread yangyongzheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yangyongzheng reassigned SCB-562:
-

Assignee: yangyongzheng

> Java Chassis will throw NPE when producer impl do not contain any method
> 
>
> Key: SCB-562
> URL: https://issues.apache.org/jira/browse/SCB-562
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> If a producer impl do not contain any method like :
> ```java
> @RestSchema(schemaId = "hello")
> @Path("/")
> public class HelloImpl {
> }
> ```
> Then an NPE will throw  when startup:
> 2018-05-09 08:50:04,333 [ERROR] cse init failed, 
> Exception: java.lang.NullPointerException; null
> java.lang.NullPointerException
>   at 
> org.apache.servicecomb.swagger.generator.core.utils.ClassUtils.createInterface(ClassUtils.java:212)
>   at 
> org.apache.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateInterface(ClassUtils.java:203)
>   at 
> org.apache.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateInterface(ClassUtils.java:182)
>   at 
> org.apache.servicecomb.core.definition.schema.AbstractSchemaFactory.generateSwagger(AbstractSchemaFactory.java:112)
>   at 
> org.apache.servicecomb.core.definition.schema.ProducerSchemaFactory.createSchema(ProducerSchemaFactory.java:110)
>   at 
> org.apache.servicecomb.core.definition.schema.ProducerSchemaFactory.createSchema(ProducerSchemaFactory.java:47)
>   at 
> org.apache.servicecomb.core.definition.schema.AbstractSchemaFactory.getOrCreateSchema(AbstractSchemaFactory.java:65)
>   at 
> org.apache.servicecomb.core.definition.schema.ProducerSchemaFactory.getOrCreateProducerSchema(ProducerSchemaFactory.java:80)
>   at 
> org.apache.servicecomb.provider.rest.common.RestProducerProvider.init(RestProducerProvider.java:48)
>   at 
> org.apache.servicecomb.core.provider.producer.ProducerProviderManager.init(ProducerProviderManager.java:45)
>   at 
> org.apache.servicecomb.core.CseApplicationListener.onApplicationEvent(CseApplicationListener.java:118)
>   at 
> org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
>   at 
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
>   at 
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
>   at 
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:337)
>   at 
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
>   at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)
>   at 
> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
>   at 
> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
>   at 
> org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:37)
>   at 
> org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:33)
>   at io.demo.Application.main(Application.java:40)
>  
> org.apache.servicecomb.core.CseApplicationListener.onApplicationEvent(CseApplicationListener.java:145)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-590) Update the validator version to latest(6.0.2)

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478883#comment-16478883
 ] 

ASF GitHub Bot commented on SCB-590:


coveralls commented on issue #712: [SCB-590] Update the validator version
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/712#issuecomment-389825400
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17030256/badge)](https://coveralls.io/builds/17030256)
   
   Coverage decreased (-0.02%) to 87.349% when pulling 
**46190f73132889063cc8ed8e8b129018ff5e1bf9 on acsukesh:master** into 
**61cda009b7ac8539364bd0f1d1855d804ea4dd27 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


> Update the validator version to latest(6.0.2)
> -
>
> Key: SCB-590
> URL: https://issues.apache.org/jira/browse/SCB-590
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: sukesh
>Assignee: sukesh
>Priority: Minor
> Fix For: java-chassis-1.0.0-m2
>
>
> Update the validator and its dependent versions to latest



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-590) Update the validator version to latest(6.0.2)

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478836#comment-16478836
 ] 

ASF GitHub Bot commented on SCB-590:


acsukesh opened a new pull request #712: [SCB-590] Update the validator version
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/712
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Update the validator version to latest(6.0.2)
> -
>
> Key: SCB-590
> URL: https://issues.apache.org/jira/browse/SCB-590
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: sukesh
>Assignee: sukesh
>Priority: Minor
> Fix For: java-chassis-1.0.0-m2
>
>
> Update the validator and its dependent versions to latest



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-584) DubboConsumerFilterTest fails on linux

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478764#comment-16478764
 ] 

ASF GitHub Bot commented on SCB-584:


WillemJiang closed pull request #192: [SCB-584] Clear up testing code for Dubbo 
filter tests
URL: https://github.com/apache/incubator-servicecomb-saga/pull/192
 
 
   

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/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboConsumerFilterTest.java
 
b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboConsumerFilterTest.java
index e601edac..cae2dcec 100644
--- 
a/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboConsumerFilterTest.java
+++ 
b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboConsumerFilterTest.java
@@ -17,7 +17,6 @@
 
 import com.alibaba.dubbo.config.spring.extension.SpringExtensionFactory;
 import com.alibaba.dubbo.rpc.Invocation;
-import org.apache.servicecomb.saga.omega.context.IdGenerator;
 import org.apache.servicecomb.saga.omega.context.OmegaContext;
 import 
org.apache.servicecomb.saga.omega.transport.dubbo.SagaDubboConsumerFilter;
 import org.junit.After;
@@ -38,8 +37,6 @@
 
   private static final String globalTxId = UUID.randomUUID().toString();
   private static final String localTxId = UUID.randomUUID().toString();
-  @SuppressWarnings("unchecked")
-  private final IdGenerator idGenerator = mock(IdGenerator.class);
 
   private final OmegaContext omegaContext = new OmegaContext(() -> "ignored");
   private final Invocation invocation = mock(Invocation.class);
@@ -48,7 +45,7 @@
 
   @Before
   public void setUp() {
-when(idGenerator.nextId()).thenReturn(globalTxId, localTxId);
+omegaContext.clear();
 when(applicationContext.containsBean("omegaContext")).thenReturn(true);
 when(applicationContext.getBean("omegaContext")).thenReturn(omegaContext);
 SpringExtensionFactory.addApplicationContext(applicationContext);
diff --git 
a/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
 
b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
index 0a5f576a..1b953390 100644
--- 
a/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
+++ 
b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
@@ -45,7 +45,6 @@
   @Before
   public void setUp() {
 omegaContext.clear();
-ApplicationContext applicationContext = mock(ApplicationContext.class);
 when(applicationContext.containsBean("omegaContext")).thenReturn(true);
 when(applicationContext.getBean("omegaContext")).thenReturn(omegaContext);
 SpringExtensionFactory.addApplicationContext(applicationContext);


 


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


> DubboConsumerFilterTest fails on linux
> --
>
> Key: SCB-584
> URL: https://issues.apache.org/jira/browse/SCB-584
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Saga
>Affects Versions: saga-0.2.0
> Environment: ybo@yangbo:~/repos/incubator-servicecomb-saga$ mvn -v
> Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
> 2017-10-18T15:58:13+08:00)
> Maven home: /opt/maven
> Java version: 1.8.0_151, vendor: Oracle Corporation
> Java home: /opt/jdk1.8.0_151/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.4.0-104-generic", arch: "amd64", family: "unix"
>Reporter: Yang Bo
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> The DubboConsumerFilterTest fails with the following error:
> ---
>  T E S T S
> ---
> Running SagaDubboProviderFilterTest
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.518 sec - 
> in SagaDubboProviderFilterTest
> Running SagaDubboConsumerFilterTest
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec <<< 
> FAILURE! - in SagaDubboConsumerFilterTest
> interceptTransactionIdInHeaderIfContextPresent(SagaDubboConsumerFilterTest) 
> Time elapsed: 0.005 sec <<< FAILURE!
> java.lang.AssertionError:
> Expected: is "cf4a9f4a-b9e5-43f5-a7d9-837fa96ee4c0"
>  but: was "3ef495de-2f2a-4afa-b991-237cd8de7e1e"
>  at 
> 

[jira] [Resolved] (SCB-242) [pack] omega strong consistent support

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-242.
--
   Resolution: Won't Fix
Fix Version/s: (was: saga-0.2.0)

> [pack] omega strong consistent support
> --
>
> Key: SCB-242
> URL: https://issues.apache.org/jira/browse/SCB-242
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Eric Lee
>Priority: Minor
>
> as a user, I want to auto compensate my transaction when it fails without 
> hard coded compensated method.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-242) [pack] omega strong consistent support

2018-05-17 Thread Willem Jiang (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478729#comment-16478729
 ] 

Willem Jiang commented on SCB-242:
--

It's impossible to compensate the transaction without knowing the compensate 
method.

> [pack] omega strong consistent support
> --
>
> Key: SCB-242
> URL: https://issues.apache.org/jira/browse/SCB-242
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Eric Lee
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> as a user, I want to auto compensate my transaction when it fails without 
> hard coded compensated method.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-571) Decouple OmegaContext in the Application

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-571.
--
Resolution: Fixed

Merged the PR into master branch.

> Decouple OmegaContext in the Application
> 
>
> Key: SCB-571
> URL: https://issues.apache.org/jira/browse/SCB-571
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Major
> Fix For: saga-0.2.0
>
>
> In Current Demo Application, if we remove the \@EnableOmega, the application 
> should start without any issue.
> OmegaContext should be optional, if the user doesn't enableOmega, the context 
> should be invisible to the application. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (SCB-571) Decouple OmegaContext in the Application

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned SCB-571:


Assignee: Willem Jiang

> Decouple OmegaContext in the Application
> 
>
> Key: SCB-571
> URL: https://issues.apache.org/jira/browse/SCB-571
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Major
> Fix For: saga-0.2.0
>
>
> In Current Demo Application, if we remove the \@EnableOmega, the application 
> should start without any issue.
> OmegaContext should be optional, if the user doesn't enableOmega, the context 
> should be invisible to the application. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478714#comment-16478714
 ] 

ASF GitHub Bot commented on SCB-393:


little-cui closed pull request #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/352
 
 
   

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/integration/instances_test.go b/integration/instances_test.go
index 948c9f62..50043210 100644
--- a/integration/instances_test.go
+++ b/integration/instances_test.go
@@ -168,6 +168,7 @@ var _ = Describe("MicroService Api Test", func() {
"times":2,
}
instance := map[string]interface{}{
+   "instanceId":  serviceInstanceID,
"endpoints":   endpoints,
"hostName":"cse",
"status":  "UP",
diff --git a/pkg/util/backoff.go b/pkg/util/backoff.go
new file mode 100644
index ..7f96cfd0
--- /dev/null
+++ b/pkg/util/backoff.go
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package util
+
+import (
+   "math"
+   "time"
+)
+
+var DefaultBackoff Backoff = {
+   MaxDelay:  30 * time.Second,
+   InitDelay: 1 * time.Second,
+   Factor:1.6,
+}
+
+type Backoff interface {
+   Delay(retries int) time.Duration
+}
+
+// delay = min(MaxDelay, InitDelay * power(Factor, retries))
+type PowerBackoff struct {
+   MaxDelay  time.Duration
+   InitDelay time.Duration
+   Factorfloat64
+}
+
+func (pb *PowerBackoff) Delay(retries int) time.Duration {
+   if retries <= 0 {
+   return pb.InitDelay
+   }
+
+   return time.Duration(math.Min(float64(pb.MaxDelay), 
float64(pb.InitDelay)*math.Pow(pb.Factor, float64(retries
+}
+
+func GetBackoff() Backoff {
+   return DefaultBackoff
+}
diff --git a/pkg/util/backoff_test.go b/pkg/util/backoff_test.go
new file mode 100644
index ..301a914f
--- /dev/null
+++ b/pkg/util/backoff_test.go
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package util
+
+import (
+   "testing"
+   "time"
+)
+
+func TestPowerBackoff_Delay(t *testing.T) {
+   i, m := time.Second, 30*time.Second
+   b := {
+   MaxDelay:  30 * time.Second,
+   InitDelay: 1 * time.Second,
+   Factor:1.6,
+   }
+   r := b.Delay(-1)
+   if r != i {
+   t.Fatalf("TestPowerBackoff_Delay -1 failed, result is %s", r)
+   }
+   r = b.Delay(0)
+   if r != i {
+   t.Fatalf("TestPowerBackoff_Delay 0 failed, result is %s", r)
+   }
+   r = b.Delay(1)
+   if r != 1600*time.Millisecond {
+   t.Fatalf("TestPowerBackoff_Delay 1 failed, result is %s", r)
+   }
+   r = b.Delay(4)
+   if r != 6553600*time.Microsecond {
+   t.Fatalf("TestPowerBackoff_Delay 4 failed, result is %s", r)
+   }
+   r = b.Delay(8)
+   if r != m {

[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478713#comment-16478713
 ] 

ASF GitHub Bot commented on SCB-393:


codecov-io commented on issue #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/352#issuecomment-389732060
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=h1)
 Report
   > Merging 
[#352](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/3618245c56360a24df606a7daf78586ac006dca3?src=pr=desc)
 will **decrease** coverage by `0.24%`.
   > The diff coverage is `97.43%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/graphs/tree.svg?width=650=pr=GAaF7zrg8R=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #352  +/-   ##
   ==
   - Coverage   69.88%   69.64%   -0.25% 
   ==
 Files  18   18  
 Lines3420 3406  -14 
   ==
   - Hits 2390 2372  -18 
   - Misses865  868   +3 
   - Partials  165  166   +1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | `68.58% <ø> (-2.56%)` | :arrow_down: |
   | 
[server/service/util/heartbeat\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9oZWFydGJlYXRfdXRpbC5nbw==)
 | `80% <100%> (ø)` | :arrow_up: |
   | 
[server/service/microservices.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvbWljcm9zZXJ2aWNlcy5nbw==)
 | `74.55% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/tag\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC90YWdfdXRpbC5nbw==)
 | `65.51% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `56.37% <100%> (ø)` | :arrow_up: |
   | 
[server/service/schema.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hLmdv)
 | `75% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/microservice\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9taWNyb3NlcnZpY2VfdXRpbC5nbw==)
 | `74.84% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/domain\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kb21haW5fdXRpbC5nbw==)
 | `71.64% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/schema\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9zY2hlbWFfdXRpbC5nbw==)
 | `87.5% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/rule\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9ydWxlX3V0aWwuZ28=)
 | `67.5% <100%> (ø)` | :arrow_up: |
   | ... and [2 
more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?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/incubator-servicecomb-service-center/pull/352?src=pr=footer).
 Last update 
[3618245...c7f9bad](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?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 

[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478712#comment-16478712
 ] 

ASF GitHub Bot commented on SCB-393:


coveralls commented on issue #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/352#issuecomment-389720468
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17027776/badge)](https://coveralls.io/builds/17027776)
   
   Coverage decreased (-0.2%) to 73.206% when pulling 
**c7f9baded846f164d8a789d16d76b024b17ba4a9 on little-cui:master** into 
**3618245c56360a24df606a7daf78586ac006dca3 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


> Retry to request etcd too frequently when fail
> --
>
> Key: SCB-393
> URL: https://issues.apache.org/jira/browse/SCB-393
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-290) As a developer, I want to use standard http charset mechanism, not always utf-8

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang updated SCB-290:
-
Description: 
Search the "UTF-8" could be good start for it. 
We need to check the charset setting from the content-type, to decide the 
encoding.

  was:
currently http request and response all hard code to use utf-8

should follow standard http charset mechanism, not hard code to utf-8, only 
default to utf-8


> As a developer, I  want to use standard http charset mechanism, not always 
> utf-8
> 
>
> Key: SCB-290
> URL: https://issues.apache.org/jira/browse/SCB-290
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: wujimin
>Priority: Major
>  Labels: newbie
> Fix For: java-chassis-1.0.0-m2
>
>
> Search the "UTF-8" could be good start for it. 
> We need to check the charset setting from the content-type, to decide the 
> encoding.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-425) Add an easier way to read configurations

2018-05-17 Thread Willem Jiang (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478706#comment-16478706
 ] 

Willem Jiang commented on SCB-425:
--

[~liubao68] Any update for this issue? 

> Add an easier way to read configurations
> 
>
> Key: SCB-425
> URL: https://issues.apache.org/jira/browse/SCB-425
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: liubao
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> Background:
> Read configurations for microservice or operation is quite common in code, 
> e.g.
> {code:java}
> config = CONSUMER_FAULTINJECTION + serviceName + ".schemas." + schema + "."
> + CONSUMER_FAULTINJECTION_POLICY_PROTOCOLS + 
> invocation.getTransport().getName() + "." + key;
> value = getConfigValue(config);
> if ((value != FAULT_INJECTION_DEFAULT_VALUE)) {
> return value;
> }
> config = CONSUMER_FAULTINJECTION + serviceName + "." + 
> CONSUMER_FAULTINJECTION_POLICY_PROTOCOLS
> + invocation.getTransport().getName() + "." + key;
> value = getConfigValue(config);
> if ((value != FAULT_INJECTION_DEFAULT_VALUE)) {
> return value;
> }
> config = CONSUMER_FAULTINJECTION_GLOBAL + 
> CONSUMER_FAULTINJECTION_POLICY_PROTOCOLS
> + invocation.getTransport().getName() + "." + key;
> {code}
> This code is very long and add callbacks if hard for user code. 
>  
> Suggestions:
> We need a easier way to read configurations, code snippets: 
> {code:java}
> @Configuration(name="cse.myconfiguration")
> class MyConfiguration
> {
>@Configuration(name="prop1")
>String prop1;
>@Configuration(name="prop2")
>String prop2;
> }
> MyConfiguration configuration = 
> ConfigurationFactory.getReference(invocation.getQualifiedMicroserviceName()){code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478701#comment-16478701
 ] 

ASF GitHub Bot commented on SCB-548:


coveralls commented on issue #693: [SCB-548] support gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-387664923
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17027610/badge)](https://coveralls.io/builds/17027610)
   
   Coverage increased (+0.2%) to 87.551% when pulling 
**344fe80816e68dc0ff643e5f994afc313556957e on zhengyangyong:SCB-548** into 
**5c29a7cd224e788cb357e8c640a5f3473ceb0209 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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478692#comment-16478692
 ] 

ASF GitHub Bot commented on SCB-393:


coveralls commented on issue #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/352#issuecomment-389720468
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17027521/badge)](https://coveralls.io/builds/17027521)
   
   Coverage increased (+0.01%) to 73.376% when pulling 
**d6a2e50d9dd37ab3afb7b771286f115a1aa24c9b on little-cui:master** into 
**3618245c56360a24df606a7daf78586ac006dca3 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


> Retry to request etcd too frequently when fail
> --
>
> Key: SCB-393
> URL: https://issues.apache.org/jira/browse/SCB-393
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478652#comment-16478652
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on issue #693: [SCB-548] support gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-389770794
 
 
   Failed by apollo it , [ERROR] Failed to execute goal 
io.fabric8:docker-maven-plugin:0.20.0:start (start) on project 
dynamic-config-tests: Execution start of goal 
io.fabric8:docker-maven-plugin:0.20.0:start failed: Start-Job failed with 
unexpected exception: [nobodyiam/apollo-quick-start] 
"apollo.servicecomb.apache.org": Timeout after 120162 ms while waiting on log 
out 'Portal started' and on tcp port '[/172.17.0.3:8080, /172.17.0.3:8070]' 
-> [Help 1] Reopen 


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SCB-290) As a developer, I want to use standard http charset mechanism, not always utf-8

2018-05-17 Thread wujimin (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujimin updated SCB-290:

Description: 
currently http request and response all hard code to use utf-8

should follow standard http charset mechanism, not hard code to utf-8, only 
default to utf-8

> As a developer, I  want to use standard http charset mechanism, not always 
> utf-8
> 
>
> Key: SCB-290
> URL: https://issues.apache.org/jira/browse/SCB-290
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: wujimin
>Priority: Major
>  Labels: newbie
> Fix For: java-chassis-1.0.0-m2
>
>
> currently http request and response all hard code to use utf-8
> should follow standard http charset mechanism, not hard code to utf-8, only 
> default to utf-8



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-583) Upgrade Spring Boot version to 1.5.13.Release and 2.0.2.Release

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-583.
--
Resolution: Fixed

Merge the PR into master branch.

> Upgrade Spring Boot version to 1.5.13.Release and 2.0.2.Release
> ---
>
> Key: SCB-583
> URL: https://issues.apache.org/jira/browse/SCB-583
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> As the new Spring Boot 2 version is out , it's time to upgrade to 
> 2.0.2.Release.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (SCB-555) Add Saga Dubbo demo to show how to manage the transactions with Dubbo

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned SCB-555:


Assignee: wuzunqian

> Add Saga Dubbo demo to show how to manage the transactions with Dubbo
> -
>
> Key: SCB-555
> URL: https://issues.apache.org/jira/browse/SCB-555
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Saga
>Reporter: Willem Jiang
>Assignee: wuzunqian
>Priority: Major
> Fix For: saga-0.2.0
>
>
> As we already have Omega transport for Dubbo, it make sense that we add Dubbo 
> demo for it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-583) Upgrade Spring Boot version to 1.5.13.Release and 2.0.2.Release

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478608#comment-16478608
 ] 

ASF GitHub Bot commented on SCB-583:


WillemJiang closed pull request #191: SCB-583 update the spring boot version
URL: https://github.com/apache/incubator-servicecomb-saga/pull/191
 
 
   


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


> Upgrade Spring Boot version to 1.5.13.Release and 2.0.2.Release
> ---
>
> Key: SCB-583
> URL: https://issues.apache.org/jira/browse/SCB-583
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> As the new Spring Boot 2 version is out , it's time to upgrade to 
> 2.0.2.Release.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-452) Write java doc for some class

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-452.
--
Resolution: Fixed

The PR was merged into master branch with thanks to Daniel.

> Write java doc for some class
> -
>
> Key: SCB-452
> URL: https://issues.apache.org/jira/browse/SCB-452
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Daniel Qian
>Assignee: Daniel Qian
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> Write java doc for 
> # alpha-core TxEventRepository
> # omega-context SagaStart
> # omega-context Compensable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (SCB-452) Write java doc for some class

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned SCB-452:


Assignee: Daniel Qian  (was: Willem Jiang)

> Write java doc for some class
> -
>
> Key: SCB-452
> URL: https://issues.apache.org/jira/browse/SCB-452
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Daniel Qian
>Assignee: Daniel Qian
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> Write java doc for 
> # alpha-core TxEventRepository
> # omega-context SagaStart
> # omega-context Compensable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478599#comment-16478599
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188849118
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+  

[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478598#comment-16478598
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188849100
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+  

[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478597#comment-16478597
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188849091
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBStatus.java
 ##
 @@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.core;
+
+//DOWN -> STARTING -> UP -> STOPPING -> DOWN
+public enum SCBStatus {
+  //Chassis is Down
+  DOWN,
+  //Chassis is Starting (progressing)
+  STARTING,
+  //Chassis is Running
+  UP,
+  //Chassis is Stopping (progressing)
+  STOPPING,
+  //Chassis Init Failed
+  FAILED
 
 Review comment:
   Done,set to DOWN because no exception will be throw


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478592#comment-16478592
 ] 

ASF GitHub Bot commented on SCB-548:


wujimin commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188847998
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBStatus.java
 ##
 @@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.core;
+
+//DOWN -> STARTING -> UP -> STOPPING -> DOWN
+public enum SCBStatus {
+  //Chassis is Down
+  DOWN,
+  //Chassis is Starting (progressing)
+  STARTING,
+  //Chassis is Running
+  UP,
+  //Chassis is Stopping (progressing)
+  STOPPING,
+  //Chassis Init Failed
+  FAILED
 
 Review comment:
   currently,  we will only init and uninit only one time
   but i remember your UT will do this multi times?


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478584#comment-16478584
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188847443
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBEngine.java
 ##
 @@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.core;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.servicecomb.core.BootListener.BootEvent;
+import org.apache.servicecomb.core.BootListener.EventType;
+import org.apache.servicecomb.core.definition.loader.SchemaListenerManager;
+import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.core.handler.HandlerConfigUtils;
+import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager;
+import org.apache.servicecomb.core.provider.producer.ProducerProviderManager;
+import org.apache.servicecomb.core.transport.TransportManager;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.StringUtils;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+// TODO: should not depend on spring, that will make integration more flexible
+public class SCBEngine {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(SCBEngine.class);
+
+  private ProducerProviderManager producerProviderManager;
+
+  private ConsumerProviderManager consumerProviderManager;
+
+  private TransportManager transportManager;
+
+  private SchemaListenerManager schemaListenerManager;
+
+  private Collection bootListenerList;
+
+  private final AtomicLong invocationStartedCounter = new AtomicLong();
+
+  private final AtomicLong invocationFinishedCounter = new AtomicLong();
+
+  private volatile SCBStatus status = SCBStatus.DOWN;
+
+  public void setStatus(SCBStatus status) {
+this.status = status;
+  }
+
+  public SCBStatus getStatus() {
+return status;
+  }
+
+  private EventBus eventBus = EventManager.getEventBus();
+
+  private static final SCBEngine INSTANCE = new SCBEngine();
+
+  public static SCBEngine getInstance() {
+return INSTANCE;
+  }
+
+  public void setProducerProviderManager(
+  ProducerProviderManager producerProviderManager) {
+this.producerProviderManager = producerProviderManager;
+  }
+
+  public void setConsumerProviderManager(
+  ConsumerProviderManager consumerProviderManager) {
+this.consumerProviderManager = consumerProviderManager;
+  }
+
+  public TransportManager getTransportManager() {
+return transportManager;
+  }
+
+  public void setTransportManager(TransportManager transportManager) {
+this.transportManager = transportManager;
+  }
+
+  public void setSchemaListenerManager(
+  SchemaListenerManager schemaListenerManager) {
+this.schemaListenerManager = schemaListenerManager;
+  }
+
+  public Collection getBootListenerList() {
+return bootListenerList;
+  }
+
+  public void setBootListenerList(Collection bootListenerList) {
+this.bootListenerList = bootListenerList;
+  }
+
+  protected void triggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+event.setEventType(eventType);
+
+for (BootListener listener : bootListenerList) {
+  listener.onBootEvent(event);
+}
+  }
+
+  protected void safeTriggerEvent(EventType eventType) {
+BootEvent event = new BootEvent();
+  

[jira] [Commented] (SCB-548) Support Gracefully Shutdown

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478575#comment-16478575
 ] 

ASF GitHub Bot commented on SCB-548:


zhengyangyong commented on a change in pull request #693: [SCB-548] support 
gracefully shutdown
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#discussion_r188847406
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/SCBStatus.java
 ##
 @@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.core;
+
+//DOWN -> STARTING -> UP -> STOPPING -> DOWN
+public enum SCBStatus {
+  //Chassis is Down
+  DOWN,
+  //Chassis is Starting (progressing)
+  STARTING,
+  //Chassis is Running
+  UP,
+  //Chassis is Stopping (progressing)
+  STOPPING,
+  //Chassis Init Failed
+  FAILED
 
 Review comment:
   I don't know if uninit failed, can enable init again ,so I think we may 
better set to FAILED ?


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


> Support Gracefully Shutdown
> ---
>
> Key: SCB-548
> URL: https://issues.apache.org/jira/browse/SCB-548
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m2
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> We did not implement gracefully shutdown yet: 
> ```java
>   // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效
>   // 1. 去注册实例信息
>   // TODO 服务优雅退出
>   if (applicationContext instanceof AbstractApplicationContext) {
> ((AbstractApplicationContext) 
> applicationContext).registerShutdownHook();
>   }
> ```
>  
>   And had got an issue : 
> https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from 
> user.
>   So it's time we must do it and remove this TODO



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478574#comment-16478574
 ] 

ASF GitHub Bot commented on SCB-393:


codecov-io commented on issue #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/352#issuecomment-389732060
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=h1)
 Report
   > Merging 
[#352](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/3618245c56360a24df606a7daf78586ac006dca3?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `97.43%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/graphs/tree.svg?width=650=pr=GAaF7zrg8R=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #352  +/-   ##
   ==
   + Coverage   69.88%   69.91%   +0.02% 
   ==
 Files  18   18  
 Lines3420 3420  
   ==
   + Hits 2390 2391   +1 
 Misses865  865  
   + Partials  165  164   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/schema\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9zY2hlbWFfdXRpbC5nbw==)
 | `87.5% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/domain\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kb21haW5fdXRpbC5nbw==)
 | `71.64% <100%> (ø)` | :arrow_up: |
   | 
[server/service/microservices.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvbWljcm9zZXJ2aWNlcy5nbw==)
 | `74.55% <100%> (ø)` | :arrow_up: |
   | 
[server/service/schema.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hLmdv)
 | `75% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/microservice\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9taWNyb3NlcnZpY2VfdXRpbC5nbw==)
 | `74.84% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `56.37% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/heartbeat\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9oZWFydGJlYXRfdXRpbC5nbw==)
 | `80% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/tag\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC90YWdfdXRpbC5nbw==)
 | `65.51% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/rule\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9ydWxlX3V0aWwuZ28=)
 | `67.5% <100%> (ø)` | :arrow_up: |
   | 
[server/service/util/instance\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9pbnN0YW5jZV91dGlsLmdv)
 | `48.36% <88.88%> (ø)` | :arrow_up: |
   | ... and [1 
more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?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/incubator-servicecomb-service-center/pull/352?src=pr=footer).
 Last update 
[3618245...c8b6f73](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/352?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 

[jira] [Commented] (SCB-393) Retry to request etcd too frequently when fail

2018-05-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478573#comment-16478573
 ] 

ASF GitHub Bot commented on SCB-393:


coveralls commented on issue #352:  SCB-393 Retry to request etcd too 
frequently when fail
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/352#issuecomment-389720468
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17026530/badge)](https://coveralls.io/builds/17026530)
   
   Coverage increased (+0.1%) to 73.468% when pulling 
**c8b6f73ad59a46f2c9246489cfc0a9316648e90f on little-cui:master** into 
**3618245c56360a24df606a7daf78586ac006dca3 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


> Retry to request etcd too frequently when fail
> --
>
> Key: SCB-393
> URL: https://issues.apache.org/jira/browse/SCB-393
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-573) Split the docker-compose file for debugging easily

2018-05-17 Thread Willem Jiang (JIRA)

 [ 
https://issues.apache.org/jira/browse/SCB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved SCB-573.
--
Resolution: Fixed

The PR was merged into master branch.

> Split the docker-compose file for debugging easily
> --
>
> Key: SCB-573
> URL: https://issues.apache.org/jira/browse/SCB-573
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: longchun
>Assignee: longchun
>Priority: Minor
> Fix For: saga-0.2.0
>
>
> currently the docker compose file will start all the services, but when we 
> would like to debug demo services, it is nice to start the alpha server 
> separately.
> saga-demo.sh supporting 2 new arguments:
> up-alpha: starting the alpha server only
> up-demo:starting the 3 demo services
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)