[jira] [Created] (SCB-337) Add a concurrent map impl

2018-02-08 Thread little-cui (JIRA)
little-cui created SCB-337:
--

 Summary: Add a concurrent map impl
 Key: SCB-337
 URL: https://issues.apache.org/jira/browse/SCB-337
 Project: Apache ServiceComb
  Issue Type: Improvement
  Components: Service-Center
Reporter: little-cui
Assignee: little-cui
 Fix For: service-center-1.0.0-m2






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


[jira] [Commented] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-314:


jeho0815 opened a new pull request #553: [SCB-314] Support custom rest 
transport server compress and max heade…
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/553
 
 
   …r size
   
   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).
   
   ---
   


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


> As a SDK user, i want to set the vertx compressd mode on rest transport so 
> that I can use ServiceComb to compresse server date
> --
>
> Key: SCB-314
> URL: https://issues.apache.org/jira/browse/SCB-314
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>  Labels: consumer
>
> vertx can set server compressed mode, some one want to use this feature and 
> set the max header size 



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


[jira] [Commented] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-314:


jeho0815 closed pull request #553: [SCB-314] Support custom rest transport 
server compress and max heade…
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/553
 
 
   

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-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
index f2fc0d77a..b3e0f8579 100644
--- 
a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
+++ 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
@@ -19,6 +19,7 @@
 
 import java.util.HashMap;
 import java.util.Map;
+
 import org.apache.servicecomb.core.CseContext;
 import org.apache.servicecomb.demo.DemoConst;
 import org.apache.servicecomb.demo.TestMgr;
@@ -85,6 +86,17 @@ public static void run() {
 
   testController();
 }
+HttpHeaders headers = new HttpHeaders();
+headers.set("Accept-Encoding", "gzip");
+HttpEntity entity = new HttpEntity<>(headers);
+ResponseEntity entityCompress =
+restTemplate.exchange(prefix
++ "/codeFirstSpringmvc/sayhi/compressed/{name}/v2", 
HttpMethod.GET, entity, String.class, "Test");
+TestMgr.check(
+"Test sayhi compressed:This is a big text,This is a big text,This is a 
big text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text,This is a big text,This is a big text,This is a big 
text,This is a big text!",
+entityCompress.getBody());
+TestMgr.check("gzip", entityCompress.getHeaders().get("content-encoding"));
+TestMgr.check("75", entityCompress.getHeaders().get("content-length"));
 
 //0.5.0 later version metrics integration test
 try {
diff --git 
a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
 
b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
index 103e37e76..5bbd00700 100644
--- 
a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
+++ 
b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
@@ -85,7 +85,7 @@ private String _fileUpload(MultipartFile file1, Part file2) {
   String content1 = IOUtils.toString(is1);
   String content2 = IOUtils.toString(is2);
   return String.format("%s:%s:%s\n"
-  + "%s:%s:%s",
+  + "%s:%s:%s",
   file1.getOriginalFilename(),
   file1.getContentType(),
   content1,
@@ -220,6 +220,18 @@ public String sayHi(@PathVariable(name = "name") String 
name) {
 return name + " sayhi";
   }
 
+  @RequestMapping(path = "/sayhi/compressed/{name}/v2", method = 
RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE)
+  public String sayHiForCompressed(@PathVariable(name = "name") String name) {
+String bigText =
+"This is a big text,This is a big text,This is a big text,This is a 
big text,This is a big text,This is a big text,This is a big text,This is a big 
text,"
++ "This is a big text,This is a big text,This is a big text,This 
is a big text,This is a big text,This is a big text,This is a big text,This is 
a big text,"
++ "This is a big text,This is a big text,This is a big text,This 
is a big text,This is a big text,This is a big text,This is a big text,This is 
a big text,"
++ "This is a big text,This is a big text,This is a big text,This 
is a big text,This is a big text,This is a big text,This is a 

[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


coveralls commented on issue #550: [SCB-327] Update metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#issuecomment-363366448
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15446953/badge)](https://coveralls.io/builds/15446953)
   
   Coverage decreased (-0.1%) to 87.101% when pulling 
**1c06e50ab2f94d12a8f1002abb669a4fc5a032c4 on zhengyangyong:SCB-327** into 
**05de3cfa3c4d65725ba86c37dc25ec8c1f8ddfe7 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 metrics publish data module
> --
>
> Key: SCB-327
> URL: https://issues.apache.org/jira/browse/SCB-327
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Change data publish from RegistryMetric model to map
>  adjust metrics publish format to spring cloud netflix style



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


[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


zhengyangyong commented on a change in pull request #550: [SCB-327] Update 
metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#discussion_r167134620
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/monitor/CallMonitor.java
 ##
 @@ -17,79 +17,76 @@
 
 package org.apache.servicecomb.metrics.core.monitor;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
-import org.apache.servicecomb.metrics.common.CallMetric;
-import org.apache.servicecomb.metrics.common.DoubleMetricValue;
-import org.apache.servicecomb.metrics.common.LongMetricValue;
-import org.apache.servicecomb.metrics.common.MetricsDimension;
+import org.apache.servicecomb.metrics.common.MetricsConst;
 import org.apache.servicecomb.metrics.core.utils.MonitorUtils;
 
 import com.netflix.servo.monitor.BasicCounter;
 import com.netflix.servo.monitor.MonitorConfig;
 import com.netflix.servo.monitor.StepCounter;
+import com.netflix.servo.tag.Tags;
 
 public class CallMonitor {
-  private final String prefix;
+  private final Map statusCounters;
 
-  private final Map> dimensionCounters;
+  private final String operation;
 
-  public CallMonitor(String prefix) {
-this.prefix = prefix;
-this.dimensionCounters = new ConcurrentHashMapEx<>();
-this.dimensionCounters.put(MetricsDimension.DIMENSION_STATUS, new 
ConcurrentHashMapEx<>());
+  private final String stage;
+
+  private final String role;
+
+  public CallMonitor(String operation, String stage, String role) {
+this.operation = operation;
+this.stage = stage;
+this.role = role;
+
+this.statusCounters = new ConcurrentHashMapEx<>();
   }
 
-  public void increment(String dimensionKey, String... dimensionValues) {
-for (String dimensionValue : dimensionValues) {
-  DimensionCounter counter = dimensionCounters.get(dimensionKey)
-  .computeIfAbsent(dimensionValue, d -> new DimensionCounter(
-  new BasicCounter(MonitorConfig.builder(prefix + 
".total").withTag(dimensionKey, dimensionValue).build()),
-  new StepCounter(MonitorConfig.builder(prefix + 
".tps").withTag(dimensionKey, dimensionValue).build(;
-  counter.increment();
-}
+  public void increment(String statusCode) {
+StatusCounter counter = statusCounters
+.computeIfAbsent(statusCode, d -> new StatusCounter(operation, stage, 
role, statusCode));
+counter.increment();
   }
 
-  public CallMetric toMetric(int windowTimeIndex) {
-List totalValues = new ArrayList<>();
-List tpsValues = new ArrayList<>();
-for (Map dimensionCounter : 
dimensionCounters.values()) {
-  for (DimensionCounter counter : dimensionCounter.values()) {
-totalValues.add(new 
LongMetricValue(counter.getTotal().getValue(windowTimeIndex).longValue(),
-MonitorUtils.convertTags(counter.getTotal(;
-tpsValues.add(
-new 
DoubleMetricValue(MonitorUtils.adjustValue(counter.getTps().getValue(windowTimeIndex).doubleValue()),
-MonitorUtils.convertTags(counter.getTps(;
-  }
+  public Map measure(int windowTimeIndex) {
+Map metrics = new HashMap<>();
+for (StatusCounter counter : statusCounters.values()) {
+  metrics.putAll(counter.measure(windowTimeIndex));
 }
-
-return new CallMetric(this.prefix, totalValues, tpsValues);
+return metrics;
   }
 
-  class DimensionCounter {
-private final BasicCounter total;
+  class StatusCounter {
+private final BasicCounter totalCount;
 
 private final StepCounter tps;
 
-public BasicCounter getTotal() {
-  return total;
-}
-
-public StepCounter getTps() {
-  return tps;
-}
+public StatusCounter(String operation, String stage, String role, String 
statusCode) {
+  MonitorConfig config = 
MonitorConfig.builder(MetricsConst.SERVICECOMB_INVOCATION)
+  .withTag(MetricsConst.TAG_STATUS, 
statusCode).withTag(MetricsConst.TAG_OPERATION, operation)
+  .withTag(MetricsConst.TAG_STAGE, 
stage).withTag(MetricsConst.TAG_ROLE, role).build();
 
-public DimensionCounter(BasicCounter total, StepCounter tps) {
-  this.total = total;
-  this.tps = tps;
+  this.totalCount = new BasicCounter(
+  config.withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, 
"totalCount")));
+  this.tps = new 
StepCounter(config.withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, 
"tps")));
 }
 
 public void 

[jira] [Commented] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-314:


jeho0815 commented on a change in pull request #553: [SCB-314] Support custom 
rest transport server compress and max heade…
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/553#discussion_r167131025
 
 

 ##
 File path: 
demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 ##
 @@ -85,6 +86,11 @@ public static void run() {
 
   testController();
 }
+ResponseEntity entityCompress =
 
 Review comment:
   i'll add the header checker


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


> As a SDK user, i want to set the vertx compressd mode on rest transport so 
> that I can use ServiceComb to compresse server date
> --
>
> Key: SCB-314
> URL: https://issues.apache.org/jira/browse/SCB-314
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>  Labels: consumer
>
> vertx can set server compressed mode, some one want to use this feature and 
> set the max header size 



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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


coveralls commented on issue #552: [SCB-294]when send a request to a not exist 
microservice, edge will always try to find instances of it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#issuecomment-363690800
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15445697/badge)](https://coveralls.io/builds/15445697)
   
   Coverage decreased (-0.03%) to 87.241% when pulling 
**ad19031c5908e6e423ffee5ab44c877fac6e500c on liubao68:registry-build** into 
**bbe18e493aa3fb3d1531f7e6bee806e22d9994b4 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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


coveralls commented on issue #552: [SCB-294]when send a request to a not exist 
microservice, edge will always try to find instances of it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#issuecomment-363690800
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15445677/badge)](https://coveralls.io/builds/15445677)
   
   Coverage decreased (-0.03%) to 87.241% when pulling 
**ad19031c5908e6e423ffee5ab44c877fac6e500c on liubao68:registry-build** into 
**bbe18e493aa3fb3d1531f7e6bee806e22d9994b4 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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-326:


zhengyangyong commented on issue #548: [SCB-326] Using the EventManager directly
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/548#issuecomment-364299608
 
 
   Performance test show use custom EventBus has better performance than use 
EventBus in guava
   May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later
   **So we do not merge this PR**
   
   |   | custom EventBus | guava EventBus |   
   | :-- | :-- | :-- |   
   | tps | 1,000,000 + | 500,000 + |   
   | latency | 1ms | 1.8ms |   
   | consumer cpu | about 650% | about 500% |   
   | producer cpu | about 750% | about 800% |
   
   more detail can found here (in comments) : 
https://issues.apache.org/jira/projects/SCB/issues/SCB-326


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


> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Comment Edited] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng edited comment on SCB-326 at 2/9/18 1:26 AM:
---

We had make a test to compare two way performance,it seems use custom EventBus 
has more better performance:

 
| |custom EventBus|guava EventBus|
|tps|1,000,000 +|500,000 +|
|latency|1ms|1.8ms|
|consumer cpu|about 650%|about 500%|
|producer cpu|about 750%|about 800%|

 

May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later

*So we do not apply this Jira current*

 

Detail:

=

 

Custom EventBus output : 

!image-2018-02-08-18-42-40-219.png!

=

Guava EventBus output :

!image-2018-02-08-18-41-03-675.png!

 =

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!


was (Author: zhengyangyong):
We had make a test to compare two way performance,it seems use custom EventBus 
has more better performance:

 
| |custom EventBus|guava EventBus|
|tps|1,000,000 +|500,000 +|
|latency|1ms|1.8ms|
|consumer cpu|about 650%|about 500%|
|producer cpu|about 750%|about 800%|

 

**May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later**

 

Detail:

=

 

Custom EventBus output : 

!image-2018-02-08-18-42-40-219.png!

=

Guava EventBus output :

!image-2018-02-08-18-41-03-675.png!

 =

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Comment Edited] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng edited comment on SCB-326 at 2/9/18 1:24 AM:
---

We had make a test to compare two way performance,it seems use custom EventBus 
has more better performance:

 
| |custom EventBus|guava EventBus|
|tps|1,000,000 +|500,000 +|
|latency|1ms|1.8ms|
|consumer cpu|about 650%|about 500%|
|producer cpu|about 750%|about 800%|

 

**May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later**

 

Detail:

=

 

Custom EventBus output : 

!image-2018-02-08-18-42-40-219.png!

=

Guava EventBus output :

!image-2018-02-08-18-41-03-675.png!

 =

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!


was (Author: zhengyangyong):
We had make a test to compare two way performance,it seems use custom EventBus 
has more better performance:

 

| | custom EventBus | guava EventBus | 
| :-- | :-- | :-- | 
| tps | 1,000,000 + | 500,000 + | 
| latency | 1ms | 1.8ms | 
| consumer cpu | about 650% | about 500% | 
| producer cpu | about 750% | about 800% |

 

**May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later**

 

Detail:

=

 

Custom EventBus output : 

!image-2018-02-08-18-42-40-219.png!

=

Guava EventBus output :

!image-2018-02-08-18-41-03-675.png!

 =

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Comment Edited] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng edited comment on SCB-326 at 2/9/18 1:24 AM:
---

We had make a test to compare two way performance,it seems use custom EventBus 
has more better performance:

 

| | custom EventBus | guava EventBus | 
| :-- | :-- | :-- | 
| tps | 1,000,000 + | 500,000 + | 
| latency | 1ms | 1.8ms | 
| consumer cpu | about 650% | about 500% | 
| producer cpu | about 750% | about 800% |

 

**May cause by guava EventBus invoke subscribe method via java reflection 
mechanism,need more deep code analysis later**

 

Detail:

=

 

Custom EventBus output : 

!image-2018-02-08-18-42-40-219.png!

=

Guava EventBus output :

!image-2018-02-08-18-41-03-675.png!

 =

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!


was (Author: zhengyangyong):
I had make a test to compare two way performance,result below :

=

Custom wapper: can reach 1,000,000 tps and latency is abount 1ms

consumer cpu : about 650%

producer cpu : about 750%

 

!image-2018-02-08-18-42-40-219.png!

=

EventManager: only reach abount 500,000 tps and latency is abount 1.8ms

consumer cpu : about 500%

producer cpu : about 800%

!image-2018-02-08-18-41-03-675.png!

 

**Think may google EventBus use java Reflection invoke subscribe method and my 
Custom wapper direct call interface method**

 

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!

 

 

 

 

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


WillemJiang commented on a change in pull request #550: [SCB-327] Update 
metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#discussion_r167118327
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultDataSource.java
 ##
 @@ -67,32 +66,37 @@ public DefaultDataSource(RegistryMonitor registryMonitor, 
String pollingSettings
 throw new ServiceCombException("bad format 
servicecomb.metrics.window_time", e);
   }
 }
-String finalPollingSettings = Strings.join(",", 
parsePollingSettings.iterator());
-System.getProperties().setProperty("servo.pollers", finalPollingSettings);
-List appliedWindowTimes = getAppliedWindowTime();
-for (int i = 0; i < appliedWindowTimes.size(); i++) {
-  this.appliedWindowTimes.put(appliedWindowTimes.get(i), i);
+
+List sortedPollingSettings = 
Lists.newArrayList(parsePollingSettings);
+System.getProperties().setProperty("servo.pollers", Strings.join(",", 
sortedPollingSettings.iterator()));
 
 Review comment:
   It's not good way to set the system properties here (as it could be 
overridden anytime), can we setup the servo poller directly? 


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 metrics publish data module
> --
>
> Key: SCB-327
> URL: https://issues.apache.org/jira/browse/SCB-327
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Change data publish from RegistryMetric model to map
>  adjust metrics publish format to spring cloud netflix style



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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


liubao68 commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167117609
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -210,9 +220,9 @@ public void 
onMicroserviceInstanceChanged(MicroserviceInstanceChangedEvent chang
 //   if pull 1/2/3, and then delete 3, but "delete 3" received before pull 
result, will have wrong 3.
 // EXPIRE::
 //   black/white config in SC changed, we must refresh all data from sc.
-postPullInstanceEvent(TimeUnit.MILLISECONDS.toMillis(1));
+postPullInstanceEvent(0);
 
 Review comment:
   but it's better to use 0 than 1, right?


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


liubao68 commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167117568
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -76,6 +77,18 @@ public MicroserviceVersions(AppManager appManager, String 
appId, String microser
 appManager.getEventBus().register(this);
   }
 
+  public void updateLastAccessTime() {
+this.lastAccessedTime = System.currentTimeMillis();
+  }
+
+  public boolean isValidated() {
 
 Review comment:
   when microserivce not exists or for the first time some unexpected sc 
problems happens


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


liubao68 commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167117453
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -109,8 +122,6 @@ public void pullInstances() {
 DefinitionConst.VERSION_RULE_ALL,
 revision);
 if (microserviceInstances == null) {
 
 Review comment:
   in dynamic schema loading, when server not started, pull fail due to service 
not exists, at this time this not notification will given by sc and we will 
fetch create MicroserviceVersions again when call the method. check logic in 
MicroserviceVersions.


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


WillemJiang commented on a change in pull request #550: [SCB-327] Update 
metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#discussion_r167116882
 
 

 ##
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/monitor/CallMonitor.java
 ##
 @@ -17,79 +17,76 @@
 
 package org.apache.servicecomb.metrics.core.monitor;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
-import org.apache.servicecomb.metrics.common.CallMetric;
-import org.apache.servicecomb.metrics.common.DoubleMetricValue;
-import org.apache.servicecomb.metrics.common.LongMetricValue;
-import org.apache.servicecomb.metrics.common.MetricsDimension;
+import org.apache.servicecomb.metrics.common.MetricsConst;
 import org.apache.servicecomb.metrics.core.utils.MonitorUtils;
 
 import com.netflix.servo.monitor.BasicCounter;
 import com.netflix.servo.monitor.MonitorConfig;
 import com.netflix.servo.monitor.StepCounter;
+import com.netflix.servo.tag.Tags;
 
 public class CallMonitor {
-  private final String prefix;
+  private final Map statusCounters;
 
-  private final Map> dimensionCounters;
+  private final String operation;
 
-  public CallMonitor(String prefix) {
-this.prefix = prefix;
-this.dimensionCounters = new ConcurrentHashMapEx<>();
-this.dimensionCounters.put(MetricsDimension.DIMENSION_STATUS, new 
ConcurrentHashMapEx<>());
+  private final String stage;
+
+  private final String role;
+
+  public CallMonitor(String operation, String stage, String role) {
+this.operation = operation;
+this.stage = stage;
+this.role = role;
+
+this.statusCounters = new ConcurrentHashMapEx<>();
   }
 
-  public void increment(String dimensionKey, String... dimensionValues) {
-for (String dimensionValue : dimensionValues) {
-  DimensionCounter counter = dimensionCounters.get(dimensionKey)
-  .computeIfAbsent(dimensionValue, d -> new DimensionCounter(
-  new BasicCounter(MonitorConfig.builder(prefix + 
".total").withTag(dimensionKey, dimensionValue).build()),
-  new StepCounter(MonitorConfig.builder(prefix + 
".tps").withTag(dimensionKey, dimensionValue).build(;
-  counter.increment();
-}
+  public void increment(String statusCode) {
+StatusCounter counter = statusCounters
+.computeIfAbsent(statusCode, d -> new StatusCounter(operation, stage, 
role, statusCode));
+counter.increment();
   }
 
-  public CallMetric toMetric(int windowTimeIndex) {
-List totalValues = new ArrayList<>();
-List tpsValues = new ArrayList<>();
-for (Map dimensionCounter : 
dimensionCounters.values()) {
-  for (DimensionCounter counter : dimensionCounter.values()) {
-totalValues.add(new 
LongMetricValue(counter.getTotal().getValue(windowTimeIndex).longValue(),
-MonitorUtils.convertTags(counter.getTotal(;
-tpsValues.add(
-new 
DoubleMetricValue(MonitorUtils.adjustValue(counter.getTps().getValue(windowTimeIndex).doubleValue()),
-MonitorUtils.convertTags(counter.getTps(;
-  }
+  public Map measure(int windowTimeIndex) {
+Map metrics = new HashMap<>();
+for (StatusCounter counter : statusCounters.values()) {
+  metrics.putAll(counter.measure(windowTimeIndex));
 }
-
-return new CallMetric(this.prefix, totalValues, tpsValues);
+return metrics;
   }
 
-  class DimensionCounter {
-private final BasicCounter total;
+  class StatusCounter {
+private final BasicCounter totalCount;
 
 private final StepCounter tps;
 
-public BasicCounter getTotal() {
-  return total;
-}
-
-public StepCounter getTps() {
-  return tps;
-}
+public StatusCounter(String operation, String stage, String role, String 
statusCode) {
+  MonitorConfig config = 
MonitorConfig.builder(MetricsConst.SERVICECOMB_INVOCATION)
+  .withTag(MetricsConst.TAG_STATUS, 
statusCode).withTag(MetricsConst.TAG_OPERATION, operation)
+  .withTag(MetricsConst.TAG_STAGE, 
stage).withTag(MetricsConst.TAG_ROLE, role).build();
 
-public DimensionCounter(BasicCounter total, StepCounter tps) {
-  this.total = total;
-  this.tps = tps;
+  this.totalCount = new BasicCounter(
+  config.withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, 
"totalCount")));
+  this.tps = new 
StepCounter(config.withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, 
"tps")));
 }
 
 public void 

[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-326:


zhengyangyong commented on issue #548: [SCB-326] Using the EventManager directly
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/548#issuecomment-364299608
 
 
   Performance test show use custom EventBus has better performance than use 
EventBus in guava
   **May cause by guava EventBus invoke subscribe method via java reflection 
mechanism**
   
   |   | custom EventBus | guava EventBus |   
   | :-- | :-- | :-- |   
   | tps | 1,000,000 + | 500,000 + |   
   | latency | 1ms | 1.8ms |   
   | consumer cpu | about 650% | about 500% |   
   | producer cpu | about 750% | about 800% |
   
   
   more detail can found here (in comments) : 
https://issues.apache.org/jira/projects/SCB/issues/SCB-326


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


> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-326:


zhengyangyong commented on issue #548: [SCB-326] Using the EventManager directly
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/548#issuecomment-364299608
 
 
   Performance test show use custom EventBus has better performance than use 
EventBus in guava
   **may cause by guava EventBus invoke subscribe method via java reflection 
mechanism**
   
   |   | custom EventBus | guava EventBus |   
   | :-- | :-- | :-- |   
   | tps | 1,000,000 + | 500,000 + |   
   | latency | 1ms | 1.8ms |   
   | consumer cpu | about 650% | about 500% |   
   | producer cpu | about 750% | about 800% |
   
   
   more detail can found here (in comments) : 
https://issues.apache.org/jira/projects/SCB/issues/SCB-326


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


> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-324) Chassis must support network failure simulation, so that I can developers can enhance the robustness of the app

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-324:


wujimin commented on a change in pull request #543: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/543#discussion_r167115189
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConfig.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.faultinjection;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.config.DynamicIntProperty;
+import com.netflix.config.DynamicPropertyFactory;
+
+/**
+ * Handles the fault injection configuration read from micro service 
file/config
+ * center.
+ */
+public final class FaultInjectionConfig {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  // key is configuration parameter.
+  public static List cfgCallback = new LinkedList<>();
+
+  public int getConfigVal(String config, int defaultValue) {
+DynamicIntProperty dynamicIntProperty = 
DynamicPropertyFactory.getInstance().getIntProperty(config,
+defaultValue);
+if (!cfgCallback.contains(config)) {
 
 Review comment:
   this will be invoked for every invocation
   and a linkedList search is not a good idea, if have many config items this 
will cause performance problems.


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


> Chassis must support network failure simulation, so that I can developers can 
> enhance the robustness of the app
> ---
>
> Key: SCB-324
> URL: https://issues.apache.org/jira/browse/SCB-324
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Java-Chassis
>Reporter: sukesh
>Assignee: sukesh
>Priority: Minor
> Fix For: java-chassis-1.0.0-m1
>
>
> Add new handler for fault injection.
> 1) If handler 'fault-injection' is added in application property 
> file(microservice.yaml) then fault-injection handler should include in 
> handler chain.
> 2) When handler is called read the configuration and listen the configuration 
> event related to fault inject. The sample configuration file is in next slide.
> 3) The configuration mainly consist
>     -delay
>     -abort
>  *delay:*can set the delay for requests based on percentage configured. The 
> unit is ms. The delay percentage default value is 100%
>  *abort*: Abort the requests based on percentage configured. For rest 
> transport protocol error code can be configurable(500, 421) and highway 
> protocol does not support for error return. The abort percentage default 
> value is 100%
> 4) This features currently supports at consumer side.



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


[jira] [Commented] (SCB-331) Log optimization

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-331:


wujimin commented on a change in pull request #551: [SCB-331] log optimization
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/551#discussion_r167114260
 
 

 ##
 File path: 
foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
 ##
 @@ -151,7 +151,7 @@ private static void 
duplicateServiceCombConfigToCse(ConcurrentCompositeConfigura
 
   public static DynamicWatchedConfiguration 
createConfigFromConfigCenter(Configuration localConfiguration) {
 if (localConfiguration.getProperty(configCenterUrlKey) == null) {
-  LOGGER.info("config center URL is missing, skip to load configuration 
from config center");
+  LOGGER.info("config center URL is not configured");
 
 Review comment:
   1.maybe print config key is better
   2."skip to load configuration from config center", it's better to keep this 
information 
   


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


> Log optimization
> 
>
> Key: SCB-331
> URL: https://issues.apache.org/jira/browse/SCB-331
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: laijianbin
>Assignee: laijianbin
>Priority: Major
>
> public static DynamicWatchedConfiguration 
> createConfigFromConfigCenter(Configuration localConfiguration) {
>  if (localConfiguration.getProperty(configCenterUrlKey) == null)
> { LOGGER.info("config center URL is missing, skip to load configuration from 
> config center"); return null; }
> changed to
> public static DynamicWatchedConfiguration 
> createConfigFromConfigCenter(Configuration localConfiguration) {
> if (localConfiguration.getProperty(configCenterUrlKey) == null)
> { LOGGER.info("config center URL is not configured"); return null; }
>  
>  



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


[jira] [Commented] (SCB-314) As a SDK user, i want to set the vertx compressd mode on rest transport so that I can use ServiceComb to compresse server date

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-314:


wujimin commented on a change in pull request #553: [SCB-314] Support custom 
rest transport server compress and max heade…
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/553#discussion_r167113792
 
 

 ##
 File path: 
demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 ##
 @@ -85,6 +86,11 @@ public static void run() {
 
   testController();
 }
+ResponseEntity entityCompress =
 
 Review comment:
   not check if it's realy compressed?


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


> As a SDK user, i want to set the vertx compressd mode on rest transport so 
> that I can use ServiceComb to compresse server date
> --
>
> Key: SCB-314
> URL: https://issues.apache.org/jira/browse/SCB-314
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>  Labels: consumer
>
> vertx can set server compressed mode, some one want to use this feature and 
> set the max header size 



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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


wujimin commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167113147
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -109,8 +122,6 @@ public void pullInstances() {
 DefinitionConst.VERSION_RULE_ALL,
 revision);
 if (microserviceInstances == null) {
 
 Review comment:
   pull failed or setInstance failed, will never try again in watch mode except 
notified by another event.
   i remember it's a bug in old version
   now, it will happened 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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-326:


zhengyangyong commented on issue #548: [SCB-326] Using the EventManager directly
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/548#issuecomment-364299608
 
 
   test result is here in comment : 
https://issues.apache.org/jira/projects/SCB/issues/SCB-326


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


> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-326:


wujimin commented on issue #548: [SCB-326] Using the EventManager directly
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/548#issuecomment-364298547
 
 
   need test
   do not merge now.


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


> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


wujimin commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167112433
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceManager.java
 ##
 @@ -41,11 +47,31 @@ public MicroserviceManager(AppManager appManager, String 
appId) {
   }
 
   public MicroserviceVersions getOrCreateMicroserviceVersions(String 
microserviceName) {
-return versionsByName.computeIfAbsent(microserviceName, name -> {
+MicroserviceVersions microserviceVersions = 
versionsByName.computeIfAbsent(microserviceName, name -> {
   MicroserviceVersions instance = new MicroserviceVersions(appManager, 
appId, microserviceName);
   instance.submitPull();
   return instance;
 });
+if (!microserviceVersions.isValidated()) {
+  // remove this microservice if it does not exist or not registered in 
order to get it back when access it again
+  versionsByName.remove(microserviceName);
+} else {
+  microserviceVersions.updateLastAccessTime();
+}
+if (versionsByName.size() >= MAX_NUM_OF_MICROSERVICES) {
 
 Review comment:
   i'm not sure if it is right.
   think about edge, if realy need route to so many targets, this logic will 
cause problem.


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


wujimin commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167112054
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -76,6 +77,18 @@ public MicroserviceVersions(AppManager appManager, String 
appId, String microser
 appManager.getEventBus().register(this);
   }
 
+  public void updateLastAccessTime() {
+this.lastAccessedTime = System.currentTimeMillis();
+  }
+
+  public boolean isValidated() {
 
 Review comment:
   when will a MicroserviceVersions created, but never used?


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


wujimin commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r167111736
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -210,9 +220,9 @@ public void 
onMicroserviceInstanceChanged(MicroserviceInstanceChangedEvent chang
 //   if pull 1/2/3, and then delete 3, but "delete 3" received before pull 
result, will have wrong 3.
 // EXPIRE::
 //   black/white config in SC changed, we must refresh all data from sc.
-postPullInstanceEvent(TimeUnit.MILLISECONDS.toMillis(1));
+postPullInstanceEvent(0);
 
 Review comment:
   even time is 0, it's a async task.
   everything not changed, except time gap is smaller, but time gap is not 0.


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


coveralls commented on issue #550: [SCB-327] Update metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#issuecomment-363366448
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15433378/badge)](https://coveralls.io/builds/15433378)
   
   Coverage increased (+0.02%) to 87.255% when pulling 
**72b6b3330d2134c06dd57009fb675a90e1680543 on zhengyangyong:SCB-327** into 
**05de3cfa3c4d65725ba86c37dc25ec8c1f8ddfe7 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 metrics publish data module
> --
>
> Key: SCB-327
> URL: https://issues.apache.org/jira/browse/SCB-327
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Change data publish from RegistryMetric model to map
>  adjust metrics publish format to spring cloud netflix style



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


[jira] [Commented] (SCB-327) Update metrics publish data module

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-327:


zhengyangyong commented on issue #550: [SCB-327] Update metrics publish data 
module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#issuecomment-364108895
 
 
   Rebase and resolved conflicts


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 metrics publish data module
> --
>
> Key: SCB-327
> URL: https://issues.apache.org/jira/browse/SCB-327
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Change data publish from RegistryMetric model to map
>  adjust metrics publish format to spring cloud netflix style



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


[jira] [Commented] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng commented on SCB-326:
---

I had make a test to compare two way performance,result below :

=

Custom wapper: can reach 1,000,000 tps and latency is abount 1ms

consumer cpu : about 650%

producer cpu : about 750%

 

!image-2018-02-08-18-42-40-219.png!

=

EventManager: only reach abount 500,000 tps and latency is abount 1.8ms

consumer cpu : about 500%

producer cpu : about 800%

!image-2018-02-08-18-41-03-675.png!

 

**Think may google EventBus use java Reflection invoke subscribe method and my 
Custom wapper direct call interface method**

 

Consumer config:

!image-2018-02-08-18-46-23-679.png!

Producer config:

!image-2018-02-08-18-47-07-285.png!

 

 

 

 

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Updated] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng updated SCB-326:
--
Attachment: image-2018-02-08-18-47-07-285.png

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png, image-2018-02-08-18-47-07-285.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Updated] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng updated SCB-326:
--
Attachment: image-2018-02-08-18-46-23-679.png

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png, 
> image-2018-02-08-18-46-23-679.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Updated] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng updated SCB-326:
--
Attachment: image-2018-02-08-18-42-40-219.png

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png, image-2018-02-08-18-42-40-219.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Updated] (SCB-326) Using the EventManager directly without creating another wrapper

2018-02-08 Thread yangyongzheng (JIRA)

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

yangyongzheng updated SCB-326:
--
Attachment: image-2018-02-08-18-41-03-675.png

> Using the  EventManager directly without creating another wrapper
> -
>
> Key: SCB-326
> URL: https://issues.apache.org/jira/browse/SCB-326
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
> Attachments: image-2018-02-08-18-39-42-739.png, 
> image-2018-02-08-18-41-03-675.png
>
>
> Remove custom EventBus because old EventManager with google EventBus is good 
> enough



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


[jira] [Commented] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


WillemJiang closed pull request #549: [SCB-315] Resolve the Registry-Service UT 
test fail
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/549
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
index 1b1a80481..90f3865da 100644
--- 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
@@ -109,8 +109,9 @@ public static AddressResolverOptions 
getAddressResover(String tag, Configuration
 
   private static List getStringListProperty(Configuration configSource,
   List defaultValue, String... keys) {
+configSource = guardConfigSource(configSource);
 if (configSource == null) {
-  configSource = (Configuration) 
DynamicPropertyFactory.getBackingConfigurationSource();
+  return defaultValue;
 }
 for (String key : keys) {
   String[] vals = configSource.getStringArray(key);
@@ -122,8 +123,9 @@ public static AddressResolverOptions 
getAddressResover(String tag, Configuration
   }
 
   private static int getPositiveIntProperty(Configuration configSource, int 
defaultValue, String... keys) {
+configSource = guardConfigSource(configSource);
 if (configSource == null) {
-  configSource = (Configuration) 
DynamicPropertyFactory.getBackingConfigurationSource();
+  return defaultValue;
 }
 for (String key : keys) {
   Integer val = configSource.getInteger(key, null);
@@ -140,8 +142,9 @@ private static int getPositiveIntProperty(Configuration 
configSource, int defaul
 
   private static boolean getBooleanProperty(Configuration configSource, 
boolean defaultValue,
   String... keys) {
+configSource = guardConfigSource(configSource);
 if (configSource == null) {
-  configSource = (Configuration) 
DynamicPropertyFactory.getBackingConfigurationSource();
+  return defaultValue;
 }
 for (String key : keys) {
   Boolean val = configSource.getBoolean(key, null);
@@ -151,4 +154,11 @@ private static boolean getBooleanProperty(Configuration 
configSource, boolean de
 }
 return defaultValue;
   }
+
+  private static Configuration guardConfigSource(Configuration configSource) {
+if (configSource == null && 
DynamicPropertyFactory.getBackingConfigurationSource() != null) {
+  configSource = (Configuration) 
DynamicPropertyFactory.getBackingConfigurationSource();
+}
+return configSource;
+  }
 }


 


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


> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



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


[jira] [Commented] (SCB-294) when send a request to a not exist microservice, edge will always try to find instances of it.

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-294:


liubao68 commented on a change in pull request #552: [SCB-294]when send a 
request to a not exist microservice, edge will always try to find instances of 
it
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/552#discussion_r166874639
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java
 ##
 @@ -210,9 +220,9 @@ public void 
onMicroserviceInstanceChanged(MicroserviceInstanceChangedEvent chang
 //   if pull 1/2/3, and then delete 3, but "delete 3" received before pull 
result, will have wrong 3.
 // EXPIRE::
 //   black/white config in SC changed, we must refresh all data from sc.
-postPullInstanceEvent(TimeUnit.MILLISECONDS.toMillis(1));
+postPullInstanceEvent(0);
 
 Review comment:
   This is an event fired by SC of instance change and we need to get the 
changed instance immediately. Some user applications based on this event to 
make calls, and if we pending to get instance, will cause their logic more 
complex


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


> when send a request to a not exist microservice, edge will always try to find 
> instances of it.
> --
>
> Key: SCB-294
> URL: https://issues.apache.org/jira/browse/SCB-294
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: liubao
>Priority: Major
>




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


[jira] [Commented] (SCB-330) [pack] update documents of saga pack

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-330:


WillemJiang closed pull request #134: SCB-330 update document of pack
URL: https://github.com/apache/incubator-servicecomb-saga/pull/134
 
 
   

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/README.md b/README.md
old mode 100755
new mode 100644
index 9a7249f5..fd569ea6
--- a/README.md
+++ b/README.md
@@ -1,76 +1,36 @@
 # Saga [![Build 
Status](https://travis-ci.org/apache/incubator-servicecomb-saga.svg?branch=master)](https://travis-ci.org/apache/incubator-servicecomb-saga?branch=master)
 [![Coverage 
Status](https://coveralls.io/repos/github/apache/incubator-servicecomb-saga/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-servicecomb-saga?branch=master)
 
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
-Apache ServiceComb (incubating) Saga is a type of Compensating Transaction 
pattern, which provides a simple way to help users solve the data consistency 
problems encountered in micro-service applications.
+Apache ServiceComb (incubating) Saga is an eventually data consistency 
solution for micro-service applications. Transactions are commited directly in 
the try phase and compensated in reverse order in the rollback phase comparing 
to [TCC](http://design.inf.usi.ch/sites/default/files/biblio/rest-tcc.pdf). 
 
-## Documentation
-Reference documentation is available on the [ServiceComb 
website][servicecomb-website].
+## Features
+* High availability. The coordinator is stateless and thus can have multiple 
instances.
+* High reliability. All transaction events are stored in database permanently.
+* High performance. Transaction events are reported to coordinator via gRPC 
and transaction payloads are serialized/deserialized by Kyro.
+* Low invasion. All you need to do is add 2-3 annotations and the 
corresponding compensate methods.
+* Easy to deploy. All components can boot via docker.
+* Supported micro-service frameworks:
+  + Spring Cloud
+* Support both forward(retry) and backward(compensate) recovery.
 
-[servicecomb-website]: http://servicecomb.incubator.apache.org/
+## Architecture
+Saga is composed of  **alpha** and **omega**.
+* The alpha plays as the coordinator. It is responsible for the management of 
transactions.
+* The omega plays as an agent inside the micro-service. It intercepts 
incoming/outgoing requests and reports transaction events to alpha.
 
-## Major Architecture of Saga
-* saga-core(transaction and compensation handling logic)
-* saga-format(data serialization and deserialization)
-* saga-transports(communication protocol implementation such as rest or rpc in 
the future)
-* saga-discovery(service discovery)
-* saga-spring(restful service framework)
+The following diagram shows the relationships among alpha, omega and services.
+![Saga Pack Architecture](docs/static_files/pack.png)
 
-![Saga](docs/static_files/saga.png) 
+See [Saga Pack Design](docs/design.md) for details. If you are interested in 
our previous architecture, please move forward to [Old Saga's 
Documentation](docs/old_saga.md).
 
-## Prerequisites
-You will need:
-1. [Oracle JDK 1.8+][jdk]
-2. [Maven 3.x][maven]
-3. [Docker][docker]
-4. [PostgreSQL][postgres]
-5. [Service Center(optional)][service_center]
-6. [Docker compose(optional)][docker_compose]
-7. [Docker machine(optional)][docker_machine]
+## Get Started
+See [Booking Demo](saga-demo/pack-demo/README.md) for details.
 
-
-[jdk]: 
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-[maven]: https://maven.apache.org/install.html
-[docker]: https://www.docker.com/get-docker
-[postgres]: https://www.postgresql.org/download/
-[service_center]: 
https://github.com/apache/incubator-servicecomb-service-center
-[docker_compose]: https://docs.docker.com/compose/install/
-[docker_machine]: https://docs.docker.com/machine/install-machine/
-
-
-
-## Building
-Download the source code.
-```
-git clone https://github.com/apache/incubator-servicecomb-saga.git
-```
-
-Enter the Saga root directory,build Saga project by maven command and generate 
a docker image named saga-spring in local.
-```
-mvn package -DskipTests -Pdocker
-```
-
-## Run Services
-A `docker-compose.yaml` file is provided to start Saga services and its 
dependencies(Service center and Mysql) as docker containers.
-User also can configure specified Service center or Mysql in 
`docker-compose.yaml`.
-
-Enter the Saga root directory, run all service images using command,
-```
-docker-compose up
-```
-
-
-## 

[jira] [Commented] (SCB-224) [pack] retry sub-transaction on failure

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-224:


WillemJiang commented on issue #117: SCB-224 support retry sub-transaction
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/117#issuecomment-364043048
 
 
   @zhang2014  Could you rebase the master branch?
   


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


> [pack] retry sub-transaction on failure
> ---
>
> Key: SCB-224
> URL: https://issues.apache.org/jira/browse/SCB-224
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Saga
>Reporter: Yin Xiang
>Priority: Major
>
> as a user, i want to retry transaction in my service, so that it can always 
> be done eventually.



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


[jira] [Updated] (SCB-224) [pack] retry sub-transaction on failure

2018-02-08 Thread Willem Jiang (JIRA)

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

Willem Jiang updated SCB-224:
-
Fix Version/s: saga-0.2.0

> [pack] retry sub-transaction on failure
> ---
>
> Key: SCB-224
> URL: https://issues.apache.org/jira/browse/SCB-224
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Saga
>Reporter: Yin Xiang
>Priority: Major
> Fix For: saga-0.2.0
>
>
> as a user, i want to retry transaction in my service, so that it can always 
> be done eventually.



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


[jira] [Commented] (SCB-325) report sdk version when register to SC

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-325:


liubao68 closed pull request #544: [SCB-325] report sdk version when register 
to SC
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544
 
 
   

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-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
index 71f885f32..f2fc0d77a 100644
--- 
a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
+++ 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
@@ -19,15 +19,12 @@
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Map.Entry;
-
 import org.apache.servicecomb.core.CseContext;
 import org.apache.servicecomb.demo.DemoConst;
 import org.apache.servicecomb.demo.TestMgr;
 import org.apache.servicecomb.demo.controller.Controller;
 import org.apache.servicecomb.demo.controller.Person;
 import org.apache.servicecomb.foundation.common.utils.BeanUtils;
-import org.apache.servicecomb.foundation.common.utils.JsonUtils;
 import org.apache.servicecomb.foundation.common.utils.Log4jUtils;
 import org.apache.servicecomb.metrics.common.MetricsDimension;
 import org.apache.servicecomb.metrics.common.MetricsPublisher;
diff --git 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java
 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java
index 547c17279..e6613fa3e 100644
--- 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java
+++ 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java
@@ -59,8 +59,6 @@
 
   String CONFIG_FRAMEWORK_DEFAULT_NAME = "servicecomb-java-chassis";
 
-  String CONFIG_FRAMEWORK_DEFAULT_VERSION = "";
-
   String CONFIG_DEFAULT_REGISTER_BY = "SDK";
 
 }
diff --git a/pom.xml b/pom.xml
index 51412e5f4..f0e1171ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,6 +253,18 @@
   findbugs-exclude.xml
 
   
+  
+org.apache.maven.plugins
+maven-jar-plugin
+
+  
+
+  
true
+  
true
+
+  
+
+  
 
 
   
diff --git 
a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java
 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java
new file mode 100644
index 0..5e4adfb61
--- /dev/null
+++ 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java
@@ -0,0 +1,23 @@
+/*
+ * 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.serviceregistry.api;
+
+import java.util.Map;
+
+public interface Versions {
+  public Map loadVersion();
+}
diff --git 
a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java
 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java
new file mode 100644
index 0..5c878552d
--- /dev/null
+++ 
b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java
@@ -0,0 +1,43 @@
+/*
+ * 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 

[jira] [Commented] (SCB-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


liubao68 commented on a change in pull request #549: [SCB-315] Resolve the 
Registry-Service UT test fail
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/549#discussion_r165809804
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
 ##
 @@ -109,9 +109,12 @@ public static AddressResolverOptions 
getAddressResover(String tag, Configuration
 
   private static List getStringListProperty(Configuration configSource,
   List defaultValue, String... keys) {
-if (configSource == null) {
+if (configSource == null && 
DynamicPropertyFactory.getBackingConfigurationSource() != null) {
 
 Review comment:
   这种情况属于UT问题,不是代码问题,改代码不合适。 


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


> As a SDK user, i want to custom netty dns resovl properties so that the 
> ServiceComb has to add config support
> -
>
> Key: SCB-315
> URL: https://issues.apache.org/jira/browse/SCB-315
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>
> Default DNS resovl use the machine config, but sometimes the application want 
> to set by themselves to adapt to diffrent local or cloud enviroments



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


[jira] [Commented] (SCB-331) Log optimization

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-331:


liubao68 commented on issue #551: [SCB-331] log optimization
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/551#issuecomment-364035766
 
 
   Need english speaker to check. I think it's not better than before. 


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


> Log optimization
> 
>
> Key: SCB-331
> URL: https://issues.apache.org/jira/browse/SCB-331
> Project: Apache ServiceComb
>  Issue Type: Task
>Reporter: laijianbin
>Assignee: laijianbin
>Priority: Major
>
> public static DynamicWatchedConfiguration 
> createConfigFromConfigCenter(Configuration localConfiguration) {
>  if (localConfiguration.getProperty(configCenterUrlKey) == null)
> { LOGGER.info("config center URL is missing, skip to load configuration from 
> config center"); return null; }
> changed to
> public static DynamicWatchedConfiguration 
> createConfigFromConfigCenter(Configuration localConfiguration) {
> if (localConfiguration.getProperty(configCenterUrlKey) == null)
> { LOGGER.info("config center URL is not configured"); return null; }
>  
>  



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


[jira] [Commented] (SCB-330) [pack] update documents of saga pack

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-330:


coveralls commented on issue #134: SCB-330 update document of pack
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/134#issuecomment-364034015
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15428886/badge)](https://coveralls.io/builds/15428886)
   
   Coverage increased (+0.09%) to 95.493% when pulling 
**646a7b3ff8624694423c95d0dde1f42686be4e2b on eric-lee-ltk:SCB-330** into 
**ddff6d833324727cedf6cd8eb2d37c5a49a41402 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


> [pack] update documents of saga pack
> 
>
> Key: SCB-330
> URL: https://issues.apache.org/jira/browse/SCB-330
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Affects Versions: saga-0.1.0
>Reporter: Eric Lee
>Assignee: Eric Lee
>Priority: Major
> Fix For: saga-0.1.0
>
>
> As a dev, I want to know how to use the Saga's new architecture pack. 
> Documents including README and quick start should contain details of its 
> usages, features and architecture.



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


[jira] [Commented] (SCB-336) Can not filter instances with service tags

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-336:


coveralls commented on issue #279: SCB-336 1.add ut about find instance with 
tag 2.optimize find api
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/279#issuecomment-364033007
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15428894/badge)](https://coveralls.io/builds/15428894)
   
   Coverage increased (+0.09%) to 74.034% when pulling 
**7b7d403fdf088656ea936cc47b7cd461344cea8f on aseTo2016:aseTo2016** into 
**268cba27f2ee6ff533ea94de12833c3052b1206d 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


> Can not filter instances with service tags
> --
>
> Key: SCB-336
> URL: https://issues.apache.org/jira/browse/SCB-336
> 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-336) Can not filter instances with service tags

2018-02-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-336:


codecov-io commented on issue #279: SCB-336 1.add ut about find instance with 
tag 2.optimize find api
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/279#issuecomment-364032781
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?src=pr=h1)
 Report
   > Merging 
[#279](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/268cba27f2ee6ff533ea94de12833c3052b1206d?src=pr=desc)
 will **decrease** coverage by `0.04%`.
   > The diff coverage is `96%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/graphs/tree.svg?src=pr=GAaF7zrg8R=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #279  +/-   ##
   ==
   - Coverage   70.39%   70.34%   -0.05% 
   ==
 Files  17   17  
 Lines3418 3416   -2 
   ==
   - Hits 2406 2403   -3 
 Misses846  846  
   - Partials  166  167   +1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/rule\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9ydWxlX3V0aWwuZ28=)
 | `68.24% <100%> (-0.22%)` | :arrow_down: |
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | `71.07% <66.66%> (-0.05%)` | :arrow_down: |
   | 
[server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv)
 | `75.43% <0%> (-0.59%)` | :arrow_down: |
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `57.58% <0%> (-0.17%)` | :arrow_down: |
   | 
[server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==)
 | `77.25% <0%> (+0.42%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?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/279?src=pr=footer).
 Last update 
[268cba2...7b7d403](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/279?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


> Can not filter instances with service tags
> --
>
> Key: SCB-336
> URL: https://issues.apache.org/jira/browse/SCB-336
> 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)