[jira] [Commented] (SCB-307) avoid to create unnecessary vertx context during send http response.

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-307:


coveralls commented on issue #532: [SCB-307] avoid to create unnecessary vertx 
context during send http re…
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/532#issuecomment-360699533
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15281351/badge)](https://coveralls.io/builds/15281351)
   
   Coverage increased (+0.006%) to 87.475% when pulling 
**e396dc157c0bda1a08017b7c3f94846afe8850a5 on 
wujimin:optimize-http-send-response** into 
**99861e106925e7117737bef8a15da29099f28e98 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


> avoid to create unnecessary vertx context during send http response.
> 
>
> Key: SCB-307
> URL: https://issues.apache.org/jira/browse/SCB-307
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>




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


[jira] [Commented] (SCB-147) Delete 0.5.0 metrics in foundation-metrics

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-147:


coveralls commented on issue #536: [SCB-147] Delete old metrics of version 
0.5.0 in foundation-metrics
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/536#issuecomment-360966589
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15281050/badge)](https://coveralls.io/builds/15281050)
   
   Coverage decreased (-0.07%) to 87.362% when pulling 
**5a5d3a89a6f41654df08d2a730b3740bc988f0d5 on zhengyangyong:SCB-147** into 
**8e84b30ad678eed7616d2fc38540feaf66d579f2 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


> Delete 0.5.0 metrics in foundation-metrics
> --
>
> Key: SCB-147
> URL: https://issues.apache.org/jira/browse/SCB-147
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
> Attachments: 20180127-113436(eSpace).png
>
>
> New Metrics applied in 1.0.0-m1 ,so 1.0.0-m2 old version of metrics can be 
> removed



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


[jira] [Commented] (SCB-307) avoid to create unnecessary vertx context during send http response.

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-307:


WillemJiang commented on issue #532: [SCB-307] avoid to create unnecessary 
vertx context during send http re…
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/532#issuecomment-361476025
 
 
   @wujimin  Could you rebase  the change?


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


> avoid to create unnecessary vertx context during send http response.
> 
>
> Key: SCB-307
> URL: https://issues.apache.org/jira/browse/SCB-307
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: wujimin
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>




--
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-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


WillemJiang closed pull request #538: SCB-315 add common AddressResover 
configuration to foundation-vertx, and use it in service-registry and config-cc 
to support dynamic config by user
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/538
 
 
   

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/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 
b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
index 89ff0053c..602f4a921 100644
--- 
a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
+++ 
b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
@@ -45,6 +45,7 @@
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
+import org.apache.servicecomb.foundation.vertx.AddressResolverConfig;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 import org.apache.servicecomb.foundation.vertx.VertxUtils;
 import org.apache.servicecomb.foundation.vertx.client.ClientPoolManager;
@@ -59,6 +60,7 @@
 import io.netty.handler.codec.http.HttpResponseStatus;
 import io.vertx.core.DeploymentOptions;
 import io.vertx.core.Vertx;
+import io.vertx.core.VertxOptions;
 import io.vertx.core.http.CaseInsensitiveHeaders;
 import io.vertx.core.http.HttpClientOptions;
 import io.vertx.core.http.HttpClientRequest;
@@ -152,7 +154,9 @@ private void refreshMembers(MemberDiscovery 
memberDiscovery) {
   }
 
   private void deployConfigClient() throws InterruptedException {
-Vertx vertx = VertxUtils.getOrCreateVertxByName("config-center", null);
+VertxOptions vertxOptions = new VertxOptions();
+
vertxOptions.setAddressResolverOptions(AddressResolverConfig.getAddressResover(SSL_KEY));
+Vertx vertx = VertxUtils.getOrCreateVertxByName("config-center", 
vertxOptions);
 
 HttpClientOptions httpClientOptions = createHttpClientOptions();
 clientMgr = new ClientPoolManager<>(vertx, new 
HttpClientPoolFactory(httpClientOptions));
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
new file mode 100644
index 0..698178dba
--- /dev/null
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/AddressResolverConfig.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.foundation.vertx;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.netflix.config.DynamicPropertyFactory;
+
+import io.vertx.core.dns.AddressResolverOptions;
+
+public class AddressResolverConfig {
+
+  /**
+   * get the target endpoints with custom address resolve config
+   * @param tag config tag, such as sc.consumer or cc.consumer
+   * @return AddressResolverOptions
+   */
+  public static AddressResolverOptions getAddressResover(String tag) {
+AddressResolverOptions addressResolverOptions = new 
AddressResolverOptions();
+addressResolverOptions
+
.setServers(getStringListProperty(AddressResolverOptions.DEFAULT_SEACH_DOMAINS,
+"addressResolver." + tag + ".servers",
+"addressResolver.servers"));
+addressResolverOptions
+
.setOptResourceEnabled(getBooleanProperty(AddressResolverOptions.DEFAULT_OPT_RESOURCE_ENABLED,
+"addressResolver." + tag + ".optResourceEnabled",
+"addressResolver.optResourceEnabled"));
+addressResolverOptions
+ 

[jira] [Commented] (SCB-147) Delete 0.5.0 metrics in foundation-metrics

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-147:


WillemJiang commented on issue #536: [SCB-147] Delete old metrics of version 
0.5.0 in foundation-metrics
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/536#issuecomment-361475671
 
 
   Integration test failed due to removing the servo dependency.


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


> Delete 0.5.0 metrics in foundation-metrics
> --
>
> Key: SCB-147
> URL: https://issues.apache.org/jira/browse/SCB-147
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
> Attachments: 20180127-113436(eSpace).png
>
>
> New Metrics applied in 1.0.0-m1 ,so 1.0.0-m2 old version of metrics can be 
> removed



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


[jira] [Created] (SCB-321) Support report trace data

2018-01-29 Thread little-cui (JIRA)
little-cui created SCB-321:
--

 Summary: Support report trace data
 Key: SCB-321
 URL: https://issues.apache.org/jira/browse/SCB-321
 Project: Apache ServiceComb
  Issue Type: New Feature
  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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


coveralls commented on issue #538: SCB-315 add common AddressResover 
configuration to foundation-vertx, and use it in service-registry and config-cc 
to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#issuecomment-361125203
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15279650/badge)](https://coveralls.io/builds/15279650)
   
   Coverage increased (+0.06%) to 87.491% when pulling 
**1a5444be0e8c66ef3afcd3281ac18b0ac030c31c on jeho0815:SCB-315** into 
**8e84b30ad678eed7616d2fc38540feaf66d579f2 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


> 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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


jeho0815 commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164614053
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 
 Review comment:
   ok


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


> 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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


jeho0815 commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164614034
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 AddressResolverOptions aroc1 = 
AddressResolverConfig.getAddressResover("test1");
 Assert.assertEquals("default.svc.local.cluster", 
aroc1.getSearchDomains().get(0));
 
 Review comment:
   ok


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


> 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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


jeho0815 commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164614020
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 AddressResolverOptions aroc1 = 
AddressResolverConfig.getAddressResover("test1");
 
 Review comment:
   ok


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


> 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-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


asifdxtreme closed pull request #266: SCB-317 Add release scripts for frontend
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/266
 
 
   

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/scripts/release/README.md b/scripts/release/README.md
index 64427c2e..5e6e7dfa 100644
--- a/scripts/release/README.md
+++ b/scripts/release/README.md
@@ -30,4 +30,17 @@ bash -x scripts/release/make_release.sh linux 1.0.0 1.0.0-m1
 bash -x scripts/release/make_release.sh windows 1.0.0 1.0.0-m1
 ```
 
+ Frontend Linux Release
+
+```
+# bash -x scripts/release/make_frontend_release.sh OS_NAME VERSION_NUMBER 
PACKAGE_NUMBER
+bash -x scripts/release/make_frontend_release.sh linux 1.0.0 1.0.0-m1
+```
+
+ Frontend Windows Release
+
+```
+# bash -x scripts/release/make_frontend_release.sh OS_NAME VERSION_NUMBER 
PACKAGE_NUMBER
+bash -x scripts/release/make_frontend_release.sh windows 1.0.0 1.0.0-m1
+```
 
diff --git a/scripts/release/make_frontend_release.sh 
b/scripts/release/make_frontend_release.sh
new file mode 100644
index ..c16f9276
--- /dev/null
+++ b/scripts/release/make_frontend_release.sh
@@ -0,0 +1,123 @@
+#!/usr/bin/env bash
+## Get the Release Number
+if [ $2 == "" ]; then
+echo "Invalid version numberexiting"
+exit 1
+else
+RELEASE=$2
+fi
+
+## Get the PACKAGE NUMBER
+if [ $3 == "" ]; then
+PACKAGE=RELEASE
+else
+PACKAGE=$3
+fi
+
+## Get the OS Version
+case $1 in
+ linux )
+OSNAME=linux ;;
+
+ windows )
+OSNAME=windows ;;
+
+ all )
+OSNAME=all ;;
+
+ * )
+echo "Wrong OS Versionexiting."
+exit 1
+
+esac
+
+## Prepare the Configuration
+prepare_conf() {
+set +e
+rm -rf tmp
+
+set -e
+mkdir tmp
+cp -r frontend/conf tmp/
+}
+
+# Build Linux Release
+build_linux(){
+if [ $RELEASE == "" ] ; then
+ echo "Error in Making Linux Release.Release Number not specified"
+fi
+if [ $PACKAGE = "" ]; then
+echo "Error in Making Linux Release.Package Number not specified"
+fi
+
+set +e
+rm -rf frontend-servicecomb-service-center-$PACKAGE-linux-amd64
+rm -rf frontend-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz
+
+set -e
+mkdir -p frontend-servicecomb-service-center-$PACKAGE-linux-amd64
+
+export GOOS=linux
+cd frontend
+go build -o scfrontend
+cp -r scfrontend 
../frontend-servicecomb-service-center-$PACKAGE-linux-amd64
+cd ..
+prepare_conf
+cp -r tmp/conf frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r frontend/app 
frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+echo "./scfrontend > start-sc-frontend.log 2>&1 &" >> 
frontend-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
+echo "kill -9 \$(ps aux | grep 'scfrontend' | awk '{print \$2}')" >> 
frontend-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
+chmod +x frontend-servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
+chmod +x frontend-servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
+cp -r LICENSE frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r NOTICE frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r DISCLAIMER frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r frontend/Readme.md 
frontend-servicecomb-service-center-$PACKAGE-linux-amd64/
+tar -czvf frontend-servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz 
frontend-servicecomb-service-center-$PACKAGE-linux-amd64
+
+}
+
+# Build Windows Release
+build_windows(){
+if [ $RELEASE == "" ] ; then
+ echo "Error in Making Windows Release.Release Number not 
specified"
+fi
+if [ $PACKAGE = "" ]; then
+echo "Error in Making Windows Release.Package Number not specified"
+fi
+
+set +e
+rm -rf frontend-servicecomb-service-center-$PACKAGE-windows-amd64
+rm -rf frontend-servicecomb-service-center-$PACKAGE-windows-amd64.zip
+
+set -e
+mkdir -p frontend-servicecomb-service-center-$PACKAGE-windows-amd64
+export GOOS=windows
+cd frontend
+go build -o scfrontend.exe
+cp -r scfrontend.exe 
../frontend-servicecomb-service-center-$PACKAGE-windows-amd64
+cd ..
+prepare_conf
+cp -r tmp/conf frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
+cp -r frontend/app 
frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
+cp -r LICENSE frontend-servicecomb-service-center-$PACKAGE-windows-amd64/
+cp -r NOTICE 

[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


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


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


> Prepare the release for Service-Center-1.0.0-m1
> ---
>
> Key: SCB-317
> URL: https://issues.apache.org/jira/browse/SCB-317
> Project: Apache ServiceComb
>  Issue Type: Wish
>  Components: Service-Center
>Affects Versions: service-center-1.0.0-m1
>Reporter: Mohammad Asif Siddiqui
>Assignee: Mohammad Asif Siddiqui
>Priority: Major
> Fix For: service-center-1.0.0-m1
>
>




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


[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


asifdxtreme closed pull request #265: SCB-317 Add release scripts for 
service-center
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/265
 
 
   

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/scripts/release/README.md b/scripts/release/README.md
new file mode 100644
index ..64427c2e
--- /dev/null
+++ b/scripts/release/README.md
@@ -0,0 +1,33 @@
+### Service-Center Release
+
+ Making Release
+
+To make a release of Service-center please follow the below steps
+
+```
+## Clone the code in a proper GOPATH
+
+git clone https://github.com/apache/incubator-servicecomb-service-center.git 
$GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+cd $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+
+## Download all the dependency
+go get github.com/FiloSottile/gvt
+gvt restore
+
+```
+
+ Linux Release
+
+```
+# bash -x scripts/release/make_release.sh OS_NAME VERSION_NUMBER PACKAGE_NUMBER
+bash -x scripts/release/make_release.sh linux 1.0.0 1.0.0-m1
+```
+
+ Windows Release
+
+```
+# bash -x scripts/release/make_release.sh OS_NAME VERSION_NUMBER PACKAGE_NUMBER
+bash -x scripts/release/make_release.sh windows 1.0.0 1.0.0-m1
+```
+
+
diff --git a/scripts/release/make_release.sh b/scripts/release/make_release.sh
new file mode 100644
index ..b07ff576
--- /dev/null
+++ b/scripts/release/make_release.sh
@@ -0,0 +1,127 @@
+#!/usr/bin/env bash
+## Get the Release Number
+if [ $2 == "" ]; then
+echo "Invalid version numberexiting"
+exit 1
+else
+RELEASE=$2
+fi
+
+## Get the PACKAGE NUMBER
+if [ $3 == "" ]; then
+PACKAGE=RELEASE
+else
+PACKAGE=$3
+fi
+
+## Get the OS Version
+case $1 in
+ linux )
+OSNAME=linux ;;
+
+ windows )
+OSNAME=windows ;;
+
+ all )
+OSNAME=all ;;
+
+ * )
+echo "Wrong OS Versionexiting."
+exit 1
+
+esac
+
+## Prepare the Configuration
+prepare_conf() {
+set +e
+rm -rf tmp
+
+set -e
+mkdir tmp
+cp -r etc/conf tmp/
+sed -i s@"manager_cluster.*=.*$"@"manager_name = \"sr-0\"\nmanager_addr = 
\"http://127.0.0.1:2380\"\nmanager_cluster = \"sr-0=http://127.0.0.1:2380\""@g 
tmp/conf/app.conf
+sed -i 's/registry_plugin = etcd/registry_plugin = embeded_etcd/g' 
tmp/conf/app.conf
+}
+
+# Build Linux Release
+build_linux(){
+if [ $RELEASE == "" ] ; then
+ echo "Error in Making Linux Release.Release Number not specified"
+fi
+if [ $PACKAGE = "" ]; then
+echo "Error in Making Linux Release.Package Number not specified"
+fi
+
+set +e
+rm -rf servicecomb-service-center-$PACKAGE-linux-amd64
+rm -rf servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz
+
+set -e
+mkdir -p servicecomb-service-center-$PACKAGE-linux-amd64
+
+export GOOS=linux
+export GIT_COMMIT=$(git log  --pretty=format:'%h' -n 1)
+export BUILD_NUMBER=$RELEASE
+GO_LDFLAGS="${GO_LDFLAGS} -X 
'github.com/apache/incubator-servicecomb-service-center/version.BUILD_TAG=$(date
 +%Y%m%d%H%M%S).$BUILD_NUMBER.$GIT_COMMIT'"
+GO_LDFLAGS="${GO_LDFLAGS} -X 
'github.com/apache/incubator-servicecomb-service-center/version.VERSION=$BUILD_NUMBER'"
+go build --ldflags "${GO_LDFLAGS}"
+cp -r incubator-servicecomb-service-center 
servicecomb-service-center-$PACKAGE-linux-amd64
+prepare_conf
+cp -r tmp/conf servicecomb-service-center-$PACKAGE-linux-amd64/
+echo "./incubator-servicecomb-service-center > start-sc.log 2>&1 &" >> 
servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
+echo "kill -9 \$(ps aux | grep 'incubator-servicecomb-service-center' | 
awk '{print \$2}')" >> servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
+chmod +x servicecomb-service-center-$PACKAGE-linux-amd64/start.sh
+chmod +x servicecomb-service-center-$PACKAGE-linux-amd64/stop.sh
+cp -r LICENSE servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r NOTICE servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r DISCLAIMER servicecomb-service-center-$PACKAGE-linux-amd64/
+cp -r README.md servicecomb-service-center-$PACKAGE-linux-amd64/
+tar -czvf servicecomb-service-center-$PACKAGE-linux-amd64.tar.gz 
servicecomb-service-center-$PACKAGE-linux-amd64
+
+}
+
+# Build Windows Release
+build_windows(){
+if [ $RELEASE == "" ] ; then
+ echo "Error in Making Windows Release.Release Number not 
specified"
+fi
+if [ $PACKAGE = "" ]; then
+echo "Error in Making Windows Release.Package Number not specified"
+fi
+
+  

[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


codecov-io commented on issue #265: SCB-317 Add release scripts for 
service-center
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/265#issuecomment-361275597
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?src=pr=h1)
 Report
   > Merging 
[#265](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/33bb13a65406f865c85f25eaa69d4d743c35d3e4?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265/graphs/tree.svg?src=pr=GAaF7zrg8R=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master#265  +/-   ##
   =
   + Coverage   70.17%   70.2%   +0.02% 
   =
 Files  17  17  
 Lines34703470  
   =
   + Hits 24352436   +1 
 Misses864 864  
   + Partials  171 170   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv)
 | `76.02% <0%> (+0.58%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?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/265?src=pr=footer).
 Last update 
[33bb13a...32b6ebe](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/265?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


> Prepare the release for Service-Center-1.0.0-m1
> ---
>
> Key: SCB-317
> URL: https://issues.apache.org/jira/browse/SCB-317
> Project: Apache ServiceComb
>  Issue Type: Wish
>  Components: Service-Center
>Affects Versions: service-center-1.0.0-m1
>Reporter: Mohammad Asif Siddiqui
>Assignee: Mohammad Asif Siddiqui
>Priority: Major
> Fix For: service-center-1.0.0-m1
>
>




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


[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


coveralls commented on issue #265: SCB-317 Add release scripts for 
service-center
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/265#issuecomment-361275475
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15269220/badge)](https://coveralls.io/builds/15269220)
   
   Coverage increased (+0.1%) to 73.832% when pulling 
**32b6ebe6959612c5c20005619b8ea232506e3df2 on asifdxtreme:release** into 
**33bb13a65406f865c85f25eaa69d4d743c35d3e4 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


> Prepare the release for Service-Center-1.0.0-m1
> ---
>
> Key: SCB-317
> URL: https://issues.apache.org/jira/browse/SCB-317
> Project: Apache ServiceComb
>  Issue Type: Wish
>  Components: Service-Center
>Affects Versions: service-center-1.0.0-m1
>Reporter: Mohammad Asif Siddiqui
>Assignee: Mohammad Asif Siddiqui
>Priority: Major
> Fix For: service-center-1.0.0-m1
>
>




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


[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


coveralls commented on issue #265: SCB-317 Add release scripts for 
service-center
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/265#issuecomment-361275475
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15269096/badge)](https://coveralls.io/builds/15269096)
   
   Coverage increased (+0.2%) to 73.898% when pulling 
**dee0468acdc4c3cbc891fbcc14035ff62a9875a9 on asifdxtreme:release** into 
**33bb13a65406f865c85f25eaa69d4d743c35d3e4 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


> Prepare the release for Service-Center-1.0.0-m1
> ---
>
> Key: SCB-317
> URL: https://issues.apache.org/jira/browse/SCB-317
> Project: Apache ServiceComb
>  Issue Type: Wish
>  Components: Service-Center
>Affects Versions: service-center-1.0.0-m1
>Reporter: Mohammad Asif Siddiqui
>Assignee: Mohammad Asif Siddiqui
>Priority: Major
> Fix For: service-center-1.0.0-m1
>
>




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


[jira] [Commented] (SCB-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


asifdxtreme opened a new pull request #265: SCB-317 Add release scripts for 
service-center
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/265
 
 
   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 `go build` `go test` `go fmt` `go vet` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
- [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


> Prepare the release for Service-Center-1.0.0-m1
> ---
>
> Key: SCB-317
> URL: https://issues.apache.org/jira/browse/SCB-317
> Project: Apache ServiceComb
>  Issue Type: Wish
>  Components: Service-Center
>Affects Versions: service-center-1.0.0-m1
>Reporter: Mohammad Asif Siddiqui
>Assignee: Mohammad Asif Siddiqui
>Priority: Major
> Fix For: service-center-1.0.0-m1
>
>




--
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-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


WillemJiang commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164455281
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 AddressResolverOptions aroc1 = 
AddressResolverConfig.getAddressResover("test1");
 
 Review comment:
   Please use assertThat here.


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


> 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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


WillemJiang commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164455177
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 AddressResolverOptions aroc1 = 
AddressResolverConfig.getAddressResover("test1");
 Assert.assertEquals("default.svc.local.cluster", 
aroc1.getSearchDomains().get(0));
 
 Review comment:
   Please use assertThat here.


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


> 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-315) As a SDK user, i want to custom netty dns resovl properties so that the ServiceComb has to add config support

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-315:


WillemJiang commented on a change in pull request #538: SCB-315 add common 
AddressResover configuration to foundation-vertx, and use it in 
service-registry and config-cc to support dynamic config by user
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/538#discussion_r164454843
 
 

 ##
 File path: 
foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/TestAddressResoverConfig.java
 ##
 @@ -40,8 +61,7 @@ public void testGetResover() {
 ArchaiusUtils.setProperty("addressResolver.ndots", 3);
 ArchaiusUtils.setProperty("addressResolver.rotateServers", true);
 AddressResolverOptions aroc = 
AddressResolverConfig.getAddressResover("test");
-Assert.assertEquals(2, aroc.getServers().size());
-Assert.assertEquals("8.8.8.8", aroc.getServers().get(0));
+Assert.assertThat(aroc.getServers(), is(Arrays.asList("8.8.8.8", 
"8.8.4.4")));
 Assert.assertEquals("test.svc.local.cluster", 
aroc.getSearchDomains().get(0));
 
 Review comment:
   This line can be changed to use assertThat. 


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-317) Prepare the release for Service-Center-1.0.0-m1

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-317:


asifdxtreme closed pull request #262: SCB-317 Add Linux Release scripts 
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/262
 
 
   

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/scripts/release/README.md b/scripts/release/README.md
new file mode 100644
index ..538765bb
--- /dev/null
+++ b/scripts/release/README.md
@@ -0,0 +1,48 @@
+### Service-Center Release
+
+ Making Linux Release
+
+To make a linux release of Service-center please follow the below steps
+
+```
+## Clone the code in a proper GOPATH
+
+git clone https://github.com/apache/incubator-servicecomb-service-center.git 
$GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+cd $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+
+## Donwload all the dependency
+go get github.com/FiloSottile/gvt
+gvt restore
+
+## Run the release script
+bash -x scripts/release/make_linux_release.sh
+
+## Your release is ready
+root@SZX1000272432:/home/asif/go/src/github.com/apache/incubator-servicecomb-service-center#
 ll
+total 11848
+drwxr-xr-x 15 root root 4096 Jan 29 13:45 ./
+drwxr-xr-x  5 root root 4096 Jan 29 13:03 ../
+-rw-r--r--  1 root root  564 Jan 29 13:03 DISCLAIMER
+drwxr-xr-x  2 root root 4096 Jan 29 13:03 docs/
+drwxr-xr-x  3 root root 4096 Jan 29 13:03 etc/
+drwxr-xr-x  3 root root 4096 Jan 29 13:03 examples/
+drwxr-xr-x  5 root root 4096 Jan 29 13:03 frontend/
+drwxr-xr-x  8 root root 4096 Jan 29 13:16 .git/
+drwxr-xr-x  2 root root 4096 Jan 29 13:03 .github/
+-rw-r--r--  1 root root  414 Jan 29 13:03 .gitignore
+-rw-r--r--  1 root root   96 Jan 29 13:03 .gitmodules
+drwxr-xr-x  2 root root 4096 Jan 29 13:03 integration/
+-rw-r--r--  1 root root11357 Jan 29 13:03 LICENSE
+-rw-r--r--  1 root root 1012 Jan 29 13:03 main.go
+-rw-r--r--  1 root root  353 Jan 29 13:03 .mention-bot
+-rw-r--r--  1 root root 2590 Jan 29 13:03 NOTICE
+drwxr-xr-x 19 root root 4096 Jan 29 13:03 pkg/
+-rw-r--r--  1 root root 4358 Jan 29 13:03 README.md
+drwxr-xr-x  5 root root 4096 Jan 29 13:03 scripts/
+drwxr-xr-x 15 root root 4096 Jan 29 13:03 server/
+-rw-r--r--  1 root root 12021226 Jan 29 13:45 
servicecomb-service-center-1.0.0-m1-linux-amd64.tar.gz
+-rw-r--r--  1 root root 1322 Jan 29 13:03 .travis.yml
+drwxr-xr-x  6 root root 4096 Jan 29 13:06 vendor/
+drwxr-xr-x  2 root root 4096 Jan 29 13:03 version/
+
+```
diff --git a/scripts/release/conf/conf/app.conf 
b/scripts/release/conf/conf/app.conf
new file mode 100644
index ..d0ae155e
--- /dev/null
+++ b/scripts/release/conf/conf/app.conf
@@ -0,0 +1,99 @@
+component_name = service_center
+#run mode could be many options to specify the env like prod,dev
+runmode = dev
+
+###
+# sever options
+###
+httpaddr = 0.0.0.0
+httpport = 30100
+
+read_header_timeout = 60s
+read_timeout = 60s
+idle_timeout = 60s
+write_timeout = 60s
+max_header_bytes = 32768 # 32K
+max_body_bytes = 2097152 # 2M
+
+###
+# plugin options
+###
+plugins_dir = ./plugins
+
+# pluggable registry service
+# 'etcd' means app running as an etcd agent
+# 'embeded_etcd' means app running as an etcd server
+registry_plugin = embeded_etcd
+
+# registry address
+# registry_plugin equals to 'embeded_etcd', example:
+manager_name = "sc-0"
+manager_addr = "http://127.0.0.1:2380;
+manager_cluster = "sc-0=http://127.0.0.1:2380;
+# registry_plugin equals to 'etcd'
+# manager_cluster = "127.0.0.1:2379"
+
+#heartbeat that sync synchronizes client's endpoints with the known endpoints 
from the etcd membership,unit is second.
+#<=0, use default 30s
+auto_sync_interval = 30s
+
+#indicate how many revision you want to keep in etcd
+compact_index_delta = 100
+compact_interval = 12h
+
+cipher_plugin = ""
+
+#suppot buildin, unlimit
+quota_plugin = ""
+
+# access control plugin
+auth_plugin = ""
+
+#support om, manage
+auditlog_plugin = ""
+
+###
+# rate limit options
+###
+#ttl=m, s, ms
+limit_ttl = "s"
+#set 0 to disable rate limit
+limit_conns = 0
+#list of places to look for IP address
+limit_iplookups = "RemoteAddr,X-Forwarded-For,X-Real-IP"
+

[jira] [Commented] (SCB-308) Vertx transport server timeout will cause VertxServerRequestToHttpServletRequest getRemoteAddress NullPointException

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-308:


WillemJiang closed pull request #539: SCB-308 Vertx transport server timeout 
will cause VertxServerRequestT…
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/539
 
 
   

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/http/VertxServerRequestToHttpServletRequest.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/VertxServerRequestToHttpServletRequest.java
index b3409a4d3..94bc41cb6 100644
--- 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/VertxServerRequestToHttpServletRequest.java
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/http/VertxServerRequestToHttpServletRequest.java
@@ -40,6 +40,7 @@
 import io.vertx.core.MultiMap;
 import io.vertx.core.buffer.Buffer;
 import io.vertx.core.http.HttpServerRequest;
+import io.vertx.core.net.SocketAddress;
 import io.vertx.ext.web.FileUpload;
 import io.vertx.ext.web.RoutingContext;
 
@@ -59,6 +60,8 @@
 
   private String path;
 
+  private SocketAddress socketAddress;
+
   public VertxServerRequestToHttpServletRequest(RoutingContext context, String 
path) {
 this(context);
 this.path = path;
@@ -67,6 +70,7 @@ public VertxServerRequestToHttpServletRequest(RoutingContext 
context, String pat
   public VertxServerRequestToHttpServletRequest(RoutingContext context) {
 this.context = context;
 this.vertxRequest = context.request();
+this.socketAddress = this.vertxRequest.remoteAddress();
 super.setBodyBuffer(context.getBody());
   }
 
@@ -127,17 +131,17 @@ public String getScheme() {
 
   @Override
   public String getRemoteAddr() {
-return this.vertxRequest.remoteAddress().host();
+return this.socketAddress.host();
   }
 
   @Override
   public String getRemoteHost() {
-return this.vertxRequest.remoteAddress().host();
+return this.socketAddress.host();
   }
 
   @Override
   public int getRemotePort() {
-return this.vertxRequest.remoteAddress().port();
+return this.socketAddress.port();
   }
 
   @Override
diff --git 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
index e4d5277fd..56fd1c242 100644
--- 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
+++ 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
@@ -53,6 +53,9 @@
   @Mocked
   HttpServerRequest vertxRequest;
 
+  @Mocked
+  SocketAddress socketAddress;
+
   VertxServerRequestToHttpServletRequest request;
 
   @Before
@@ -61,6 +64,8 @@ public void setup() {
   {
 context.request();
 result = vertxRequest;
+vertxRequest.remoteAddress();
+result = socketAddress;
   }
 };
 
@@ -192,13 +197,11 @@ public void testScheme() {
   }
 
   @Test
-  public void testGetRemoteAddr(@Mocked SocketAddress sa) {
+  public void testGetRemoteAddr() {
 new Expectations() {
   {
-sa.host();
+socketAddress.host();
 result = "host";
-vertxRequest.remoteAddress();
-result = sa;
   }
 };
 
@@ -206,13 +209,22 @@ public void testGetRemoteAddr(@Mocked SocketAddress sa) {
   }
 
   @Test
-  public void testGetRemoteHost(@Mocked SocketAddress sa) {
+  public void testGetRemoteAddrNull() {
 new Expectations() {
   {
-sa.host();
+socketAddress.host();
+result = null;
+  }
+};
+Assert.assertEquals(null, request.getRemoteAddr());
+  }
+
+  @Test
+  public void testGetRemoteHost() {
+new Expectations() {
+  {
+socketAddress.host();
 result = "host";
-vertxRequest.remoteAddress();
-result = sa;
   }
 };
 
@@ -220,13 +232,11 @@ public void testGetRemoteHost(@Mocked SocketAddress sa) {
   }
 
   @Test
-  public void testGetRemotePort(@Mocked SocketAddress sa) {
+  public void testGetRemotePort() {
 new Expectations() {
   {
-sa.port();
+socketAddress.port();
 result = 1234;
-vertxRequest.remoteAddress();
-result = sa;
   }
 };
 
diff --git 

[jira] [Updated] (SCB-320) Feature adjustment for 1.0.0-m1 publish

2018-01-29 Thread yangyongzheng (JIRA)

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

yangyongzheng updated SCB-320:
--
Description: 
1.Because support of custom metrics not so prefect temporary disable it;

2.change data publish from RegistryMetric model to map

3.Remove custom EventBus because old EventManager with google EventBus is good 
enough

  was:
1.Because support of custom metrics not so prefect temporary disable it;

2.change data publish from RegistryMetric model to map


> Feature adjustment for 1.0.0-m1 publish
> ---
>
> Key: SCB-320
> URL: https://issues.apache.org/jira/browse/SCB-320
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> 1.Because support of custom metrics not so prefect temporary disable it;
> 2.change data publish from RegistryMetric model to map
> 3.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-240) [pack] performance impacts test

2018-01-29 Thread Eric Lee (JIRA)

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

Eric Lee updated SCB-240:
-
Fix Version/s: (was: saga-0.1.0)
   saga-0.2.0

> [pack] performance impacts test
> ---
>
> Key: SCB-240
> URL: https://issues.apache.org/jira/browse/SCB-240
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Eric Lee
>Priority: Major
> Fix For: saga-0.2.0
>
>
> as a user, I want to know how much performance loss if I introduce pack as my 
> transaction consistency solution.



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


[jira] [Updated] (SCB-240) [pack] performance impacts test

2018-01-29 Thread Eric Lee (JIRA)

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

Eric Lee updated SCB-240:
-
Affects Version/s: (was: saga-0.1.0)
   saga-0.2.0

> [pack] performance impacts test
> ---
>
> Key: SCB-240
> URL: https://issues.apache.org/jira/browse/SCB-240
> Project: Apache ServiceComb
>  Issue Type: Task
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Eric Lee
>Priority: Major
> Fix For: saga-0.2.0
>
>
> as a user, I want to know how much performance loss if I introduce pack as my 
> transaction consistency solution.



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


[jira] [Updated] (SCB-241) [pack] visualize transaction status in alpha

2018-01-29 Thread Eric Lee (JIRA)

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

Eric Lee updated SCB-241:
-
Affects Version/s: (was: saga-0.1.0)
   saga-0.2.0

> [pack] visualize transaction status in alpha
> 
>
> Key: SCB-241
> URL: https://issues.apache.org/jira/browse/SCB-241
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Affects Versions: saga-0.2.0
>Reporter: Eric Lee
>Priority: Major
>
> as a user, I want to see real time transaction status and query history 
> transaction status to better analysis the whole system.



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


[jira] [Commented] (SCB-293) trace integration test has small probability lost data.

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-293:


WillemJiang closed pull request #534: SCB-293 sleep before quering in tracing 
test
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/534
 
 
   

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

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

diff --git 
a/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
 
b/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
index 3a925b3a5..4524025cf 100644
--- 
a/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
+++ 
b/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
@@ -75,6 +75,15 @@ protected void 
assertThatSpansReceivedByZipkin(Collection logs, String..
 .map(this::extractIds)
 .collect(Collectors.toList());
 
+// Sleep for 5 seconds to wait the reporter finish posting to zipkin 
server.
+// See SCB-293
+try {
+  Thread.sleep(5000);
+} catch (InterruptedException e) {
+  log.error("Thread interrupted, ", e.getMessage());
+  Thread.currentThread().interrupt();
+}
+
 String url = zipkin.httpUrl() + "/api/v2/trace/{traceId}";
 log.info("rest url:" + url);
 ResponseEntity responseEntity = restTemplate.getForEntity(url, 
String.class, traceId(loggedIds));


 


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


> trace integration test has small probability lost data.
> ---
>
> Key: SCB-293
> URL: https://issues.apache.org/jira/browse/SCB-293
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: Yang Bo
>Priority: Major
>
> 05:06:38,161 [ebc2a9a79ef653e3/5c77469686c84d3f/1b6b1907ad44e15d] INFO 
> [pool-2-thread-3] tracing.TracedPojoImpl (TracedPojoImpl.java:31) - in /pojo
> Jan 22, 2018 5:06:38 AM okhttp3.mockwebserver.MockWebServer$3 
> processOneRequest
> INFO: MockWebServer[32871] received request: POST /api/v2/spans HTTP/1.1 and 
> responded: HTTP/1.1 202 OK
> 05:06:39,314 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:73) - Received log: 05:06:37,269 
> [ebc2a9a79ef653e3/ebc2a9a79ef653e3/] INFO [pool-2-thread-1] 
> tracing.SomeTracedController (SomeTracedController.java:47) - in /hello
> 05:06:39,315 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:73) - Received log: 05:06:37,293 
> [ebc2a9a79ef653e3/62b00f7ba98331ac/ebc2a9a79ef653e3] INFO [pool-2-thread-1] 
> tracing.SlowRepoImpl (SlowRepoImpl.java:34) - in /crawl
> 05:06:39,315 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:73) - Received log: 05:06:37,929 
> [ebc2a9a79ef653e3/1b6b1907ad44e15d/ebc2a9a79ef653e3] INFO [pool-2-thread-2] 
> tracing.TracedJaxrsController (TracedJaxrsController.java:51) - in /bonjour
> 05:06:39,316 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:73) - Received log: 05:06:38,161 
> [ebc2a9a79ef653e3/5c77469686c84d3f/1b6b1907ad44e15d] INFO [pool-2-thread-3] 
> tracing.TracedPojoImpl (TracedPojoImpl.java:31) - in /pojo
> 05:06:39,317 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:79) - rest 
> url:http://localhost:32871/api/v2/trace/\{traceId}
> 05:06:39,322 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:84) - Received trace json: 
> [\{"traceId":"ebc2a9a79ef653e3","parentId":"ebc2a9a79ef653e3","id":"62b00f7ba98331ac","name":"crawl","timestamp":1516597597292328,"duration":24877,"localEndpoint":{"serviceName":"tracing-service","ipv4":"10.20.0.41"},"tags":\{"call.path":"public
>  abstract java.lang.String 
> org.apache.servicecomb.tests.tracing.SlowRepo.crawl() throws 
> java.lang.InterruptedException"}},\{"traceId":"ebc2a9a79ef653e3","parentId":"1b6b1907ad44e15d","id":"5c77469686c84d3f","kind":"SERVER","name":"post","timestamp":1516597598138483,"duration":27967,"localEndpoint":{"serviceName":"tracing-service","ipv4":"10.20.0.41"},"tags":\{"http.path":"/pojo"}}]
> 05:06:39,326 [//] INFO [main] tracing.TracingTestBase 
> (TracingTestBase.java:89) - Received value public abstract java.lang.String 
> 

[jira] [Commented] (SCB-308) Vertx transport server timeout will cause VertxServerRequestToHttpServletRequest getRemoteAddress NullPointException

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-308:


coveralls commented on issue #539: SCB-308 Vertx transport server timeout will 
cause VertxServerRequestT…
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/539#issuecomment-361180991
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15263997/badge)](https://coveralls.io/builds/15263997)
   
   Coverage increased (+0.0007%) to 87.436% when pulling 
**63fd7c8b8f063be8cd85b971c8e641d3a073fab5 on jeho0815:Branch_SCB-308** into 
**8e84b30ad678eed7616d2fc38540feaf66d579f2 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


> Vertx transport server timeout will cause 
> VertxServerRequestToHttpServletRequest getRemoteAddress NullPointException
> 
>
> Key: SCB-308
> URL: https://issues.apache.org/jira/browse/SCB-308
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Affects Versions: java-chassis-1.0.0-m1
>Reporter: jeho0815
>Assignee: jeho0815
>Priority: Major
>
> VertxServerRequestToHttpServletRequest use the the vertx HttpServerRequest  
> socketAddress, this will call the netty channel to get remote addtess, but 
> server has timeout, so the remote address has been released and return null. 
> so we have to bind the socketaddress to the ServletRequest



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


[jira] [Commented] (SCB-298) v4/default/govern/microservices?options=instances,dependencies doesn't return self microservice information

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-298:


asifdxtreme closed pull request #264: SCB-298 v4/default/govern/microservices 
return self microservice information
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/264
 
 
   

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

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

diff --git a/server/govern/service.go b/server/govern/service.go
index 15e36d11..73780e54 100644
--- a/server/govern/service.go
+++ b/server/govern/service.go
@@ -84,9 +84,6 @@ func (governService *GovernService) GetServicesInfo(ctx 
context.Context, in *pb.
allServiceDetails := make([]*pb.ServiceDetail, 0, len(services))
domainProject := util.ParseDomainProject(ctx)
for _, service := range services {
-   if apt.Service.ServiceId == service.ServiceId {
-   continue
-   }
if len(in.AppId) > 0 {
if in.AppId != service.AppId {
continue
@@ -214,9 +211,6 @@ func (governService *GovernService) GetApplications(ctx 
context.Context, in *pb.
if _, ok := appMap[key.AppId]; ok {
continue
}
-   if apt.IsSCKey(key) {
-   continue
-   }
appMap[key.AppId] = struct{}{}
apps = append(apps, key.AppId)
}
@@ -379,32 +373,20 @@ func statistics(ctx context.Context) (*pb.Statistics, 
error) {
}
 
app := make(map[string]interface{}, respSvc.Count)
-   scSvc := make(map[string]interface{}, respSvc.Count)
svcWithNonVersion := make(map[string]interface{}, respSvc.Count)
for _, kv := range respSvc.Kvs {
key, _ := pb.GetInfoFromSvcIndexKV(kv)
-   if _, ok := app[key.AppId]; !ok {
-   if !apt.IsSCKey(key) {
-   app[key.AppId] = nil
-   }
-   }
 
-   if apt.IsSCKey(key) {
-   k := util.BytesToStringWithNoCopy(kv.Key)
-   if _, ok := scSvc[k]; !ok {
-   scSvc[k] = nil
-   }
+   if _, ok := app[key.AppId]; !ok {
+   app[key.AppId] = nil
}
 
key.Version = ""
svcWithNonVersionKey := apt.GenerateServiceIndexKey(key)
svcWithNonVersion[svcWithNonVersionKey] = nil
}
-   scSvcCount := 0
-   if int64(len(scSvc)) > 0 {
-   scSvcCount = 1
-   }
-   result.Services.Count = int64(len(svcWithNonVersion) - scSvcCount)
+
+   result.Services.Count = int64(len(svcWithNonVersion))
result.Apps.Count = int64(len(app))
 
// instance
@@ -425,27 +407,7 @@ func statistics(ctx context.Context) (*pb.Statistics, 
error) {
onlineServices[serviceId] = nil
}
}
-
-   key = apt.GenerateInstanceKey(domainProject, apt.Service.ServiceId, "")
-   scOpts := append(opts,
-   registry.WithStrKey(key),
-   registry.WithPrefix(),
-   registry.WithCountOnly())
-   respScIns, err := store.Store().Instance().Search(ctx, scOpts...)
-   if err != nil {
-   return nil, err
-   }
-
-   result.Instances.Count = respIns.Count - respScIns.Count
-   result.Services.OnlineCount = removeSCSelf(domainProject, 
int64(len(onlineServices)), 1)
+   result.Instances.Count = respIns.Count
+   result.Services.OnlineCount = int64(len(onlineServices))
return result, err
 }
-
-func removeSCSelf(domainProject string, count int64, removeNum int64) int64 {
-   if count > 0 {
-   if apt.IsDefaultDomainProject(domainProject) {
-   count = count - removeNum
-   }
-   }
-   return count
-}


 


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


> v4/default/govern/microservices?options=instances,dependencies doesn't return 
> self microservice information
> ---
>
> Key: SCB-298
> URL: https://issues.apache.org/jira/browse/SCB-298
> Project: Apache ServiceComb
> 

[jira] [Commented] (SCB-298) v4/default/govern/microservices?options=instances,dependencies doesn't return self microservice information

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-298:


codecov-io commented on issue #264: SCB-298 v4/default/govern/microservices 
return self microservice information
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/264#issuecomment-361178605
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?src=pr=h1)
 Report
   > Merging 
[#264](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/2f3030bb7e8dd57e597823009f85fd9f57703180?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264/graphs/tree.svg?height=150=650=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master#264  +/-   ##
   =
   + Coverage   70.17%   70.2%   +0.02% 
   =
 Files  17  17  
 Lines34703470  
   =
   + Hits 24352436   +1 
 Misses864 864  
   + Partials  171 170   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/service\_dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2VydmljZV9kZXBlbmRlbmN5Lmdv)
 | `73.91% <0%> (+0.86%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?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/264?src=pr=footer).
 Last update 
[2f3030b...5d9b2af](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/264?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


> v4/default/govern/microservices?options=instances,dependencies doesn't return 
> self microservice information
> ---
>
> Key: SCB-298
> URL: https://issues.apache.org/jira/browse/SCB-298
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: Mohammad Asif Siddiqui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> v4/default/govern/microservices?options=instances,dependencies this api is 
> not returning self microservice information because of which there is a 
> discrepancy in the number of microservivces showing in dashboard and in the 
> service list.



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


[jira] [Commented] (SCB-298) v4/default/govern/microservices?options=instances,dependencies doesn't return self microservice information

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-298:


coveralls commented on issue #264: SCB-298 v4/default/govern/microservices 
return self microservice information
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/264#issuecomment-361178561
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/15263860/badge)](https://coveralls.io/builds/15263860)
   
   Coverage increased (+0.1%) to 73.832% when pulling 
**5d9b2af494051b85c35bb10895d42d5557041f59 on little-cui:master** into 
**2f3030bb7e8dd57e597823009f85fd9f57703180 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


> v4/default/govern/microservices?options=instances,dependencies doesn't return 
> self microservice information
> ---
>
> Key: SCB-298
> URL: https://issues.apache.org/jira/browse/SCB-298
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: Mohammad Asif Siddiqui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> v4/default/govern/microservices?options=instances,dependencies this api is 
> not returning self microservice information because of which there is a 
> discrepancy in the number of microservivces showing in dashboard and in the 
> service list.



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


[jira] [Resolved] (SCB-298) v4/default/govern/microservices?options=instances,dependencies doesn't return self microservice information

2018-01-29 Thread little-cui (JIRA)

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

little-cui resolved SCB-298.

Resolution: Fixed

> v4/default/govern/microservices?options=instances,dependencies doesn't return 
> self microservice information
> ---
>
> Key: SCB-298
> URL: https://issues.apache.org/jira/browse/SCB-298
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: Mohammad Asif Siddiqui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> v4/default/govern/microservices?options=instances,dependencies this api is 
> not returning self microservice information because of which there is a 
> discrepancy in the number of microservivces showing in dashboard and in the 
> service list.



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


[jira] [Created] (SCB-320) Feature adjustment for 1.0.0-m1 publish

2018-01-29 Thread yangyongzheng (JIRA)
yangyongzheng created SCB-320:
-

 Summary: Feature adjustment for 1.0.0-m1 publish
 Key: SCB-320
 URL: https://issues.apache.org/jira/browse/SCB-320
 Project: Apache ServiceComb
  Issue Type: Sub-task
Reporter: yangyongzheng
Assignee: yangyongzheng
 Fix For: java-chassis-1.0.0-m1


1.Because support of custom metrics not so prefect temporary disable it;

2.change data publish from RegistryMetric model to map



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


[jira] [Commented] (SCB-298) v4/default/govern/microservices?options=instances,dependencies doesn't return self microservice information

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-298:


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


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


> v4/default/govern/microservices?options=instances,dependencies doesn't return 
> self microservice information
> ---
>
> Key: SCB-298
> URL: https://issues.apache.org/jira/browse/SCB-298
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: Mohammad Asif Siddiqui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.0.0-m2
>
>
> v4/default/govern/microservices?options=instances,dependencies this api is 
> not returning self microservice information because of which there is a 
> discrepancy in the number of microservivces showing in dashboard and in the 
> service list.



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


[jira] [Reopened] (SCB-6) ServiceComb Java Chassis Metrics

2018-01-29 Thread yangyongzheng (JIRA)

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

yangyongzheng reopened SCB-6:
-

mistake close op

> ServiceComb Java Chassis Metrics
> 
>
> Key: SCB-6
> URL: https://issues.apache.org/jira/browse/SCB-6
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> As a microservice framework,servicecomb java chassis need support user 
> collect metrics such as tps,latency and system resource usage etc,then use 
> this collected data making some policy like scaling strategy further.
> The relation between Java Chassis and Java Chassis Metrics is similar to 
> Spring boot and Spring boot actuator.



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


[jira] [Closed] (SCB-311) Support Record Custom Metrics in Java Chassis Itself

2018-01-29 Thread yangyongzheng (JIRA)

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

yangyongzheng closed SCB-311.
-
Resolution: Later

We will provider this feature later

> Support Record Custom Metrics in Java Chassis Itself
> 
>
> Key: SCB-311
> URL: https://issues.apache.org/jira/browse/SCB-311
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> Current custom metrics only can use out of Java Chassis because metrics core 
> is dependent on Java Chassis core,we need support inject custom metrics in 
> Java Chassis let other developer use this mechanism,like foundcation-vertx 
> count context creation etc...



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


[jira] [Closed] (SCB-6) ServiceComb Java Chassis Metrics

2018-01-29 Thread yangyongzheng (JIRA)

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

yangyongzheng closed SCB-6.
---
Resolution: Later

We will provider this feature later

> ServiceComb Java Chassis Metrics
> 
>
> Key: SCB-6
> URL: https://issues.apache.org/jira/browse/SCB-6
> Project: Apache ServiceComb
>  Issue Type: New Feature
>  Components: Java-Chassis
>Reporter: yangyongzheng
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.0.0-m1
>
>
> As a microservice framework,servicecomb java chassis need support user 
> collect metrics such as tps,latency and system resource usage etc,then use 
> this collected data making some policy like scaling strategy further.
> The relation between Java Chassis and Java Chassis Metrics is similar to 
> Spring boot and Spring boot actuator.



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


[jira] [Commented] (SCB-311) Support Record Custom Metrics in Java Chassis Itself

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-311:


zhengyangyong closed pull request #535: [SCB-311] Support Record Custom Metrics 
in Java Chassis Itself
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/535
 
 
   

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-common/src/main/java/org/apache/servicecomb/foundation/common/utils/CustomMetricsUtils.java
 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/CustomMetricsUtils.java
new file mode 100644
index 0..1ae700f78
--- /dev/null
+++ 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/CustomMetricsUtils.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.foundation.common.utils;
+
+import org.apache.servicecomb.foundation.metrics.CounterEvent;
+import org.apache.servicecomb.foundation.metrics.GaugeEvent;
+import org.apache.servicecomb.foundation.metrics.WindowCounterEvent;
+
+public final class CustomMetricsUtils {
+  public static void incrementCounter(String name) {
+EventUtils.triggerEvent(new CounterEvent(name));
+  }
+
+  public static void incrementCounter(String name, long value) {
+EventUtils.triggerEvent(new CounterEvent(name, value));
+  }
+
+  public static void decrementCounter(String name) {
+EventUtils.triggerEvent(new CounterEvent(name, -1));
+  }
+
+  public static void updateGauge(String name, double value) {
+EventUtils.triggerEvent(new GaugeEvent(name, value));
+  }
+
+  /**
+   WindowCounter is complex Window Time-related Step Counter,
+   It will output total,count,tps,rate,average,max and min
+   examples:
+   if record four time in one window,and window time = 2000 (2 seconds), like :
+   recordWindowCounter("Order Amount",100)
+   recordWindowCounter("Order Amount",200)
+   recordWindowCounter("Order Amount",300)
+   recordWindowCounter("Order Amount",400)
+
+   Output metrics include:
+   Order Amount.total = 1000
+   Order Amount.count = 4
+   Order Amount.tps = 2   count / time(second)
+   Order Amount.rate = 500total / time(second
+   Order Amount.average = 250 total / count
+   Order Amount.max = 400
+   Order Amount.min = 100
+   */
+  public static void recordWindowCounter(String name, long value) {
+EventUtils.triggerEvent(new WindowCounterEvent(name, value));
+  }
+}
diff --git 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/metrics/CounterEvent.java
 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/metrics/CounterEvent.java
new file mode 100644
index 0..3691f8d97
--- /dev/null
+++ 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/metrics/CounterEvent.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 file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.foundation.metrics;
+
+import org.apache.servicecomb.foundation.common.event.Event;
+
+public class CounterEvent implements 

[jira] [Created] (SCB-319) Show the error details in scfrontend

2018-01-29 Thread little-cui (JIRA)
little-cui created SCB-319:
--

 Summary: Show the error details in scfrontend
 Key: SCB-319
 URL: https://issues.apache.org/jira/browse/SCB-319
 Project: Apache ServiceComb
  Issue Type: Improvement
  Components: Service-Center
Reporter: little-cui
Assignee: Mohammad Asif Siddiqui
 Fix For: service-center-1.0.0-m2






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


[jira] [Commented] (SCB-269) Dependency use domain-project-env level lock

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SCB-269:


little-cui closed pull request #258: SCB-269 remove lock for dependency handle
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/258
 
 
   

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/pkg/tree/tree.go b/pkg/tree/tree.go
new file mode 100644
index ..ca3136ac
--- /dev/null
+++ b/pkg/tree/tree.go
@@ -0,0 +1,67 @@
+package tree
+
+//The tree is binary sort tree
+type tree struct {
+   root *Node
+   isAddToLeft func(node *Node, addRes interface{}) bool
+}
+
+func NewTree(isAddToLeft func(node *Node, addRes interface{}) bool) *tree {
+   return {
+   isAddToLeft: isAddToLeft,
+   }
+}
+
+type Node struct {
+   Res interface{}
+   left, right *Node
+}
+
+func (t *tree) GetRoot()*Node {
+   return t.root
+}
+
+//add res into tree
+func (t *tree) AddNode(res interface{}) *Node {
+   return t.addNode(t.root, res)
+}
+
+func (t *tree) addNode(n *Node, res interface{}) *Node{
+   if n == nil {
+   n = new(Node)
+   n.Res = res
+   if t.root == nil {
+   t.root = n
+   }
+   return n
+   }
+   if t.isAddToLeft(n, res) {
+   n.left = t.addNode(n.left, res)
+   } else {
+   n.right = t.addNode(n.right, res)
+   }
+   return n
+}
+
+//middle oder traversal, handle is the func that deals with the res, n is the 
start node to traversal
+func (t *tree) InOrderTraversal(n *Node, handle func(res interface{}) error) 
error {
+   if n == nil {
+   return nil
+   }
+
+   err := t.InOrderTraversal(n.left, handle)
+   if err != nil {
+   return err
+   }
+   err = handle(n.Res)
+   if err != nil {
+   return err
+   }
+   err = t.InOrderTraversal(n.right, handle)
+   if err != nil {
+   return err
+   }
+   return nil
+}
+
+//todo add asynchronous handle handle func: go handle
\ No newline at end of file
diff --git a/pkg/tree/tree_test.go b/pkg/tree/tree_test.go
new file mode 100644
index ..902b14a4
--- /dev/null
+++ b/pkg/tree/tree_test.go
@@ -0,0 +1,39 @@
+package tree
+
+import (
+   "fmt"
+   "testing"
+   "reflect"
+)
+
+func TestTree(t *testing.T) {
+   compareFunc := func(node *Node, addRes interface{}) bool {
+   k := addRes.(int)
+   kCompare := node.Res.(int)
+   if k > kCompare {
+   return false
+   }
+   return true
+   }
+   testSlice := []int{6,3,7,2,4,5}
+   targetSlice := []int{2,3,4,5,6,7}
+   slice := testSlice[:0]
+   handle := func(res interface{}) error {
+   slice = append(slice, res.(int))
+   return nil
+   }
+
+
+   testTree := NewTree(compareFunc)
+
+   for _, v := range testSlice {
+   testTree.AddNode(v)
+   }
+
+
+   testTree.InOrderTraversal(testTree.GetRoot(), handle)
+   if !reflect.DeepEqual(slice, targetSlice) {
+   fmt.Printf(`TestTree failed`)
+   t.FailNow()
+   }
+}
\ No newline at end of file
diff --git a/server/service/event/dependency_event_handler.go 
b/server/service/event/dependency_event_handler.go
index d1bd3118..67f2d465 100644
--- a/server/service/event/dependency_event_handler.go
+++ b/server/service/event/dependency_event_handler.go
@@ -30,6 +30,7 @@ import (
"github.com/coreos/etcd/mvcc/mvccpb"
"golang.org/x/net/context"
"time"
+   "github.com/apache/incubator-servicecomb-service-center/pkg/tree"
 )
 
 type DependencyEventHandler struct {
@@ -104,6 +105,15 @@ func NewDependencyEventHandlerResource(dep 
*pb.ConsumerDependency, kv *mvccpb.Ke
}
 }
 
+func isAddToLeft(centerNode *tree.Node, addRes interface{}) bool {
+   res := addRes.(*DependencyEventHandlerResource)
+   compareRes := centerNode.Res.(*DependencyEventHandlerResource)
+   if res.kv.ModRevision > compareRes.kv.ModRevision {
+   return false
+   }
+   return true
+}
+
 func (h *DependencyEventHandler) Handle() error {
key := core.GetServiceDependencyQueueRootKey("")
resp, err := 
store.Store().DependencyQueue().Search(context.Background(),
@@ -119,10 +129,10 @@ func (h *DependencyEventHandler) Handle() error {
return nil
}
 
-   lenKvs := len(resp.Kvs)
-   resourcesMap := make(map[string][]*DependencyEventHandlerResource, 
lenKvs)
-