[GitHub] wujimin commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
wujimin commented on issue #732: SCB-333 Update to support the date time with 
JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-392644183
 
 
   Unit Test
   Integration Test
   :)


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
coveralls commented on issue #732: SCB-333 Update to support the date time with 
JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-392577004
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17205068/badge)](https://coveralls.io/builds/17205068)
   
   Coverage increased (+0.02%) to 87.549% when pulling 
**3cb79ac1eab758ad6d14e84b9bce74df629d2f88 on zhfeng:SCB-333** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] zhfeng commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
zhfeng commented on issue #732: SCB-333 Update to support the date time with 
JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-392642646
 
 
   @wujimin I'm not very sure what the UT and the IT means ?


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


With regards,
Apache Git Services


[GitHub] wujimin commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
wujimin commented on issue #732: SCB-333 Update to support the date time with 
JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-392641531
 
 
   1.RestObjectMapper is for RESTful codec, it's better to add UT for it.
   2.this is just for codec, i'm not sure if we can generate swagger from 
JSR-310 dataTypes
 so it's better to add UT and IT for new dataTypes.


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


With regards,
Apache Git Services


[GitHub] zhfeng commented on a change in pull request #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
zhfeng commented on a change in pull request #732: SCB-333 Update to support 
the date time with JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#discussion_r191293329
 
 

 ##
 File path: 
foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJsonUtils.java
 ##
 @@ -0,0 +1,42 @@
+/*
+ * 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.junit.Test;
+
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.Period;
+
+public class TestJsonUtils {
+@Test
+public void testJSR310() throws Exception {
+String period = "\"P1Y1M2D\"";
+String duration = "\"P1DT1H2M3S\"";
+String offsetDateTime = "\"2018-05-28T11:00:00+08:00\"";
+String localDate = "\"2018-05-28\"";
+String localDateTime = "\"2018-05-28T11:00:00\"";
+
+JsonUtils.OBJ_MAPPER.readValue(period, Period.class);
 
 Review comment:
   Ok, it makes sense.


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
WillemJiang commented on a change in pull request #732: SCB-333 Update to 
support the date time with JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#discussion_r191290212
 
 

 ##
 File path: 
foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJsonUtils.java
 ##
 @@ -0,0 +1,42 @@
+/*
+ * 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.junit.Test;
+
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.Period;
+
+public class TestJsonUtils {
+@Test
+public void testJSR310() throws Exception {
+String period = "\"P1Y1M2D\"";
+String duration = "\"P1DT1H2M3S\"";
+String offsetDateTime = "\"2018-05-28T11:00:00+08:00\"";
+String localDate = "\"2018-05-28\"";
+String localDateTime = "\"2018-05-28T11:00:00\"";
+
+JsonUtils.OBJ_MAPPER.readValue(period, Period.class);
 
 Review comment:
   I think we need to verify the value of object here.


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


With regards,
Apache Git Services


[incubator-servicecomb-service-center] branch master updated: SCB-620 Add registry server HC machanism (#357)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new af903ae  SCB-620 Add registry server HC machanism (#357)
af903ae is described below

commit af903ae9facec5541af9bc785a16394312545fa2
Author: little-cui 
AuthorDate: Tue May 29 09:46:39 2018 +0800

SCB-620 Add registry server HC machanism (#357)
---
 server/plugin/infra/registry/etcd/etcd.go  | 122 +++--
 server/plugin/infra/registry/etcd/etcd_test.go |   2 +-
 server/plugin/infra/registry/etcd/tracing.go   |   2 +-
 3 files changed, 96 insertions(+), 30 deletions(-)

diff --git a/server/plugin/infra/registry/etcd/etcd.go 
b/server/plugin/infra/registry/etcd/etcd.go
index 8522782..9243edb 100644
--- a/server/plugin/infra/registry/etcd/etcd.go
+++ b/server/plugin/infra/registry/etcd/etcd.go
@@ -36,12 +36,14 @@ import (
 )
 
 const (
-   CONNECT_MANAGER_SERVER_TIMEOUT = 10
+   connectRegistryServerTimeout = 10 * time.Second
+   healthCheckTimeout   = 5 * time.Second
+   healthCheckRetryTimes= 3
 )
 
 var (
clientTLSConfig *tls.Config
-   endpointstring
+   firstEndpoint   string
 )
 
 func init() {
@@ -50,9 +52,11 @@ func init() {
 }
 
 type EtcdClient struct {
-   Client *clientv3.Client
-   errchan error
-   ready  chan int
+   Endpoints []string
+   Client*clientv3.Client
+   err   chan error
+   ready chan int
+   goroutine *util.GoRoutine
 }
 
 func (s *EtcdClient) Err() <-chan error {
@@ -64,6 +68,8 @@ func (s *EtcdClient) Ready() <-chan int {
 }
 
 func (s *EtcdClient) Close() {
+   s.goroutine.Close(true)
+
if s.Client != nil {
s.Client.Close()
}
@@ -561,6 +567,74 @@ func (c *EtcdClient) Watch(ctx context.Context, opts 
...registry.PluginOpOption)
return fmt.Errorf("no key has been watched")
 }
 
+func (c *EtcdClient) HealthCheck(ctx context.Context) {
+   retries := healthCheckRetryTimes
+   inv, err := time.ParseDuration(core.ServerInfo.Config.AutoSyncInterval)
+   if err != nil {
+   util.Logger().Errorf(err, "invalid auto sync interval '%s'.", 
core.ServerInfo.Config.AutoSyncInterval)
+   return
+   }
+hcLoop:
+   for {
+   select {
+   case <-ctx.Done():
+   return
+   case <-time.After(inv):
+   var err error
+   for i := 0; i < retries; i++ {
+   if err = c.SyncMembers(); err != nil {
+   select {
+   case <-ctx.Done():
+   return
+   case 
<-time.After(util.GetBackoff().Delay(i)):
+   continue
+   }
+   }
+   retries = healthCheckRetryTimes
+   continue hcLoop
+   }
+
+   retries = 1 // fail fast
+   client, cerr := newClient(c.Endpoints)
+   if cerr != nil {
+   util.Logger().Errorf(cerr, "re-get etcd client 
%v failed.", c.Endpoints)
+   continue
+   }
+   cerr = c.Client.Close()
+   if cerr != nil {
+   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
+   }
+   c.Client = client
+
+   util.Logger().Errorf(err, "Auto sync etcd members 
failed and re-connected etcd successfully")
+   }
+   }
+}
+
+func (c *EtcdClient) parseEndpoints() {
+   addrs := strings.Split(registry.RegistryConfig().ClusterAddresses, ",")
+
+   endpoints := make([]string, 0, len(addrs))
+   for _, addr := range addrs {
+   if strings.Index(addr, "://") > 0 {
+   // 如果配置格式为"sr-0=http(s)://IP:Port",则需要分离IP:Port部分
+   endpoints = append(endpoints, addr[strings.Index(addr, 
"://")+3:])
+   } else {
+   endpoints = append(endpoints, addr)
+   }
+   }
+
+   c.Endpoints = endpoints
+}
+
+func (c *EtcdClient) SyncMembers() error {
+   ctx, _ := context.WithTimeout(c.Client.Ctx(), healthCheckTimeout)
+   if err := c.Client.Sync(ctx); err != nil && err != c.Client.Ctx().Err() 
{
+   return err
+   }
+   return nil
+}
+
 func dispatch(evts []*clientv3.Event, cb registry.WatchCallback) error {
l := len(evts)
kvs := 

[incubator-servicecomb-service-center] branch master updated: SCB-619 find instance ,when consumer's provider rule more exist,then … (#356)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 74cd79c  SCB-619 find instance ,when consumer's provider rule more 
exist,then … (#356)
74cd79c is described below

commit 74cd79c0eae2d1d39eee9c3014f895eaed2c04ff
Author: aseTo2016 <1473442...@qq.com>
AuthorDate: Tue May 29 09:47:00 2018 +0800

SCB-619 find instance ,when consumer's provider rule more exist,then … 
(#356)

* SCB-619 find instance ,when consumer's provider rule more exist,then 
return

* SCB-619 find instance ,when consumer's provider rule more exist,then 
return

* SCB-619 find instance ,when consumer's provider rule more exist,then 
return
---
 server/service/util/dependency.go  | 21 -
 server/service/util/dependency_test.go | 11 +--
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/server/service/util/dependency.go 
b/server/service/util/dependency.go
index 330473a..3263841 100644
--- a/server/service/util/dependency.go
+++ b/server/service/util/dependency.go
@@ -160,18 +160,29 @@ func GetProviderIdsByConsumer(ctx context.Context, 
domainProject string, service
return providerIds[:allowIdx], providerIds[denyIdx:], nil
 }
 
-func ProviderDependencyRuleExist(ctx context.Context, provider 
*pb.MicroServiceKey, consumer *pb.MicroServiceKey) (bool, error) {
+func DependencyRuleExist(ctx context.Context, provider *pb.MicroServiceKey, 
consumer *pb.MicroServiceKey) (bool, error) {
targetDomainProject := provider.Tenant
if len(targetDomainProject) == 0 {
targetDomainProject = consumer.Tenant
}
+
+   consumerKey := 
apt.GenerateConsumerDependencyRuleKey(targetDomainProject, consumer)
+   existed, err := dependencyRuleExistUtil(ctx, consumerKey, provider)
+   if err != nil || existed {
+   return existed, err
+   }
+
providerKey := 
apt.GenerateProviderDependencyRuleKey(targetDomainProject, provider)
-   consumers, err := TransferToMicroServiceDependency(ctx, providerKey)
+   return dependencyRuleExistUtil(ctx, providerKey, consumer)
+}
+
+func dependencyRuleExistUtil(ctx context.Context, key string, target 
*pb.MicroServiceKey) (bool, error) {
+   compareData, err := TransferToMicroServiceDependency(ctx, key)
if err != nil {
return false, err
}
-   if len(consumers.Dependency) != 0 {
-   isEqual, err := containServiceDependency(consumers.Dependency, 
consumer)
+   if len(compareData.Dependency) != 0 {
+   isEqual, err := 
containServiceDependency(compareData.Dependency, target)
if err != nil {
return false, err
}
@@ -186,7 +197,7 @@ func ProviderDependencyRuleExist(ctx context.Context, 
provider *pb.MicroServiceK
 func AddServiceVersionRule(ctx context.Context, domainProject string, consumer 
*pb.MicroService, provider *pb.MicroServiceKey) error {
//创建依赖一致
consumerKey := pb.MicroServiceToKey(domainProject, consumer)
-   exist, err := ProviderDependencyRuleExist(ctx, provider, consumerKey)
+   exist, err := DependencyRuleExist(ctx, provider, consumerKey)
if exist || err != nil {
return err
}
diff --git a/server/service/util/dependency_test.go 
b/server/service/util/dependency_test.go
index d28b0f1..d328190 100644
--- a/server/service/util/dependency_test.go
+++ b/server/service/util/dependency_test.go
@@ -218,6 +218,13 @@ func TestBadParamsResponse(t *testing.T) {
}
 }
 
+func TestDependencyRuleExistUtil(t *testing.T) {
+   _, err := dependencyRuleExistUtil(context.Background(), "", 
{})
+   if err == nil {
+   t.Fatalf(`dependencyRuleExistUtil failed`)
+   }
+}
+
 func TestParamsChecker(t *testing.T) {
p := ParamsChecker(nil, nil)
if p == nil || p.Response.Code == proto.Response_SUCCESS {
@@ -269,12 +276,12 @@ func TestParamsChecker(t *testing.T) {
 }
 
 func TestServiceDependencyRuleExist(t *testing.T) {
-   _, err := 
ProviderDependencyRuleExist(util.SetContext(context.Background(), "cacheOnly", 
"1"), {}, {})
+   _, err := DependencyRuleExist(util.SetContext(context.Background(), 
"cacheOnly", "1"), {}, {})
if err != nil {
t.Fatalf(`ServiceDependencyRuleExist WithCacheOnly failed`)
}
 
-   _, err = ProviderDependencyRuleExist(context.Background(), 
{}, {})
+   _, err = DependencyRuleExist(context.Background(), 
{}, {})
if err == nil {
t.Fatalf(`ServiceDependencyRuleExist failed`)
}

-- 
To stop receiving notification emails like this one, please contact
little...@apache.org.


[GitHub] little-cui closed pull request #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
little-cui closed pull request #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/356
 
 
   

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/service/util/dependency.go 
b/server/service/util/dependency.go
index 330473ae..3263841e 100644
--- a/server/service/util/dependency.go
+++ b/server/service/util/dependency.go
@@ -160,18 +160,29 @@ func GetProviderIdsByConsumer(ctx context.Context, 
domainProject string, service
return providerIds[:allowIdx], providerIds[denyIdx:], nil
 }
 
-func ProviderDependencyRuleExist(ctx context.Context, provider 
*pb.MicroServiceKey, consumer *pb.MicroServiceKey) (bool, error) {
+func DependencyRuleExist(ctx context.Context, provider *pb.MicroServiceKey, 
consumer *pb.MicroServiceKey) (bool, error) {
targetDomainProject := provider.Tenant
if len(targetDomainProject) == 0 {
targetDomainProject = consumer.Tenant
}
+
+   consumerKey := 
apt.GenerateConsumerDependencyRuleKey(targetDomainProject, consumer)
+   existed, err := dependencyRuleExistUtil(ctx, consumerKey, provider)
+   if err != nil || existed {
+   return existed, err
+   }
+
providerKey := 
apt.GenerateProviderDependencyRuleKey(targetDomainProject, provider)
-   consumers, err := TransferToMicroServiceDependency(ctx, providerKey)
+   return dependencyRuleExistUtil(ctx, providerKey, consumer)
+}
+
+func dependencyRuleExistUtil(ctx context.Context, key string, target 
*pb.MicroServiceKey) (bool, error) {
+   compareData, err := TransferToMicroServiceDependency(ctx, key)
if err != nil {
return false, err
}
-   if len(consumers.Dependency) != 0 {
-   isEqual, err := containServiceDependency(consumers.Dependency, 
consumer)
+   if len(compareData.Dependency) != 0 {
+   isEqual, err := 
containServiceDependency(compareData.Dependency, target)
if err != nil {
return false, err
}
@@ -186,7 +197,7 @@ func ProviderDependencyRuleExist(ctx context.Context, 
provider *pb.MicroServiceK
 func AddServiceVersionRule(ctx context.Context, domainProject string, consumer 
*pb.MicroService, provider *pb.MicroServiceKey) error {
//创建依赖一致
consumerKey := pb.MicroServiceToKey(domainProject, consumer)
-   exist, err := ProviderDependencyRuleExist(ctx, provider, consumerKey)
+   exist, err := DependencyRuleExist(ctx, provider, consumerKey)
if exist || err != nil {
return err
}
diff --git a/server/service/util/dependency_test.go 
b/server/service/util/dependency_test.go
index d28b0f1d..d328190f 100644
--- a/server/service/util/dependency_test.go
+++ b/server/service/util/dependency_test.go
@@ -218,6 +218,13 @@ func TestBadParamsResponse(t *testing.T) {
}
 }
 
+func TestDependencyRuleExistUtil(t *testing.T) {
+   _, err := dependencyRuleExistUtil(context.Background(), "", 
{})
+   if err == nil {
+   t.Fatalf(`dependencyRuleExistUtil failed`)
+   }
+}
+
 func TestParamsChecker(t *testing.T) {
p := ParamsChecker(nil, nil)
if p == nil || p.Response.Code == proto.Response_SUCCESS {
@@ -269,12 +276,12 @@ func TestParamsChecker(t *testing.T) {
 }
 
 func TestServiceDependencyRuleExist(t *testing.T) {
-   _, err := 
ProviderDependencyRuleExist(util.SetContext(context.Background(), "cacheOnly", 
"1"), {}, {})
+   _, err := DependencyRuleExist(util.SetContext(context.Background(), 
"cacheOnly", "1"), {}, {})
if err != nil {
t.Fatalf(`ServiceDependencyRuleExist WithCacheOnly failed`)
}
 
-   _, err = ProviderDependencyRuleExist(context.Background(), 
{}, {})
+   _, err = DependencyRuleExist(context.Background(), 
{}, {})
if err == nil {
t.Fatalf(`ServiceDependencyRuleExist failed`)
}


 


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


With regards,
Apache Git Services


[GitHub] little-cui closed pull request #357: SCB-620 Add registry server HC machanism

2018-05-28 Thread GitBox
little-cui closed pull request #357: SCB-620 Add registry server HC machanism
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/357
 
 
   

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

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

diff --git a/server/plugin/infra/registry/etcd/etcd.go 
b/server/plugin/infra/registry/etcd/etcd.go
index 85227827..9243edbd 100644
--- a/server/plugin/infra/registry/etcd/etcd.go
+++ b/server/plugin/infra/registry/etcd/etcd.go
@@ -36,12 +36,14 @@ import (
 )
 
 const (
-   CONNECT_MANAGER_SERVER_TIMEOUT = 10
+   connectRegistryServerTimeout = 10 * time.Second
+   healthCheckTimeout   = 5 * time.Second
+   healthCheckRetryTimes= 3
 )
 
 var (
clientTLSConfig *tls.Config
-   endpointstring
+   firstEndpoint   string
 )
 
 func init() {
@@ -50,9 +52,11 @@ func init() {
 }
 
 type EtcdClient struct {
-   Client *clientv3.Client
-   errchan error
-   ready  chan int
+   Endpoints []string
+   Client*clientv3.Client
+   err   chan error
+   ready chan int
+   goroutine *util.GoRoutine
 }
 
 func (s *EtcdClient) Err() <-chan error {
@@ -64,6 +68,8 @@ func (s *EtcdClient) Ready() <-chan int {
 }
 
 func (s *EtcdClient) Close() {
+   s.goroutine.Close(true)
+
if s.Client != nil {
s.Client.Close()
}
@@ -561,6 +567,74 @@ func (c *EtcdClient) Watch(ctx context.Context, opts 
...registry.PluginOpOption)
return fmt.Errorf("no key has been watched")
 }
 
+func (c *EtcdClient) HealthCheck(ctx context.Context) {
+   retries := healthCheckRetryTimes
+   inv, err := time.ParseDuration(core.ServerInfo.Config.AutoSyncInterval)
+   if err != nil {
+   util.Logger().Errorf(err, "invalid auto sync interval '%s'.", 
core.ServerInfo.Config.AutoSyncInterval)
+   return
+   }
+hcLoop:
+   for {
+   select {
+   case <-ctx.Done():
+   return
+   case <-time.After(inv):
+   var err error
+   for i := 0; i < retries; i++ {
+   if err = c.SyncMembers(); err != nil {
+   select {
+   case <-ctx.Done():
+   return
+   case 
<-time.After(util.GetBackoff().Delay(i)):
+   continue
+   }
+   }
+   retries = healthCheckRetryTimes
+   continue hcLoop
+   }
+
+   retries = 1 // fail fast
+   client, cerr := newClient(c.Endpoints)
+   if cerr != nil {
+   util.Logger().Errorf(cerr, "re-get etcd client 
%v failed.", c.Endpoints)
+   continue
+   }
+   cerr = c.Client.Close()
+   if cerr != nil {
+   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
+   }
+   c.Client = client
+
+   util.Logger().Errorf(err, "Auto sync etcd members 
failed and re-connected etcd successfully")
+   }
+   }
+}
+
+func (c *EtcdClient) parseEndpoints() {
+   addrs := strings.Split(registry.RegistryConfig().ClusterAddresses, ",")
+
+   endpoints := make([]string, 0, len(addrs))
+   for _, addr := range addrs {
+   if strings.Index(addr, "://") > 0 {
+   // 如果配置格式为"sr-0=http(s)://IP:Port",则需要分离IP:Port部分
+   endpoints = append(endpoints, addr[strings.Index(addr, 
"://")+3:])
+   } else {
+   endpoints = append(endpoints, addr)
+   }
+   }
+
+   c.Endpoints = endpoints
+}
+
+func (c *EtcdClient) SyncMembers() error {
+   ctx, _ := context.WithTimeout(c.Client.Ctx(), healthCheckTimeout)
+   if err := c.Client.Sync(ctx); err != nil && err != c.Client.Ctx().Err() 
{
+   return err
+   }
+   return nil
+}
+
 func dispatch(evts []*clientv3.Event, cb registry.WatchCallback) error {
l := len(evts)
kvs := make([]*mvccpb.KeyValue, l)
@@ -624,20 +698,13 @@ func NewRegistry() mgr.PluginInstance {
util.Logger().Warnf(nil, "starting service center in proxy mode")
 
inst := {
-   err:   make(chan error, 1),
-   ready: make(chan int),
+   err:   make(chan error, 1),
+   ready: make(chan int),
+   

[GitHub] codecov-io commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
codecov-io commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529026
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=h1)
 Report
   > Merging 
[#356](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/f9b93192203f1b4cd6539c52428f993e7aaba593?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `81.81%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/graphs/tree.svg?height=150=650=GAaF7zrg8R=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #356  +/-   ##
   ==
   + Coverage   69.67%   69.69%   +0.02% 
   ==
 Files  18   18  
 Lines3406 3412   +6 
   ==
   + Hits 2373 2378   +5 
 Misses868  868  
   - Partials  165  166   +1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `56.77% <81.81%> (+0.39%)` | :arrow_up: |
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | `68.58% <0%> (-0.2%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?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/356?src=pr=footer).
 Last update 
[f9b9319...bca2e0d](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
coveralls commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17204149/badge)](https://coveralls.io/builds/17204149)
   
   Coverage decreased (-0.05%) to 73.312% when pulling 
**bca2e0d05245aa5347967ebf30ca1821015b8744 on aseTo2016:master** into 
**f9b93192203f1b4cd6539c52428f993e7aaba593 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-28 Thread GitBox
coveralls commented on issue #732: SCB-333 Update to support the date time with 
JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-392577004
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17200317/badge)](https://coveralls.io/builds/17200317)
   
   Coverage decreased (-0.004%) to 87.522% when pulling 
**29de7f9cadafb4c7220b2ac9bd2bb018eaeb on zhfeng:SCB-333** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-28 Thread GitBox
coveralls commented on issue #731: [SCB-617] Graceful shutdown with standalone 
tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#issuecomment-392573045
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17200095/badge)](https://coveralls.io/builds/17200095)
   
   Coverage increased (+0.03%) to 87.552% when pulling 
**8c7a3188384b72729ac198b823fac064f25d5a81 on 
wujimin:graceful-shutdown-with-standalone-tomcat** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] zhfeng opened a new pull request #732: SCB-333 Update to support the date time with JSR-310

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


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #357: SCB-620 Add registry server HC machanism

2018-05-28 Thread GitBox
codecov-io commented on issue #357: SCB-620 Add registry server HC machanism
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/357#issuecomment-392552503
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357?src=pr=h1)
 Report
   > Merging 
[#357](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/f9b93192203f1b4cd6539c52428f993e7aaba593?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #357   +/-   ##
   ===
 Coverage   69.67%   69.67%   
   ===
 Files  18   18   
 Lines3406 3406   
   ===
 Hits 2373 2373   
 Misses868  868   
 Partials  165  165
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357?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/357?src=pr=footer).
 Last update 
[f9b9319...8b39444](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/357?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] little-cui opened a new pull request #357: SCB-620 Add registry server HC machanism

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


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
codecov-io commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529026
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=h1)
 Report
   > Merging 
[#356](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/f9b93192203f1b4cd6539c52428f993e7aaba593?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `81.81%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/graphs/tree.svg?height=150=650=GAaF7zrg8R=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #356  +/-   ##
   ==
   + Coverage   69.67%   69.69%   +0.02% 
   ==
 Files  18   18  
 Lines3406 3412   +6 
   ==
   + Hits 2373 2378   +5 
 Misses868  868  
   - Partials  165  166   +1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `56.77% <81.81%> (+0.39%)` | :arrow_up: |
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | `68.58% <0%> (-0.2%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?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/356?src=pr=footer).
 Last update 
[f9b9319...a0657ed](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
coveralls commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17197352/badge)](https://coveralls.io/builds/17197352)
   
   Coverage decreased (-0.06%) to 73.301% when pulling 
**a0657ed0423a3ab4330093ff2fd6e6909c29e8d1 on aseTo2016:master** into 
**f9b93192203f1b4cd6539c52428f993e7aaba593 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
coveralls commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17197110/badge)](https://coveralls.io/builds/17197110)
   
   Coverage decreased (-0.3%) to 73.053% when pulling 
**53884cdea8c12cc5e2a7e40fb6a80d71592afce0 on aseTo2016:master** into 
**f9b93192203f1b4cd6539c52428f993e7aaba593 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

2018-05-28 Thread GitBox
codecov-io commented on issue #356: SCB-619 find instance ,when consumer's 
provider rule more exist,then …
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/356#issuecomment-392529026
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=h1)
 Report
   > Merging 
[#356](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/f9b93192203f1b4cd6539c52428f993e7aaba593?src=pr=desc)
 will **decrease** coverage by `0.17%`.
   > The diff coverage is `50%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #356  +/-   ##
   ==
   - Coverage   69.67%   69.49%   -0.18% 
   ==
 Files  18   18  
 Lines3406 3416  +10 
   ==
   + Hits 2373 2374   +1 
   - Misses868  874   +6 
   - Partials  165  168   +3
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `55.82% <50%> (-0.56%)` | :arrow_down: |
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | `68.58% <0%> (-0.2%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?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/356?src=pr=footer).
 Last update 
[f9b9319...53884cd](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/356?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] aseTo2016 opened a new pull request #356: SCB-619 find instance ,when consumer's provider rule more exist,then …

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


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on issue #185: [SCB-245]: add acceptance test for dubbo demo

2018-05-28 Thread GitBox
WillemJiang commented on issue #185: [SCB-245]: add acceptance test for dubbo 
demo
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/185#issuecomment-392523599
 
 
   The PR is a part of #194 which is merged into the master branch, now we can 
close this PR.


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface 
(not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#issuecomment-392447423
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17194914/badge)](https://coveralls.io/builds/17194914)
   
   Coverage decreased (-0.03%) to 87.495% when pulling 
**551b6ba7bfa76ec9b19742f09105bd9d48385ca1 on zhengyangyong:SCB-562** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] zhengyangyong closed pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong closed pull request #729: [SCB-562] fix NPE when had empty 
interface (not have any method)
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/729
 
 
   

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

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

diff --git 
a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java 
b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
index 565290479..d88aba6d8 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
@@ -83,6 +83,12 @@ public String getPackageName() {
   }
 
   private void initOperations() {
+if (swagger.getPaths() == null) {
+  LOGGER.error(swagger.getInfo().getTitle() + " with path " + 
swagger.getBasePath()
+  + " is an empty interface, please delete it or fill with one 
method!");
+  return;
+}
+
 for (Entry entry : swagger.getPaths().entrySet()) {
   String strPath = entry.getKey();
   Path path = entry.getValue();


 


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


With regards,
Apache Git Services


[GitHub] zhengyangyong opened a new pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong opened a new pull request #729: [SCB-562] fix NPE when had empty 
interface (not have any method)
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/729
 
 
   Signed-off-by: zhengyangyong 
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [x] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   do not init operations if there are no path (empty interface) in 
swagger(prevent NPE)


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


With regards,
Apache Git Services


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

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git

commit f79d7ba50a5f857c05cdfa52eaba74119d17eef2
Merge: d4b2b6b 8c12ac9
Author: Willem Jiang 
AuthorDate: Mon May 28 17:43:05 2018 +0800

Merge branch 'master' into asf-site

 _data/navigation.yml|   2 +
 _users/cn/deploy-mode.md| 337 
 assets/images/DockerDeployment.png  | Bin 0 -> 68208 bytes
 assets/images/DockerPackageAssembly.png | Bin 0 -> 79706 bytes
 assets/images/K8S.png   | Bin 0 -> 150042 bytes
 assets/images/ServiceCombBasic.png  | Bin 0 -> 9778 bytes
 assets/images/ServiceCombInK8S.png  | Bin 0 -> 172082 bytes
 assets/images/SimpleDeployment.png  | Bin 0 -> 19863 bytes
 8 files changed, 339 insertions(+)


-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] branch asf-site updated (d4b2b6b -> 3292f81)

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a change to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git.


from d4b2b6b  Publish the website
 add 79c7106  add deploy mode cn
 add 06df9ee  fix style
 add 9c40e1f  add kubernetes part
 add 229cb8e  add kubernetes part
 add e4539ed  update content
 add 8c12ac9  fix style
 new f79d7ba  Merge branch 'master' into asf-site
 new 3292f81  Publish the website

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 _data/navigation.yml   |2 +
 _users/cn/deploy-mode.md   |  337 ++
 assets/images/DockerDeployment.png |  Bin 0 -> 68208 bytes
 assets/images/DockerPackageAssembly.png|  Bin 0 -> 79706 bytes
 assets/images/K8S.png  |  Bin 0 -> 150042 bytes
 assets/images/ServiceCombBasic.png |  Bin 0 -> 9778 bytes
 assets/images/ServiceCombInK8S.png |  Bin 0 -> 172082 bytes
 assets/images/SimpleDeployment.png |  Bin 0 -> 19863 bytes
 content/assets/images/DockerDeployment.png |  Bin 0 -> 68208 bytes
 content/assets/images/DockerPackageAssembly.png|  Bin 0 -> 79706 bytes
 content/assets/images/K8S.png  |  Bin 0 -> 150042 bytes
 content/assets/images/ServiceCombBasic.png |  Bin 0 -> 9778 bytes
 content/assets/images/ServiceCombInK8S.png |  Bin 0 -> 172082 bytes
 content/assets/images/SimpleDeployment.png |  Bin 0 -> 19863 bytes
 .../cn/users/application-boot-process/index.html   |8 +
 content/cn/users/communicate-protocol/index.html   |8 +
 content/cn/users/customized-tracing/index.html |8 +
 content/cn/users/deploy-mode/index.html| 1171 
 content/cn/users/develop-with-jax-rs/index.html|8 +
 .../cn/users/develop-with-rest-template/index.html |8 +
 content/cn/users/develop-with-rpc/index.html   |8 +
 .../develop-with-spring-boot-starter/index.html|8 +
 content/cn/users/develop-with-springmvc/index.html |8 +
 .../users/develop-with-transparent-rpc/index.html  |8 +
 content/cn/users/distributed-tracing/index.html|8 +
 content/cn/users/dynamic-config/index.html |8 +
 content/cn/users/edge-in-1.0.0-m1/index.html   |8 +
 content/cn/users/edging-service/nginx/index.html   |8 +
 content/cn/users/edging-service/zuul/index.html|8 +
 content/cn/users/healthcheck/index.html|8 +
 content/cn/users/index.html|8 +
 content/cn/users/invoke-control/index.html |8 +
 content/cn/users/local-develop-test/index.html |8 +
 .../index.html |8 +
 content/cn/users/metrics-in-0.5.0/index.html   |8 +
 content/cn/users/metrics-in-1.0.0-m1/index.html|8 +
 .../index.html |8 +
 .../index.html |8 +
 content/cn/users/run-mode/index.html   |8 +
 content/cn/users/service-configurations/index.html |8 +
 content/cn/users/service-contract/index.html   |8 +
 content/cn/users/service-definition/index.html |8 +
 content/cn/users/service-heartbeat/index.html  |8 +
 .../users/service-interface-constraints/index.html |8 +
 content/cn/users/setup-environment/index.html  |8 +
 content/cn/users/use-service-contract/index.html   |8 +
 content/cn/users/use-tls/index.html|8 +
 content/feed.xml   |2 +-
 content/sitemap.xml|  170 +--
 49 files changed, 1854 insertions(+), 84 deletions(-)
 create mode 100644 _users/cn/deploy-mode.md
 create mode 100644 assets/images/DockerDeployment.png
 create mode 100644 assets/images/DockerPackageAssembly.png
 create mode 100644 assets/images/K8S.png
 create mode 100644 assets/images/ServiceCombBasic.png
 create mode 100644 assets/images/ServiceCombInK8S.png
 create mode 100644 assets/images/SimpleDeployment.png
 create mode 100644 content/assets/images/DockerDeployment.png
 create mode 100644 content/assets/images/DockerPackageAssembly.png
 create mode 100644 content/assets/images/K8S.png
 create mode 100644 content/assets/images/ServiceCombBasic.png
 create mode 100644 content/assets/images/ServiceCombInK8S.png
 create mode 100644 content/assets/images/SimpleDeployment.png
 create mode 100644 content/cn/users/deploy-mode/index.html

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


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

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git

commit 3292f814ea8225bc7b9619a5312186fd9d579798
Author: Willem Jiang 
AuthorDate: Mon May 28 17:44:08 2018 +0800

Publish the website
---
 content/assets/images/DockerDeployment.png |  Bin 0 -> 68208 bytes
 content/assets/images/DockerPackageAssembly.png|  Bin 0 -> 79706 bytes
 content/assets/images/K8S.png  |  Bin 0 -> 150042 bytes
 content/assets/images/ServiceCombBasic.png |  Bin 0 -> 9778 bytes
 content/assets/images/ServiceCombInK8S.png |  Bin 0 -> 172082 bytes
 content/assets/images/SimpleDeployment.png |  Bin 0 -> 19863 bytes
 .../cn/users/application-boot-process/index.html   |8 +
 content/cn/users/communicate-protocol/index.html   |8 +
 content/cn/users/customized-tracing/index.html |8 +
 content/cn/users/deploy-mode/index.html| 1171 
 content/cn/users/develop-with-jax-rs/index.html|8 +
 .../cn/users/develop-with-rest-template/index.html |8 +
 content/cn/users/develop-with-rpc/index.html   |8 +
 .../develop-with-spring-boot-starter/index.html|8 +
 content/cn/users/develop-with-springmvc/index.html |8 +
 .../users/develop-with-transparent-rpc/index.html  |8 +
 content/cn/users/distributed-tracing/index.html|8 +
 content/cn/users/dynamic-config/index.html |8 +
 content/cn/users/edge-in-1.0.0-m1/index.html   |8 +
 content/cn/users/edging-service/nginx/index.html   |8 +
 content/cn/users/edging-service/zuul/index.html|8 +
 content/cn/users/healthcheck/index.html|8 +
 content/cn/users/index.html|8 +
 content/cn/users/invoke-control/index.html |8 +
 content/cn/users/local-develop-test/index.html |8 +
 .../index.html |8 +
 content/cn/users/metrics-in-0.5.0/index.html   |8 +
 content/cn/users/metrics-in-1.0.0-m1/index.html|8 +
 .../index.html |8 +
 .../index.html |8 +
 content/cn/users/run-mode/index.html   |8 +
 content/cn/users/service-configurations/index.html |8 +
 content/cn/users/service-contract/index.html   |8 +
 content/cn/users/service-definition/index.html |8 +
 content/cn/users/service-heartbeat/index.html  |8 +
 .../users/service-interface-constraints/index.html |8 +
 content/cn/users/setup-environment/index.html  |8 +
 content/cn/users/use-service-contract/index.html   |8 +
 content/cn/users/use-tls/index.html|8 +
 content/feed.xml   |2 +-
 content/sitemap.xml|  170 +--
 41 files changed, 1515 insertions(+), 84 deletions(-)

diff --git a/content/assets/images/DockerDeployment.png 
b/content/assets/images/DockerDeployment.png
new file mode 100644
index 000..bdb0530
Binary files /dev/null and b/content/assets/images/DockerDeployment.png differ
diff --git a/content/assets/images/DockerPackageAssembly.png 
b/content/assets/images/DockerPackageAssembly.png
new file mode 100644
index 000..d688bb6
Binary files /dev/null and b/content/assets/images/DockerPackageAssembly.png 
differ
diff --git a/content/assets/images/K8S.png b/content/assets/images/K8S.png
new file mode 100644
index 000..7c06ccb
Binary files /dev/null and b/content/assets/images/K8S.png differ
diff --git a/content/assets/images/ServiceCombBasic.png 
b/content/assets/images/ServiceCombBasic.png
new file mode 100644
index 000..4587e61
Binary files /dev/null and b/content/assets/images/ServiceCombBasic.png differ
diff --git a/content/assets/images/ServiceCombInK8S.png 
b/content/assets/images/ServiceCombInK8S.png
new file mode 100644
index 000..9e55e1d
Binary files /dev/null and b/content/assets/images/ServiceCombInK8S.png differ
diff --git a/content/assets/images/SimpleDeployment.png 
b/content/assets/images/SimpleDeployment.png
new file mode 100644
index 000..bc22b52
Binary files /dev/null and b/content/assets/images/SimpleDeployment.png differ
diff --git a/content/cn/users/application-boot-process/index.html 
b/content/cn/users/application-boot-process/index.html
index bc9a5c6..e9d0d18 100644
--- a/content/cn/users/application-boot-process/index.html
+++ b/content/cn/users/application-boot-process/index.html
@@ -587,6 +587,14 @@
 
 运行模式
   
+
+
+
+
+
+
+部署模式
+  
 
 
   
diff --git a/content/cn/users/communicate-protocol/index.html 
b/content/cn/users/communicate-protocol/index.html
index 4fc18d9..d12b4e2 100644
--- 

[GitHub] zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE 
when had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191162200
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   emmm, ok , add an error output in order to notice user like
   `swagger definition for org.apache.servicecomb.samples.uselog4j2.HelloImpl 
with path /hello is an empty interface, please delete it or fill with one 
method!`


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface 
(not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#issuecomment-392447423
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17194096/badge)](https://coveralls.io/builds/17194096)
   
   Coverage decreased (-0.009%) to 87.516% when pulling 
**5aa5298b502e3ef2f4e921a198fe18d3d9adbbc2 on zhengyangyong:SCB-562** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
WillemJiang commented on a change in pull request #729: [SCB-562] fix NPE when 
had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191158872
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   User cannot know what's wrong if we don't tell them. We should provide 
detail information if something is wrong.
   If he doesn't provide any operation here, and have some trouble to access 
the service, he will complain that there is no any clue for me to find the 
reason.  
   That is why we cannot swallow any exception when writing the code.


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE 
when had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191151310
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   good idea, done


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


With regards,
Apache Git Services


[GitHub] wujimin opened a new pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-28 Thread GitBox
wujimin opened a new pull request #731: [SCB-617] Graceful shutdown with 
standalone tomcat
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/731
 
 
   


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


With regards,
Apache Git Services


[GitHub] WillemJiang closed pull request #194: SCB-555 Add the dubbo demo into Saga accept test

2018-05-28 Thread GitBox
WillemJiang closed pull request #194: SCB-555 Add the dubbo demo into Saga 
accept test
URL: https://github.com/apache/incubator-servicecomb-saga/pull/194
 
 
   


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


With regards,
Apache Git Services


[incubator-servicecomb-saga] 08/13: docker plugin for mvn test

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit b07916ae48b921d258815295ae210ed14ef1a954
Author: wuzunqian 
AuthorDate: Tue May 15 00:58:21 2018 +0800

docker plugin for mvn test
---
 acceptance-tests/acceptance-dubbo-demo/pom.xml | 279 +
 .../acceptance/dubbodemo/DubboDemoStepdefs.java|   1 -
 .../src/main/resources/schema-mysql.sql|   6 +-
 saga-demo/pom.xml  |   5 +
 .../saga-dubbo-demo/docker-compose.mysql.yaml  | 106 +++-
 saga-demo/saga-dubbo-demo/docker-compose.yaml  |  73 ++
 saga-demo/saga-dubbo-demo/pom.xml  |  13 +-
 saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh   |   2 +-
 saga-demo/saga-dubbo-demo/service-api/pom.xml  |   5 -
 saga-demo/saga-dubbo-demo/servicea/pom.xml |  44 
 .../servicea/src/main/resources/application.yaml   |  31 ++-
 .../servicea/src/main/resources/jdbc.xml   |  44 +---
 .../servicea/src/main/resources/schema-mysql.sql   |  24 ++
 .../src/main/resources/schema-postgresql.sql   |  26 ++
 saga-demo/saga-dubbo-demo/serviceb/pom.xml |  44 
 .../serviceb/src/main/resources/application.yaml   |  25 +-
 .../serviceb/src/main/resources/jdbc.xml   |  43 +---
 .../serviceb/src/main/resources/schema-mysql.sql   |  24 ++
 .../src/main/resources/schema-postgresql.sql   |  26 ++
 saga-demo/saga-dubbo-demo/servicec/pom.xml |  44 
 .../servicec/src/main/resources/application.yaml   |  25 +-
 .../servicec/src/main/resources/jdbc.xml   |  43 +---
 .../servicec/src/main/resources/schema-mysql.sql   |  24 ++
 .../src/main/resources/schema-postgresql.sql   |  26 ++
 24 files changed, 849 insertions(+), 134 deletions(-)

diff --git a/acceptance-tests/acceptance-dubbo-demo/pom.xml 
b/acceptance-tests/acceptance-dubbo-demo/pom.xml
index 023a2d8..8dc7265 100644
--- a/acceptance-tests/acceptance-dubbo-demo/pom.xml
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -41,5 +41,284 @@
 
 
 
+
+
+docker
+
+
+
+io.fabric8
+docker-maven-plugin
+
+
+
+docker.io/zookeeper
+zookeeper
+
+
+zk.port:2181
+
+
+
+
+postgres
+postgres
+
+
+saga
+saga
+
password
+
+
+database system is ready to 
accept connections
+
+
+5432
+
+
+6
+
+
+postgres.port:5432
+
+
+
+
+
alpha-server:${project.version}
+alpha
+
+
+
+-Dspring.profiles.active=prd 
-Dspring.datasource.initialization-mode=always
+
+
+
+
postgres:postgresql.servicecomb.io
+
+
+Started [a-zA-Z]+ in [0-9.]+ 
seconds
+
+
+8080
+8090
+
+   

[incubator-servicecomb-saga] 12/13: SCB-555 Clean up the dock-componse file

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit a30370a51cc52e1d8b66de72728db8377c9eae2d
Author: Willem Jiang 
AuthorDate: Sat May 26 16:21:12 2018 +0800

SCB-555 Clean up the dock-componse file
---
 saga-demo/saga-dubbo-demo/docker-compose.yaml | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/saga-demo/saga-dubbo-demo/docker-compose.yaml 
b/saga-demo/saga-dubbo-demo/docker-compose.yaml
index b1e295c..3510f86 100644
--- a/saga-demo/saga-dubbo-demo/docker-compose.yaml
+++ b/saga-demo/saga-dubbo-demo/docker-compose.yaml
@@ -22,6 +22,8 @@ services:
   zookeeper:
 image: "docker.io/zookeeper"
 hostname: zookeeper
+ports:
+  - "2181:2181"
 
   database:
 image: "postgres"
@@ -42,8 +44,8 @@ services:
 image: "alpha-server:${TAG}"
 hostname: alpha-server
 ports:
-  - "8081:8080"
-  - "8091:8090"
+  - "8080:8080"
+  - "8090:8090"
 links:
   - "database:postgresql.servicecomb.io"
 environment:
@@ -121,4 +123,4 @@ services:
   - "8073:8073"
 depends_on:
   alpha:
-condition: service_healthy
\ No newline at end of file
+condition: service_healthy

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 10/13: SCB-555 Updated the log setting to info level

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 33164a15a75043ae72c45264910b67d2b6943511
Author: Willem Jiang 
AuthorDate: Sat May 26 16:13:16 2018 +0800

SCB-555 Updated the log setting to info level
---
 saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml | 2 +-
 saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml | 2 +-
 saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml 
b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml
index eb57a2d..cae04cb 100644
--- a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml
@@ -23,7 +23,7 @@
 
   
   
-
+
   
 
   
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml 
b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml
index eb57a2d..cae04cb 100644
--- a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml
@@ -23,7 +23,7 @@
 
   
   
-
+
   
 
   
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml 
b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml
index eb57a2d..cae04cb 100644
--- a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml
@@ -23,7 +23,7 @@
 
   
   
-
+
   
 
   

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 11/13: SCB-555 Fixed the test error with spring boot 2

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 3745bcfe93dd3b59e4faf42679799c2ae538d5ee
Author: Willem Jiang 
AuthorDate: Sat May 26 16:14:33 2018 +0800

SCB-555 Fixed the test error with spring boot 2
---
 acceptance-tests/acceptance-dubbo-demo/pom.xml |  8 +++-
 saga-demo/saga-dubbo-demo/pom.xml  | 16 
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/acceptance-tests/acceptance-dubbo-demo/pom.xml 
b/acceptance-tests/acceptance-dubbo-demo/pom.xml
index 8dc7265..85500d4 100644
--- a/acceptance-tests/acceptance-dubbo-demo/pom.xml
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -318,7 +318,13 @@
 
 
 
+
+spring-boot-2
+
+/actuator/info
+
+
 
 
 
-
\ No newline at end of file
+
diff --git a/saga-demo/saga-dubbo-demo/pom.xml 
b/saga-demo/saga-dubbo-demo/pom.xml
index a7d568b..af8cc4c 100644
--- a/saga-demo/saga-dubbo-demo/pom.xml
+++ b/saga-demo/saga-dubbo-demo/pom.xml
@@ -104,4 +104,20 @@
 mysql-connector-java
 -->
 
+
+
+spring-boot-2
+
+
${spring.boot2.version}
+
+
+
+
+log4j
+log4j
+1.2.17
+
+
+
+
 

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 02/13: SCB-555 Add saga-dubbo-demo README

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 877c4807a563d62ef89ae3c817533c40a6a2e245
Author: wuzunqian 
AuthorDate: Sun May 6 01:26:16 2018 +0800

SCB-555 Add saga-dubbo-demo README
---
 saga-demo/saga-dubbo-demo/README.md | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/saga-demo/saga-dubbo-demo/README.md 
b/saga-demo/saga-dubbo-demo/README.md
index 86ecbf6..1565b9d 100644
--- a/saga-demo/saga-dubbo-demo/README.md
+++ b/saga-demo/saga-dubbo-demo/README.md
@@ -16,13 +16,13 @@ You will need:
 
 ## Running Demo
 you can run saga-dubbo-demo as normal spring application
-1.init database: sql/schema-mysql.sql, and config database info by enviroment 
params
-enviroment params example:
--Ddatabase.url=jdbc:mysql://127.0.0.1:3306/saga_dubbo
--Ddatabase.username=root
--Ddatabase.password=***
--Dzookeeper.url=localhost:2181
--Dserver.port=8071
+1. init database: sql/schema-mysql.sql, and config database info by enviroment 
params   
+   enviroment params example:  
+ -Ddatabase.url=jdbc:mysql://127.0.0.1:3306/saga_dubbo  
+ -Ddatabase.username=root  
+ -Ddatabase.password=***  
+ -Dzookeeper.url=localhost:2181  
+ -Dserver.port=8071  
 
-2.config zookeeper url by enviroment param
-3.run servicea, serviceb, servicec,visit 
http://${servicea_host}:${servicea_port}
\ No newline at end of file
+2. config zookeeper url by enviroment param
+3. run servicea, serviceb, servicec,visit 
http://${servicea_host}:${servicea_port}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 04/13: fix result events unorder

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 0e851d86f046cad5140f611938d3c31146f42646
Author: wuzunqian 
AuthorDate: Thu May 10 16:50:23 2018 +0800

fix result events unorder
---
 .../acceptance/dubbodemo/DubboDemoStepdefs.java| 25 +-
 .../resources/AExceptionWhenAb_scenario.feature|  2 +-
 .../test/resources/AbAc_success_scenario.feature   |  2 +-
 .../test/resources/AbBc_success_scenario.feature   |  2 +-
 .../src/test/resources/Ab_success_scenario.feature |  2 +-
 .../resources/BExceptionWhenAb_scenario.feature|  2 +-
 .../resources/CExceptionWhenAbAc_scenario.feature  |  2 +-
 .../resources/CExceptionWhenAbBc_scenario.feature  |  2 +-
 8 files changed, 22 insertions(+), 17 deletions(-)

diff --git 
a/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
 
b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
index af6b7d1..80e503e 100644
--- 
a/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
+++ 
b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
@@ -77,16 +77,21 @@ public class DubboDemoStepdefs implements En {
 });
 
 Then("^Alpha records the following events$", (DataTable dataTable) -> {
-  Consumer[]> sortAndColumnStrippingConsumer = dataMap 
-> {
-//sort first
-Arrays.sort(dataMap, (o1, o2) -> {
-  Integer id1 = (Integer)o1.get("surrogateId");
-  Integer id2 = (Integer)o2.get("surrogateId");
-  if(id1 == null || id2 == null) return 0;
-  return id1.compareTo(id2);
-});
+  Consumer[]> sortAndColumnStrippingConsumer = 
dataMaps -> {
+//blur match: service for sagaEndedEvent may be unable to que
+for(Map dataMap : dataMaps){
+  LOG.info(dataMap.toString());
+  if(dataMap.values().contains("SagaEndedEvent")){
+for(String key : dataMap.keySet()){
+  if("SagaEndedEvent".equals(dataMap.get(key))){
+dataMap.put("serviceName", "*");
+break;
+  }
+}
+  }
+}
 //strip columns
-for (Map map : dataMap)
+for (Map map : dataMaps)
   map.keySet().retainAll(dataTable.topCells());
   };
 
@@ -131,7 +136,7 @@ public class DubboDemoStepdefs implements En {
 }
 
 LOG.info("Retrieved data {} from service", actualMaps);
-dataTable.diff(DataTable.create(actualMaps));
+dataTable.unorderedDiff(DataTable.create(actualMaps));
   }
 
   @SuppressWarnings("unchecked")
diff --git 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
index 2be4378..5622006 100644
--- 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
+++ 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
@@ -30,7 +30,7 @@ Feature: Alpha records transaction events
   | serviceb   | TxEndedEvent   |
   | servicea   | TxAbortedEvent |
   | serviceb | TxCompensatedEvent   |
-  | serviceb | SagaEndedEvent   |
+  | * | SagaEndedEvent   |
 
 And servicea success update status
   | service | vstatus |
diff --git 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
index 9ba638e..bb8ed91 100644
--- 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
+++ 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
@@ -32,7 +32,7 @@ Feature: Alpha records transaction events
   | servicec | TxStartedEvent   |
   | servicec | TxEndedEvent   |
   | servicea | TxEndedEvent   |
-  | servicea | SagaEndedEvent   |
+  | * | SagaEndedEvent   |
 
 And servicea success update status
   | service | vstatus |
diff --git 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
index 1af54fc..4d3739e 100644
--- 
a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
+++ 
b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
@@ -32,7 +32,7 @@ Feature: Alpha records transaction events
  

[incubator-servicecomb-saga] 07/13: revert first

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 5e322d976358c79678e958688406d89bce792778
Author: wuzunqian 
AuthorDate: Sun May 13 15:19:34 2018 +0800

revert first
---
 alpha/alpha-server/src/main/resources/schema-mysql.sql | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/alpha/alpha-server/src/main/resources/schema-mysql.sql 
b/alpha/alpha-server/src/main/resources/schema-mysql.sql
index ecb934e..e2e5d81 100644
--- a/alpha/alpha-server/src/main/resources/schema-mysql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql
@@ -27,12 +27,11 @@ CREATE TABLE IF NOT EXISTS TxEvent (
   compensationMethod varchar(256) NOT NULL,
   expiryTime datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   payloads varbinary(10240),
-  retries int(11) NOT NULL DEFAULT '0',
-  retryMethod varchar(256) DEFAULT NULL,
   PRIMARY KEY (surrogateId),
   INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, 
expiryTime)
 ) DEFAULT CHARSET=utf8;
 
+
 CREATE TABLE IF NOT EXISTS Command (
   surrogateId bigint NOT NULL AUTO_INCREMENT,
   eventId bigint NOT NULL UNIQUE,
@@ -42,6 +41,8 @@ CREATE TABLE IF NOT EXISTS Command (
   localTxId varchar(36) NOT NULL,
   parentTxId varchar(36) DEFAULT NULL,
   compensationMethod varchar(256) NOT NULL,
+  retryMethod varchar(256) NOT NULL,
+  retries int NOT NULL DEFAULT 0,
   payloads varbinary(10240),
   status varchar(12),
   lastModified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -50,6 +51,7 @@ CREATE TABLE IF NOT EXISTS Command (
   INDEX saga_commands_index (surrogateId, eventId, globalTxId, localTxId, 
status)
 ) DEFAULT CHARSET=utf8;
 
+
 CREATE TABLE IF NOT EXISTS TxTimeout (
   surrogateId bigint NOT NULL AUTO_INCREMENT,
   eventId bigint NOT NULL UNIQUE,

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 05/13: add module saga-dubbo-demo

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit b9dbd3b3d59484f448e7a9adde46f660c9c92568
Author: wuzunqian 
AuthorDate: Thu May 10 16:51:19 2018 +0800

add module saga-dubbo-demo
---
 saga-demo/pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/saga-demo/pom.xml b/saga-demo/pom.xml
index 10f27db..9ee16f0 100644
--- a/saga-demo/pom.xml
+++ b/saga-demo/pom.xml
@@ -31,6 +31,7 @@
   pom
   
 booking
+saga-dubbo-demo
   
 
   

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 09/13: modify readme

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit b3494a523d2a61b50769a332216754c0827a674f
Author: wuzunqian 
AuthorDate: Tue May 15 01:01:17 2018 +0800

modify readme
---
 saga-demo/saga-dubbo-demo/README.md | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/saga-demo/saga-dubbo-demo/README.md 
b/saga-demo/saga-dubbo-demo/README.md
index 64bd938..098fd85 100644
--- a/saga-demo/saga-dubbo-demo/README.md
+++ b/saga-demo/saga-dubbo-demo/README.md
@@ -15,13 +15,6 @@ You will need:
 [alpha_server]: 
https://github.com/apache/incubator-servicecomb-saga/tree/master/alpha
 
 ## Running Demo
-you can run saga-dubbo-demo as normal spring application
-1. init database: sql/schema-mysql.sql, and config database info and zookeeper 
url by enviroment params   
-   enviroment params example:  
- -Ddatabase.url=jdbc:mysql://127.0.0.1:3306/saga_dubbo  
- -Ddatabase.username=root  
- -Ddatabase.password=***  
- -Dzookeeper.url=localhost:2181  
- -Dserver.port=8071  
+1.mvn clean install -DskipTests -Pdocker
+2. ./saga-dubbo-demo.sh up
 
-2. run servicea, serviceb, servicec,visit 
http://${servicea_host}:${servicea_port}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-saga] 01/13: SCB-555 Add saga-dubbo-demo It also shows verify the error of SCB-547 click 7.[A.run->B.run, B.run->C.run(x), C.run exception], and org.apache.servicecomb.saga.alph

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 189edeb507367be9bc469b99a6ff2fb2f1a9a5f2
Author: wuzunqian 
AuthorDate: Sun May 6 01:09:23 2018 +0800

SCB-555 Add saga-dubbo-demo
It also shows verify the error of SCB-547
click 7.[A.run->B.run, B.run->C.run(x), C.run exception], and 
org.apache.servicecomb.saga.alpha.core.EventScanner.pollEvents scheduler will 
stop running.
TODO: add acceptance test (cucumber)
---
 .../omega-transport/omega-transport-dubbo/pom.xml  |   6 +-
 saga-demo/saga-dubbo-demo/README.md|  28 
 saga-demo/saga-dubbo-demo/pom.xml  | 116 +++
 .../saga-dubbo-demo/service-api}/pom.xml   |  30 ++--
 .../servicecomb/saga/demo/dubbo/api/IService.java  |  26 
 .../servicecomb/saga/demo/dubbo/api/IServiceA.java |  21 +++
 .../servicecomb/saga/demo/dubbo/api/IServiceB.java |  22 +++
 .../servicecomb/saga/demo/dubbo/api/IServiceC.java |  22 +++
 .../src/main/resources/dubbo.properties|  18 +++
 .../saga-dubbo-demo/service-pub}/pom.xml   |  23 +--
 .../saga/demo/dubbo/pub/AbsService.java|  39 +
 .../saga/demo/dubbo/pub/IInvokeCode.java   |  39 +
 .../saga/demo/dubbo/pub/InvokeContext.java |  56 
 .../saga-dubbo-demo/servicea}/pom.xml  |  30 ++--
 .../saga/demo/dubbo/servicea/ApplicationA.java |  31 
 .../saga/demo/dubbo/servicea/ServiceA.java |  78 ++
 .../dubbo/servicea/web/DubboDemoController.java| 157 +
 .../demo/dubbo/servicea/web/MvcConfigurer.java |  39 +
 .../servicea/src/main/resources/application.yaml   |  23 +++
 .../servicea/src/main/resources/dubbo-context.xml  |  31 
 .../servicea/src/main/resources/jdbc.xml   |  58 
 .../servicea/src/main/resources/log4j2.xml |  30 
 .../servicea/src/main/resources/static/index.html  |  42 ++
 .../saga-dubbo-demo/serviceb}/pom.xml  |  30 ++--
 .../saga/demo/dubbo/serviceb/ApplicationB.java |  32 +
 .../saga/demo/dubbo/serviceb/ServiceB.java |  69 +
 .../serviceb/src/main/resources/application.yaml   |  22 +++
 .../serviceb/src/main/resources/dubbo-context.xml  |  30 
 .../serviceb/src/main/resources/jdbc.xml   |  57 
 .../serviceb/src/main/resources/log4j2.xml |  30 
 .../saga-dubbo-demo/servicec}/pom.xml  |  30 ++--
 .../saga/demo/dubbo/servicec/ApplicationC.java |  31 
 .../saga/demo/dubbo/servicec/ServiceC.java |  61 
 .../servicec/src/main/resources/application.yaml   |  22 +++
 .../servicec/src/main/resources/dubbo-context.xml  |  28 
 .../servicec/src/main/resources/jdbc.xml   |  57 
 .../servicec/src/main/resources/log4j2.xml |  30 
 saga-demo/saga-dubbo-demo/sql/schema-mysql.sql |  43 ++
 38 files changed, 1449 insertions(+), 88 deletions(-)

diff --git a/omega/omega-transport/omega-transport-dubbo/pom.xml 
b/omega/omega-transport/omega-transport-dubbo/pom.xml
index 65893c4..0830266 100644
--- a/omega/omega-transport/omega-transport-dubbo/pom.xml
+++ b/omega/omega-transport/omega-transport-dubbo/pom.xml
@@ -27,12 +27,16 @@
 
 4.0.0
 
+
+2.6.1
+
+
 omega-transport-dubbo
 
 
 com.alibaba
 dubbo
-2.6.1
+${dubbo.version}
 
 
 
diff --git a/saga-demo/saga-dubbo-demo/README.md 
b/saga-demo/saga-dubbo-demo/README.md
new file mode 100644
index 000..86ecbf6
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/README.md
@@ -0,0 +1,28 @@
+# Saga-dubbo-demo
+This demo including three services:
+* servicea
+* serviceb
+* servicec
+
+## Prerequisites
+You will need:
+1. [JDK 1.8][jdk]
+2. [Maven 3.x][maven]
+3. [alpha server][alpha_server]
+
+[jdk]: 
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
+[maven]: https://maven.apache.org/install.html
+[alpha_server]: 
https://github.com/apache/incubator-servicecomb-saga/tree/master/alpha
+
+## Running Demo
+you can run saga-dubbo-demo as normal spring application
+1.init database: sql/schema-mysql.sql, and config database info by enviroment 
params
+enviroment params example:
+-Ddatabase.url=jdbc:mysql://127.0.0.1:3306/saga_dubbo
+-Ddatabase.username=root
+-Ddatabase.password=***
+-Dzookeeper.url=localhost:2181
+-Dserver.port=8071
+
+2.config zookeeper url by enviroment param
+3.run servicea, serviceb, servicec,visit 
http://${servicea_host}:${servicea_port}
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/pom.xml 
b/saga-demo/saga-dubbo-demo/pom.xml
new file mode 100644
index 000..634cd69
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/pom.xml
@@ -0,0 +1,116 @@
+
+
+
+http://maven.apache.org/POM/4.0.0; 

[incubator-servicecomb-saga] 13/13: SCB-555 Clean up the code

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 66c119865f2aa5010e1c8ea2b8b80817f0795b4a
Author: Willem Jiang 
AuthorDate: Sat May 26 17:21:55 2018 +0800

SCB-555 Clean up the code
---
 .../servicecomb/saga/demo/dubbo/api/IService.java  |  6 ++---
 .../servicecomb/saga/demo/dubbo/api/IServiceA.java |  3 +--
 .../servicecomb/saga/demo/dubbo/api/IServiceB.java |  4 +--
 .../servicecomb/saga/demo/dubbo/api/IServiceC.java |  4 +--
 .../saga/demo/dubbo/pub/IInvokeCode.java   | 29 +++---
 5 files changed, 19 insertions(+), 27 deletions(-)

diff --git 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
index 1269981..f02ee8d 100644
--- 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
+++ 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
@@ -19,8 +19,6 @@ package org.apache.servicecomb.saga.demo.dubbo.api;
 import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
 
 public interface IService {
-
-public Object run(InvokeContext invokeContext) throws Exception;
-public void cancelRun(InvokeContext invokeContext);
-
+  Object run(InvokeContext invokeContext) throws Exception;
+  void cancelRun(InvokeContext invokeContext);
 }
diff --git 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
index 17ab38d..21b9ff7 100644
--- 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
+++ 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
@@ -16,6 +16,5 @@
  */
 package org.apache.servicecomb.saga.demo.dubbo.api;
 
-public interface IServiceA extends IService{
-
+public interface IServiceA extends IService {
 }
diff --git 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
index 15f734d..83d5382 100644
--- 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
+++ 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
@@ -16,7 +16,5 @@
  */
 package org.apache.servicecomb.saga.demo.dubbo.api;
 
-import java.util.Map;
-
-public interface IServiceB extends IService{
+public interface IServiceB extends IService {
 }
diff --git 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
index ef5acb8..91bd18f 100644
--- 
a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
+++ 
b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
@@ -16,7 +16,5 @@
  */
 package org.apache.servicecomb.saga.demo.dubbo.api;
 
-import java.util.Map;
-
-public interface IServiceC extends IService{
+public interface IServiceC extends IService {
 }
diff --git 
a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
 
b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
index b7153ac..b0f6036 100644
--- 
a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
+++ 
b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
@@ -21,19 +21,18 @@ package org.apache.servicecomb.saga.demo.dubbo.pub;
 * @date 05/05/2018 3:27 PM
 */
 public interface IInvokeCode {
-
-public static final String Ab_description="A->B, success";
-public static final String Ab = "Ab";
-public static final String AExceptionWhenAb_description="A->B, A.run 
exception after A call B.run";
-public static final String AExceptionWhenAb="AExceptionWhenAb";
-public static final String BExceptionWhenAb_description="A->B, B.run 
exception";
-public static final String BExceptionWhenAb="BExceptionWhenAb";
-public static final String AbAc_description="A->B, A->C success";
-public static final String AbAc="AbAc";
-public static final String 

[incubator-servicecomb-saga] 06/13: saga-dubbo-demo add docker plugin(part1)

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit f80527bffd68cf19a4c8b5882596cbb76155f952
Author: wuzunqian 
AuthorDate: Sun May 13 14:51:52 2018 +0800

saga-dubbo-demo add docker plugin(part1)
---
 .../saga-dubbo-demo/docker-compose.mysql.yaml  | 39 +
 saga-demo/saga-dubbo-demo/docker-compose.yaml  | 51 ++
 saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh   | 45 +++
 3 files changed, 135 insertions(+)

diff --git a/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml 
b/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml
new file mode 100644
index 000..43f3b5e
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml
@@ -0,0 +1,39 @@
+## ---
+## 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.
+## ---
+
+version: '2.1'
+
+services:
+  database:
+image: "mysql/mysql-server:5.7"
+hostname: mysql
+environment:
+  - MYSQL_ROOT_PASSWORD=password
+  - MYSQL_DATABASE=saga
+  - MYSQL_USER=saga
+  - MYSQL_PASSWORD=password
+healthcheck:
+test: ["CMD-SHELL", "nc -z localhost 3306 &> /dev/null; echo $$?"]
+interval: 30s
+timeout: 10s
+retries: 5
+
+  alpha:
+links:
+  - "database:mysql.servicecomb.io"
+environment:
+  - JAVA_OPTS=-Dspring.profiles.active=mysql
diff --git a/saga-demo/saga-dubbo-demo/docker-compose.yaml 
b/saga-demo/saga-dubbo-demo/docker-compose.yaml
new file mode 100644
index 000..7c3b8dd
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/docker-compose.yaml
@@ -0,0 +1,51 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+version: '2.1'
+
+services:
+  database:
+image: "postgres"
+hostname: postgres
+environment:
+  - POSTGRES_DB=saga
+  - POSTGRES_USER=saga
+  - POSTGRES_PASSWORD=password
+healthcheck:
+test: ["CMD-SHELL", "nc -z localhost 5432 &> /dev/null; echo $$?"]
+interval: 30s
+timeout: 10s
+retries: 5
+
+  alpha:
+image: "alpha-server:${TAG}"
+hostname: alpha-server
+ports:
+  - "8081:8080"
+  - "8091:8090"
+links:
+  - "database:postgresql.servicecomb.io"
+environment:
+  - JAVA_OPTS=-Dspring.profiles.active=prd
+healthcheck:
+test: ["CMD-SHELL", "nc -z localhost 8080 &> /dev/null; echo $$?"]
+interval: 30s
+timeout: 10s
+retries: 5
+depends_on:
+  database:
+condition: service_healthy
diff --git a/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh 
b/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh
new file mode 100755
index 000..48df117
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+service=saga-dubbo-demo
+
+show_usage() {
+  echo "Usage: $0 {up|up-mysql|down}" >&2
+}
+
+fetch_version() {
+  version="$(printf 'VER\t${project.version}' | mvn help:evaluate | grep 
'^VER' | cut -f2)"
+}
+
+if [[ -z $1 ]]; then
+  show_usage
+  exit 2
+fi
+
+case $1 in
+  up)
+

[incubator-servicecomb-saga] 03/13: SCB-555 Add acceptance test for dubbo demo

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit baead1c2c45f6963f13ae4511d0e781bf6dd3fad
Author: wuzunqian 
AuthorDate: Mon May 7 22:23:34 2018 +0800

SCB-555 Add acceptance test for dubbo demo

add license
---
 acceptance-tests/acceptance-dubbo-demo/pom.xml |  45 ++
 .../acceptance/dubbodemo/DubboDemoStepdefs.java| 170 +
 .../saga/acceptance/dubbodemo/RunCucumberIT.java   |  27 
 .../resources/AExceptionWhenAb_scenario.feature|  41 +
 .../test/resources/AbAc_success_scenario.feature   |  47 ++
 .../test/resources/AbBc_success_scenario.feature   |  47 ++
 .../src/test/resources/Ab_success_scenario.feature |  40 +
 .../resources/BExceptionWhenAb_scenario.feature|  40 +
 .../resources/CExceptionWhenAbAc_scenario.feature  |  48 ++
 .../resources/CExceptionWhenAbBc_scenario.feature  |  47 ++
 .../src/test/resources/log4j2-test.xml |  30 
 acceptance-tests/pom.xml   |   8 +
 saga-demo/saga-dubbo-demo/README.md|   5 +-
 .../servicecomb/saga/demo/dubbo/pub/ServiceVO.java |  48 ++
 .../dubbo/servicea/web/DubboDemoController.java|  16 +-
 15 files changed, 654 insertions(+), 5 deletions(-)

diff --git a/acceptance-tests/acceptance-dubbo-demo/pom.xml 
b/acceptance-tests/acceptance-dubbo-demo/pom.xml
new file mode 100644
index 000..023a2d8
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -0,0 +1,45 @@
+
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+
+acceptance-tests
+org.apache.servicecomb.saga
+0.2.0-SNAPSHOT
+
+4.0.0
+Saga:Acceptance Tests::DubboDemo
+acceptance-dubbo-demo
+
+
+
+com.fasterxml.jackson.core
+jackson-core
+${jackson.version}
+
+
+com.fasterxml.jackson.core
+jackson-databind
+${jackson.version}
+
+
+
+
+
\ No newline at end of file
diff --git 
a/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
 
b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
new file mode 100644
index 000..af6b7d1
--- /dev/null
+++ 
b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
@@ -0,0 +1,170 @@
+/*
+ * 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.saga.acceptance.dubbodemo;
+
+import cucumber.api.DataTable;
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
+import cucumber.api.java8.En;
+import io.restassured.response.Response;
+import org.hamcrest.core.StringContains;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.invoke.MethodHandles;
+import java.util.*;
+import java.util.function.Consumer;
+
+import static io.restassured.RestAssured.given;
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.core.Is.is;
+
+public class DubboDemoStepdefs implements En {
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private static final String ALPHA_REST_ADDRESS = "alpha.rest.address";
+  private static final String SERVICEA_ADDRESS = "servicea.address";
+  private static final String SERVICEB_ADDRESS = "serviceb.address";
+  private static final String SERVICEC_ADDRESS = "servicec.address";
+  private static final String INFO_SERVICE_URI = "info.service.uri";
+
+  private static final Consumer[]> NO_OP_CONSUMER = 
(dataMap) -> {
+  };
+
+  public DubboDemoStepdefs() {
+Given("^ServiceA is up and 

[incubator-servicecomb-saga] branch master updated (00b8bdc -> 66c1198)

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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


from 00b8bdc  Updated the .gitingore
 new 189edeb  SCB-555 Add saga-dubbo-demo It also shows verify the error of 
SCB-547 click 7.[A.run->B.run, B.run->C.run(x), C.run exception], and 
org.apache.servicecomb.saga.alpha.core.EventScanner.pollEvents scheduler will 
stop running. TODO: add acceptance test (cucumber)
 new 877c480  SCB-555 Add saga-dubbo-demo README
 new baead1c  SCB-555 Add acceptance test for dubbo demo
 new 0e851d8  fix result events unorder
 new b9dbd3b  add module saga-dubbo-demo
 new f80527b  saga-dubbo-demo add docker plugin(part1)
 new 5e322d9  revert first
 new b07916a  docker plugin for mvn test
 new b3494a5  modify readme
 new 33164a1  SCB-555 Updated the log setting to info level
 new 3745bcf  SCB-555 Fixed the test error with spring boot 2
 new a30370a  SCB-555 Clean up the dock-componse file
 new 66c1198  SCB-555 Clean up the code

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 acceptance-tests/acceptance-dubbo-demo/pom.xml | 330 +
 .../acceptance/dubbodemo/DubboDemoStepdefs.java| 174 +++
 .../saga/acceptance/dubbodemo}/RunCucumberIT.java  |   6 +-
 .../resources/AExceptionWhenAb_scenario.feature}   |  34 +--
 .../test/resources/AbAc_success_scenario.feature}  |  40 +--
 .../test/resources/AbBc_success_scenario.feature}  |  40 +--
 .../test/resources/Ab_success_scenario.feature}|  33 +--
 .../resources/BExceptionWhenAb_scenario.feature}   |  33 +--
 .../resources/CExceptionWhenAbAc_scenario.feature} |  41 +--
 .../resources/CExceptionWhenAbBc_scenario.feature} |  40 +--
 .../src/test/resources/log4j2-test.xml |   0
 acceptance-tests/pom.xml   |   8 +
 .../omega-transport/omega-transport-dubbo/pom.xml  |   6 +-
 saga-demo/pom.xml  |   6 +
 saga-demo/saga-dubbo-demo/README.md|  20 ++
 .../saga-dubbo-demo/docker-compose.mysql.yaml  | 127 
 saga-demo/saga-dubbo-demo/docker-compose.yaml  | 126 
 saga-demo/saga-dubbo-demo/pom.xml  | 123 
 .../saga-dubbo-demo.sh}|  22 +-
 .../saga-dubbo-demo/service-api}/pom.xml   |  29 +-
 .../servicecomb/saga/demo/dubbo/api/IService.java  |  14 +-
 .../servicecomb/saga/demo/dubbo/api/IServiceA.java |   8 +-
 .../servicecomb/saga/demo/dubbo/api/IServiceB.java |   8 +-
 .../servicecomb/saga/demo/dubbo/api/IServiceC.java |   8 +-
 .../src/main/resources/dubbo.properties}   |   8 +-
 .../saga-dubbo-demo/service-pub}/pom.xml   |  23 +-
 .../saga/demo/dubbo/pub/AbsService.java|  34 +--
 .../saga/demo/dubbo/pub/IInvokeCode.java   |  38 +++
 .../saga/demo/dubbo/pub/InvokeContext.java |  56 
 .../servicecomb/saga/demo/dubbo/pub/ServiceVO.java |  31 +-
 saga-demo/saga-dubbo-demo/servicea/pom.xml |  88 ++
 .../saga/demo/dubbo/servicea/ApplicationA.java}|  11 +-
 .../saga/demo/dubbo/servicea/ServiceA.java |  78 +
 .../dubbo/servicea/web/DubboDemoController.java| 169 +++
 .../demo/dubbo/servicea/web/MvcConfigurer.java |  28 +-
 .../servicea}/src/main/resources/application.yaml  |  29 +-
 .../servicea/src/main/resources/dubbo-context.xml  |  31 ++
 .../servicea/src/main/resources/jdbc.xml   |  34 +++
 .../servicea}/src/main/resources/log4j2.xml|   0
 .../servicea/src/main/resources/schema-mysql.sql   |  11 +-
 .../src/main/resources/schema-postgresql.sql   |  16 +-
 .../servicea/src/main/resources/static/index.html  |  42 +++
 saga-demo/saga-dubbo-demo/serviceb/pom.xml |  84 ++
 .../saga/demo/dubbo/serviceb/ApplicationB.java}|   8 +-
 .../saga/demo/dubbo/serviceb/ServiceB.java |  69 +
 .../serviceb}/src/main/resources/application.yaml  |  24 +-
 .../serviceb/src/main/resources/dubbo-context.xml  |  30 ++
 .../serviceb/src/main/resources/jdbc.xml   |  34 +++
 .../serviceb}/src/main/resources/log4j2.xml|   0
 .../serviceb/src/main/resources/schema-mysql.sql   |  11 +-
 .../src/main/resources/schema-postgresql.sql   |  16 +-
 saga-demo/saga-dubbo-demo/servicec/pom.xml |  84 ++
 .../saga/demo/dubbo/servicec/ApplicationC.java}|  11 +-
 .../saga/demo/dubbo/servicec/ServiceC.java |  61 
 .../servicec}/src/main/resources/application.yaml  |  24 +-
 .../servicec/src/main/resources/dubbo-context.xml  |  24 +-
 .../servicec/src/main/resources/jdbc.xml   |  34 +++
 .../servicec}/src/main/resources/log4j2.xml|   0
 

[incubator-servicecomb-website] 02/06: fix style

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 06df9ee5cceb50045c9613e2430c71696b8db3cb
Author: zhengyangyong 
AuthorDate: Sat May 26 14:30:07 2018 +0800

fix style

Signed-off-by: zhengyangyong 
---
 _users/cn/deploy-mode.md | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
index c9f7f7f..ccd76fe 100644
--- a/_users/cn/deploy-mode.md
+++ b/_users/cn/deploy-mode.md
@@ -64,7 +64,7 @@ Java Chassis作为一个微服务框架,支持多样化的部署模式。
 之后运行`mvn package`,在`target`目录下拷贝生成的微服务jar包和`lib`(依赖jar)至任何目录,运行即可:
 
 ```bash
-java -jar x.jar
+java -jar ${project.artifactId}-${project.version}.jar
 ```
 
 >提示:
@@ -77,11 +77,10 @@ java -jar x.jar
 ![DockerDeployment](/assets/images/DockerDeployment.png)
 
 ### 如何直接打包微服务为Docker镜像
-在微服务项目的`pom.xml`中添加以下依赖:
+我们使用io.fabric8的maven插件从打包,镜像在微服务项目的`pom.xml`中添加以下依赖:
 
 ```xml
   
-
 
   
 
@@ -175,7 +174,7 @@ java -jar x.jar
   
 ```
 
-在项目源代码`src\main`下,创建一个`docker`目录,之后创建一个`assembly.xml`文件,填入下面的内容:
+在项目源代码`src\main`下,创建一个`docker`目录,之后在此目录中创建一个`assembly.xml`文件,填入下面的内容:
 
 ```xml
 
@@ -207,8 +206,9 @@ java -jar x.jar
 
 >提示:
 >1. 
 >请修改上面打包依赖配置中`${your-package}.Application`为微服务启动MainClass;
->2. 如果是使用windows系统,请安装docker machine,并且确保docker machine vm启动中;
->3. 打包的镜像会默认安装在本地镜像库中,如果需要上传外部镜像库例如中央库,可以使用下面的命令:
+>2. 为了保留普通打包方式,docker打包方式配置为maven profile,即``-Pdocker`;
+>3. 如果是使用windows系统,请安装docker machine,并且确保docker machine vm启动中;
+>4. 打包的镜像会默认安装在本地镜像库中,如果需要上传外部镜像库例如中央库,可以使用下面的命令:
 >```bash
 >mvn -Ddocker.registry=registry.hub.docker.com/${username} 
 >-Ddocker.username=${username} -Ddocker.password=${password} docker:push
 >```
@@ -253,7 +253,7 @@ services:
   - "8081:8081"
 ```
 
-为了能够使containers互联互通,使用`links`指定链接关系,`ports`用于映射到Docker 
Host的端口,如果无需对外发布则可以不设置,关于Docker Compose 
Yaml配置的更多信息,可以参见[这篇文档](https://docs.docker.com/compose/)。
+为了能够使containers互联互通,使用`links`指定链接关系,`ports`用于映射到Docker Host的端口,关于Docker 
Compose Yaml配置的更多信息,可以参见[这篇文档](https://docs.docker.com/compose/)。
 
 编写好docker-compose.yml后,切换到此文件目录,执行:
 
@@ -263,5 +263,7 @@ docker-compose up
 
 即可将所有的微服务都拉起来。
 
->提示:docker-compose默认寻找当前文件夹下的docker-compose.yml文件作为编排配置文件,如果需要指定文件名或路径,请使用`docker-compose
 -f ${fullFileName}`。
+>提示:
+>1. 
docker-compose默认寻找当前文件夹下的docker-compose.yml文件作为编排配置文件,如果需要指定文件名或路径,请使用`docker-compose
 -f ${fullFileName}`;
+>2. 如果container无需对外发布端口则可以不设置`ports`。
 

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] 05/06: update content

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit e4539edff02a14ffc63039b38a51bd03baf10fe4
Author: zhengyangyong 
AuthorDate: Mon May 28 15:51:22 2018 +0800

update content

Signed-off-by: zhengyangyong 
---
 _users/cn/deploy-mode.md   |  44 -
 assets/images/K8S.png  | Bin 125051 -> 150042 bytes
 assets/images/ServiceCombInK8S.png | Bin 125785 -> 172082 bytes
 3 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
index f7ea7c6..7e8ccd8 100644
--- a/_users/cn/deploy-mode.md
+++ b/_users/cn/deploy-mode.md
@@ -286,29 +286,32 @@ Kubernetes是谷歌开源的容器集群管理系统,目前已经具备生产
 
 ![K8S](/assets/images/K8S.png)
 
-上面的图中,我们省去了网络细节,关注这几个点:
-1. 
Service的注册和发现:应用(app)实例(container)的启动或停止由Kubernetes管理,Kubernetes会依据Node的负载状况动态调配Host它们的Pod,那么这就带来一个问题:一个app想调用另外一个app,是如何知道目标app实例的IP和端口呢?因此Kubernetes引入了一个逻辑层次——Service,Service有唯一的名字和不变的虚拟IP,Kubernetes会将Service的所有app实例在Pod上的IP和端口保存在Name
 
Service中,app之间的调用都通过Service名,之后通过Service名映射app实例列表,这个过程类似DNS,Kubernetes启动app实例并向Name
 Service登记的这个过程就是Service的注册,而一个app调用另外一个app从Name 
Service查询目标IP和端口的过程就是Service的发现;
-2. 弹性伸缩:弹性伸缩是Kubernetes的一个重要能力,通过配置弹性伸缩策略,支持使用CPU、内存使用率、连接数,或其他第三方的Metrics作为输入;
-3. 监控:Kubernetes自带Heapster监控资源的使用。
+上图中,我们省去了网络细节,关注这几个点:
+1. 
Service的注册和发现:应用(app)实例(container)的启动或停止由Kubernetes管理,Kubernetes会依据Node的负载状况动态调配Host它们的Pod,那么这就带来一个问题:一个App想调用另外一个App,是如何知道目标App实例的IP和端口呢?因此Kubernetes引入了一个逻辑层次——Service,Service有唯一的名字,Kubernetes会将Service的所有App实例在Pod上的IP和端口保存在Name
 
Service中,如果App之间的调用通过Service名,就可以通过Service名映射app实例的IP和端口,这个过程类似DNS。Kubernetes启动App实例并向Name
 Service登记的这个过程就是Service的注册,而一个App调用另外一个App从Name 
Service查询目标IP和端口的过程就是Service的发现;
+2. 
弹性伸缩:弹性伸缩是Kubernetes的一个重要能力,通过配置弹性伸缩策略,支持使用CPU、内存使用率、连接数,或其他第三方的Metrics作为输入,如何设置请参考[这篇文档](https://k8smeetup.github.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/);
+3. 负载均衡:有了Service注册和发现机制,Kubernetes以Service 
Name为中心构建负载均衡,Service有三种类型`NodePort`,`ClusterIP`和`LoadBalancer`,后两种具有负载均衡能力,`LoadBalancer`需要PaaS平台实现,因此对于本地Kubernetes集群多用`ClusterIP`;
+4. 监控:Kubernetes自带Heapster监控资源的使用。
 
 ### Java Chassis
 
 ![ServiceCombBasic](/assets/images/ServiceCombBasic.png)
 
-上面的图是Java Chassis基本原理,我们同样解释几个点:
+上图是Java Chassis基本原理,我们同样解释几个点:
 1. Java Chassis的注册和发现:ServiceCenter是一个完整独立的注册中心,不同于Kubernetes的Name 
Service,它存储了微服务启动后上传的Swagger契约,契约中描述了调用路径、入参和出参,即对接口进行了全面的描述。其它微服务发起调用的时候,可以通过获取Producer的契约动态生成Consumer代码,也可以做调用预检查等;
-2. 弹性伸缩:Java Chassis的弹性伸缩能力体现在负载均衡特性上,是Consumer端软负载均衡;当一个Java 
Chassis微服务启动后,会将获取本地IP和设置的发布端口发布至ServiceCenter,ServiceCenter会立刻通知所有的其他微服务实例信息发生了变化,更新本地缓存,调整负载分配。**Java
 Chassis作为一个SDK本身是无法启动微服务实例的**;
-3. 监控:Java 
Chassis并不带监控系统,它只可以输出Tracing、Metrics和Log数据,对接Zipkin、Prometheus等监控系统,当然Metrics也可以作为Kubernetes弹性伸缩策略的输入。
+2. 弹性伸缩:Java Chassis作为一个SDK本身是无法启动微服务实例和调配资源的,因此没有此能力。
+3. 负载均衡:Java Chassis是Consumer端软负载均衡;当一个Java 
Chassis微服务启动后,会将获取的本地IP和设置的发布端口发布至ServiceCenter,ServiceCenter会立刻通知所有的其他微服务实例信息发生了变化,更新本地缓存,调整负载分配;
+4. 监控:Java 
Chassis并不带监控系统,它只可以输出Tracing、Metrics和Log数据,对接Zipkin、Prometheus等监控系统,当然Metrics也可以作为Kubernetes弹性伸缩策略的输入。
 
-综合上述,我们总结为一个表格:
+综合上述,我们总结为下面的表格:
 
 | 说明项 | Kubernetes   | Java Chassis   |
 | :--- | :--- | :--- |
 | 定位 | 容器集群管理系统| 微服务框架 |
-| 层次 | 基础PaaS| SDK |
-| Service的含义 | 逻辑概念,用于组织同一个app的container | 指微服务拆分后的业务 |
-| 注册和发现  | Name Service为中心,目的是container可以通过名称互联互通 | 
ServiceCenter为中心,目的是微服务可以互联互通且提供接口描述(契约) |
-| 弹性伸缩   | 调度资源启动或停止实例,上层应用需要有负载均衡的能力 | 动态发现实例变化并调整负载分布,下层平台需要有调度资源的能力 |
+| 层次 | PaaS| SDK |
+| Service的含义 | 逻辑概念,用selector指向containers | 业务概念,微服务拆分后的业务 |
+| 注册和发现  | NameService为中心 | ServiceCenter为中心 |
+| 弹性伸缩   | 调度资源启动或停止实例 | 无此能力 |
+| 负载均衡   | name + selector机制 | Consumer端动态发现实例的变化 |
 | 监控 | 有集成的监控系统| 只作为监控系统的数据源 |
 
 ### Kubernetes + Java Chassis
@@ -317,6 +320,17 @@ Kubernetes是谷歌开源的容器集群管理系统,目前已经具备生产
 ![ServiceCombInK8S](/assets/images/ServiceCombInK8S.png)
 
 - 将微服务的镜像上传至Kubernetes能够访问到的镜像仓库;
-- 将每一个 Java Chassis微服务配置为一个Kubernetes Service并配置弹性伸缩策略;
-- ServerCenter如果作为一个Kubernetes 
Service部署,那么保证IP固定使得VPC内均可访问,也可以将ServiceCenter部署在外部,然后使用Kubernetes外部域名解析机制能够访问到它;
-- 使用Fannel网络,Pod的IP能够互联互通, Java 
Chassis启动后会使用Pod的IP发布,保证能相互调用;否则配置使用`servicecomb.service.publishAddress`指定发布地址。
\ No newline at end of file
+- 为每一个 Java Chassis微服务配置为一个Kubernetes Deployment并配置弹性伸缩策略;
+- ServerCenter如果作为一个Kubernetes 
Deployment部署,那么保证IP固定使得VPC内均可访问,也可以将ServiceCenter部署在外部,然后使用Kubernetes外部域名解析机制能够访问到它;
+- 使用Fannel网络让Pod的IP能够互联互通, Java 
Chassis启动后会使用Pod的IP发布,保证能相互调用;否则配置使用`servicecomb.service.publishAddress`指定发布地址;
+- 对于需要外部访问的 Java Chassis微服务,配置Kubernetes Service。
+
+>提示:请牢记 Java Chassis的负载均衡机制与Kubernetes的负载均衡机制无关,即 Java Chassis的负载均衡并不走name + 
selector机制,也就不需要配置Service。
+
+
+### 在Kubernetes集群中部署Java Chassis 

[incubator-servicecomb-website] 04/06: add kubernetes part

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 229cb8eecf1fcef3f112cf5dc0cab649a13f674d
Author: zhengyangyong 
AuthorDate: Sat May 26 17:01:10 2018 +0800

add kubernetes part

Signed-off-by: zhengyangyong 
---
 assets/images/K8S.png  | Bin 0 -> 125051 bytes
 assets/images/ServiceCombBasic.png | Bin 0 -> 9778 bytes
 assets/images/ServiceCombInK8S.png | Bin 0 -> 125785 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/assets/images/K8S.png b/assets/images/K8S.png
new file mode 100644
index 000..87396a8
Binary files /dev/null and b/assets/images/K8S.png differ
diff --git a/assets/images/ServiceCombBasic.png 
b/assets/images/ServiceCombBasic.png
new file mode 100644
index 000..4587e61
Binary files /dev/null and b/assets/images/ServiceCombBasic.png differ
diff --git a/assets/images/ServiceCombInK8S.png 
b/assets/images/ServiceCombInK8S.png
new file mode 100644
index 000..611c4a6
Binary files /dev/null and b/assets/images/ServiceCombInK8S.png differ

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] branch master updated (af93917 -> 8c12ac9)

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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


from af93917  fix bug of reference from chinese home page to blog of Apache 
ServiceComb (incubating) Day
 new 79c7106  add deploy mode cn
 new 06df9ee  fix style
 new 9c40e1f  add kubernetes part
 new 229cb8e  add kubernetes part
 new e4539ed  update content
 new 8c12ac9  fix style

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 _data/navigation.yml|   2 +
 _users/cn/deploy-mode.md| 337 
 assets/images/DockerDeployment.png  | Bin 0 -> 68208 bytes
 assets/images/DockerPackageAssembly.png | Bin 0 -> 79706 bytes
 assets/images/K8S.png   | Bin 0 -> 150042 bytes
 assets/images/ServiceCombBasic.png  | Bin 0 -> 9778 bytes
 assets/images/ServiceCombInK8S.png  | Bin 0 -> 172082 bytes
 assets/images/SimpleDeployment.png  | Bin 0 -> 19863 bytes
 8 files changed, 339 insertions(+)
 create mode 100644 _users/cn/deploy-mode.md
 create mode 100644 assets/images/DockerDeployment.png
 create mode 100644 assets/images/DockerPackageAssembly.png
 create mode 100644 assets/images/K8S.png
 create mode 100644 assets/images/ServiceCombBasic.png
 create mode 100644 assets/images/ServiceCombInK8S.png
 create mode 100644 assets/images/SimpleDeployment.png

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] 06/06: fix style

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 8c12ac990efdf14dbfdfc97ceca48368a659678e
Author: zhengyangyong 
AuthorDate: Mon May 28 16:01:14 2018 +0800

fix style

Signed-off-by: zhengyangyong 
---
 _users/cn/deploy-mode.md | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
index 7e8ccd8..5e2068e 100644
--- a/_users/cn/deploy-mode.md
+++ b/_users/cn/deploy-mode.md
@@ -83,7 +83,7 @@ java -jar ${project.artifactId}-${project.version}.jar
 ![DockerDeployment](/assets/images/DockerDeployment.png)
 
 ### 如何直接打包微服务为Docker镜像
-我们使用io.fabric8的maven插件从打包,镜像在微服务项目的`pom.xml`中添加以下依赖:
+我们使用io.fabric8的[maven插件](https://github.com/fabric8io/docker-maven-plugin)从打包,镜像在微服务项目的`pom.xml`中添加以下依赖:
 
 ```xml
   
@@ -325,12 +325,13 @@ Kubernetes是谷歌开源的容器集群管理系统,目前已经具备生产
 - 使用Fannel网络让Pod的IP能够互联互通, Java 
Chassis启动后会使用Pod的IP发布,保证能相互调用;否则配置使用`servicecomb.service.publishAddress`指定发布地址;
 - 对于需要外部访问的 Java Chassis微服务,配置Kubernetes Service。
 
->提示:请牢记 Java Chassis的负载均衡机制与Kubernetes的负载均衡机制无关,即 Java Chassis的负载均衡并不走name + 
selector机制,也就不需要配置Service。
-
+>提示:
+>1. 请牢记 Java Chassis的负载均衡机制与Kubernetes的负载均衡机制无关,即Java Chassis的负载均衡并不走name + 
selector机制,也不需要配置Service;
+>2. 上述部署细节可依据实际环境(例如网络)自行调整。 
 
 ### 在Kubernetes集群中部署Java Chassis Company演示项目
 Company是我们提供的一个有趣味性的演示项目:
 1. 源代码地址:https://github.com/ServiceComb/ServiceComb-Company-WorkShop
 2. 
项目的详细讲解:http://servicecomb.incubator.apache.org/cn/docs/linuxcon-workshop-demo/
 
-如何将Company部署在Kubernetes集群中:http://servicecomb.incubator.apache.org/cn/docs/company-on-kubernetes/
+如何在Kubernetes集群中部署Company:http://servicecomb.incubator.apache.org/cn/docs/company-on-kubernetes/
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] 03/06: add kubernetes part

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 9c40e1fa22a6eebe75d45f9ae7b54bce66640c5c
Author: zhengyangyong 
AuthorDate: Sat May 26 16:59:24 2018 +0800

add kubernetes part

Signed-off-by: zhengyangyong 
---
 _users/cn/deploy-mode.md | 57 ++--
 1 file changed, 55 insertions(+), 2 deletions(-)

diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
index ccd76fe..f7ea7c6 100644
--- a/_users/cn/deploy-mode.md
+++ b/_users/cn/deploy-mode.md
@@ -61,7 +61,13 @@ Java Chassis作为一个微服务框架,支持多样化的部署模式。
   
 ```
 
-之后运行`mvn package`,在`target`目录下拷贝生成的微服务jar包和`lib`(依赖jar)至任何目录,运行即可:
+之后运行:
+
+```bash
+mvn package
+```
+
+在`target`目录下拷贝生成的微服务jar包和`lib`(依赖jar)至任何目录,运行即可:
 
 ```bash
 java -jar ${project.artifactId}-${project.version}.jar
@@ -202,7 +208,13 @@ java -jar ${project.artifactId}-${project.version}.jar
 
 ![DockerPackageAssembly](/assets/images/DockerPackageAssembly.png)
 
-运行`mvn package -Pdocker`,等待打包完成。
+运行:
+
+```bash
+mvn package -Pdocker
+```
+
+等待打包完成,会有提示镜像生成成功并注册到本地镜像库的提示。
 
 >提示:
 >1. 
 >请修改上面打包依赖配置中`${your-package}.Application`为微服务启动MainClass;
@@ -267,3 +279,44 @@ docker-compose up
 >1. 
 >docker-compose默认寻找当前文件夹下的docker-compose.yml文件作为编排配置文件,如果需要指定文件名或路径,请使用`docker-compose
 > -f ${fullFileName}`;
 >2. 如果container无需对外发布端口则可以不设置`ports`。
 
+## Kubernetes集群部署
+Kubernetes是谷歌开源的容器集群管理系统,目前已经具备生产化成熟度,虽然Java 
Chassis作为一个微服务框架与Kubernetes处于不同层次,但由于Kubernetes同样拥有注册-发现、弹性伸缩、监控等方面的功能,因此很容易与Java
 Chassis中相关功能搞混,我们需要比较深入的理解两者的差异。
+
+### Kubernetes
+
+![K8S](/assets/images/K8S.png)
+
+上面的图中,我们省去了网络细节,关注这几个点:
+1. 
Service的注册和发现:应用(app)实例(container)的启动或停止由Kubernetes管理,Kubernetes会依据Node的负载状况动态调配Host它们的Pod,那么这就带来一个问题:一个app想调用另外一个app,是如何知道目标app实例的IP和端口呢?因此Kubernetes引入了一个逻辑层次——Service,Service有唯一的名字和不变的虚拟IP,Kubernetes会将Service的所有app实例在Pod上的IP和端口保存在Name
 
Service中,app之间的调用都通过Service名,之后通过Service名映射app实例列表,这个过程类似DNS,Kubernetes启动app实例并向Name
 Service登记的这个过程就是Service的注册,而一个app调用另外一个app从Name 
Service查询目标IP和端口的过程就是Service的发现;
+2. 弹性伸缩:弹性伸缩是Kubernetes的一个重要能力,通过配置弹性伸缩策略,支持使用CPU、内存使用率、连接数,或其他第三方的Metrics作为输入;
+3. 监控:Kubernetes自带Heapster监控资源的使用。
+
+### Java Chassis
+
+![ServiceCombBasic](/assets/images/ServiceCombBasic.png)
+
+上面的图是Java Chassis基本原理,我们同样解释几个点:
+1. Java Chassis的注册和发现:ServiceCenter是一个完整独立的注册中心,不同于Kubernetes的Name 
Service,它存储了微服务启动后上传的Swagger契约,契约中描述了调用路径、入参和出参,即对接口进行了全面的描述。其它微服务发起调用的时候,可以通过获取Producer的契约动态生成Consumer代码,也可以做调用预检查等;
+2. 弹性伸缩:Java Chassis的弹性伸缩能力体现在负载均衡特性上,是Consumer端软负载均衡;当一个Java 
Chassis微服务启动后,会将获取本地IP和设置的发布端口发布至ServiceCenter,ServiceCenter会立刻通知所有的其他微服务实例信息发生了变化,更新本地缓存,调整负载分配。**Java
 Chassis作为一个SDK本身是无法启动微服务实例的**;
+3. 监控:Java 
Chassis并不带监控系统,它只可以输出Tracing、Metrics和Log数据,对接Zipkin、Prometheus等监控系统,当然Metrics也可以作为Kubernetes弹性伸缩策略的输入。
+
+综合上述,我们总结为一个表格:
+
+| 说明项 | Kubernetes   | Java Chassis   |
+| :--- | :--- | :--- |
+| 定位 | 容器集群管理系统| 微服务框架 |
+| 层次 | 基础PaaS| SDK |
+| Service的含义 | 逻辑概念,用于组织同一个app的container | 指微服务拆分后的业务 |
+| 注册和发现  | Name Service为中心,目的是container可以通过名称互联互通 | 
ServiceCenter为中心,目的是微服务可以互联互通且提供接口描述(契约) |
+| 弹性伸缩   | 调度资源启动或停止实例,上层应用需要有负载均衡的能力 | 动态发现实例变化并调整负载分布,下层平台需要有调度资源的能力 |
+| 监控 | 有集成的监控系统| 只作为监控系统的数据源 |
+
+### Kubernetes + Java Chassis
+理解了上面的内容之后,我们可以如下设计 Java Chassis在Kubernetes集群中的部署:
+
+![ServiceCombInK8S](/assets/images/ServiceCombInK8S.png)
+
+- 将微服务的镜像上传至Kubernetes能够访问到的镜像仓库;
+- 将每一个 Java Chassis微服务配置为一个Kubernetes Service并配置弹性伸缩策略;
+- ServerCenter如果作为一个Kubernetes 
Service部署,那么保证IP固定使得VPC内均可访问,也可以将ServiceCenter部署在外部,然后使用Kubernetes外部域名解析机制能够访问到它;
+- 使用Fannel网络,Pod的IP能够互联互通, Java 
Chassis启动后会使用Pod的IP发布,保证能相互调用;否则配置使用`servicecomb.service.publishAddress`指定发布地址。
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[incubator-servicecomb-website] 01/06: add deploy mode cn

2018-05-28 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 79c7106a5daf76a7809e5b3b8d5513356d0f7c65
Author: zhengyangyong 
AuthorDate: Sat May 26 14:18:50 2018 +0800

add deploy mode cn

Signed-off-by: zhengyangyong 
---
 _data/navigation.yml|   2 +
 _users/cn/deploy-mode.md| 267 
 assets/images/DockerDeployment.png  | Bin 0 -> 68208 bytes
 assets/images/DockerPackageAssembly.png | Bin 0 -> 79706 bytes
 assets/images/SimpleDeployment.png  | Bin 0 -> 19863 bytes
 5 files changed, 269 insertions(+)

diff --git a/_data/navigation.yml b/_data/navigation.yml
index 88c47ee..9043aab 100755
--- a/_data/navigation.yml
+++ b/_data/navigation.yml
@@ -281,6 +281,8 @@ t:
 children:
   - title: 运行模式
 url: /cn/users/run-mode/
+  - title: 部署模式
+url: /cn/users/deploy-mode/
 
   - title: 微服务安全
 children:
diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
new file mode 100644
index 000..c9f7f7f
--- /dev/null
+++ b/_users/cn/deploy-mode.md
@@ -0,0 +1,267 @@
+---
+title: "部署模式"
+lang: cn
+ref: deploy-mode
+permalink: /cn/users/deploy-mode/
+excerpt: "部署模式"
+last_modified_at: 2018-05-25T10:01:43-04:00
+---
+
+{% include toc %}
+Java Chassis作为一个微服务框架,支持多样化的部署模式。
+
+## 物理机或虚拟机部署
+这种方式直接部署在物理机或虚拟机操作系统上,Chassis微服务以Java进程的方式启动:
+
+![SimpleDeployment](/assets/images/SimpleDeployment.png)
+
+请保证网络在同一个局域网内,或能互通。
+
+### 如何打包微服务
+在微服务项目的`pom.xml`中添加以下依赖:
+
+```xml
+  
+
+  
+org.apache.maven.plugins
+maven-jar-plugin
+2.6
+
+  
+
+  true
+  lib/
+  
+  ${your-package}.Application
+
+
+  . 
+
+  
+
+  
+  
+org.apache.maven.plugins
+maven-dependency-plugin
+
+  
+copy-dependencies
+package
+
+  copy-dependencies
+
+
+  target/lib
+
+  
+
+  
+
+  
+```
+
+之后运行`mvn package`,在`target`目录下拷贝生成的微服务jar包和`lib`(依赖jar)至任何目录,运行即可:
+
+```bash
+java -jar x.jar
+```
+
+>提示:
+>1. 
如果需要更改`microservice.yaml`中的配置项又不希望重新打包,可以直接编写一个新的`microservice.yaml`,然后放置于微服务jar包同级别目录,重启微服务即可;
+>2. 
请修改上面打包依赖配置中`${your-package}.Application`为微服务启动MainClass。
+
+## Docker容器化部署
+这种方式适合部署测试环境,当微服务数据量比较多的情况下能够大幅减少部署的工作量,一键拉起所有的微服务:
+
+![DockerDeployment](/assets/images/DockerDeployment.png)
+
+### 如何直接打包微服务为Docker镜像
+在微服务项目的`pom.xml`中添加以下依赖:
+
+```xml
+  
+
+
+  
+
+  io.fabric8
+  docker-maven-plugin
+  
+
+  
+${project.artifactId}:${project.version}
+${project.artifactId}
+
+  openjdk:8-jdk-stretch
+  
+8080
+  
+  
+/docker
+  
+  
+dir
+/
+assembly.xml
+  
+  
+java $JAVA_OPTS -jar 
/docker/${project.artifactId}-${project.version}.jar
+  
+
+  
+
+  
+  
+
+  build
+  package
+  
+build
+  
+
+  
+
+  
+
+  
+
+  
+
+  docker
+  
+
+  
+org.apache.maven.plugins
+maven-jar-plugin
+2.6
+
+  
+
+  true
+  lib/
+  
+  ${your-package}.Application
+
+
+  .
+
+  
+
+  
+  
+org.apache.maven.plugins
+maven-dependency-plugin
+
+  
+copy-dependencies
+package
+
+  copy-dependencies
+
+
+  target/lib
+
+  
+
+  
+  
+io.fabric8
+docker-maven-plugin
+  
+
+  
+
+  
+```
+
+在项目源代码`src\main`下,创建一个`docker`目录,之后创建一个`assembly.xml`文件,填入下面的内容:
+
+```xml
+
+
+  installer
+  
+
+  ${project.build.directory}/lib
+  /docker/lib
+  0644
+  0755
+
+  
+  
+
+  
${project.build.directory}/${project.artifactId}-${project.version}.jar
+  /docker
+  ${project.artifactId}-${project.version}.jar
+
+  
+
+```
+

[GitHub] WillemJiang closed pull request #95: add Deploy mode

2018-05-28 Thread GitBox
WillemJiang closed pull request #95: add Deploy mode
URL: https://github.com/apache/incubator-servicecomb-website/pull/95
 
 
   

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/_data/navigation.yml b/_data/navigation.yml
index 4b5e6d7..11d6001 100755
--- a/_data/navigation.yml
+++ b/_data/navigation.yml
@@ -277,6 +277,8 @@ t:
 children:
   - title: 运行模式
 url: /cn/users/run-mode/
+  - title: 部署模式
+url: /cn/users/deploy-mode/
 
   - title: 微服务安全
 children:
diff --git a/_users/cn/deploy-mode.md b/_users/cn/deploy-mode.md
new file mode 100644
index 000..5e2068e
--- /dev/null
+++ b/_users/cn/deploy-mode.md
@@ -0,0 +1,337 @@
+---
+title: "部署模式"
+lang: cn
+ref: deploy-mode
+permalink: /cn/users/deploy-mode/
+excerpt: "部署模式"
+last_modified_at: 2018-05-25T10:01:43-04:00
+---
+
+{% include toc %}
+Java Chassis作为一个微服务框架,支持多样化的部署模式。
+
+## 物理机或虚拟机部署
+这种方式直接部署在物理机或虚拟机操作系统上,Chassis微服务以Java进程的方式启动:
+
+![SimpleDeployment](/assets/images/SimpleDeployment.png)
+
+请保证网络在同一个局域网内,或能互通。
+
+### 如何打包微服务
+在微服务项目的`pom.xml`中添加以下依赖:
+
+```xml
+  
+
+  
+org.apache.maven.plugins
+maven-jar-plugin
+2.6
+
+  
+
+  true
+  lib/
+  
+  ${your-package}.Application
+
+
+  . 
+
+  
+
+  
+  
+org.apache.maven.plugins
+maven-dependency-plugin
+
+  
+copy-dependencies
+package
+
+  copy-dependencies
+
+
+  target/lib
+
+  
+
+  
+
+  
+```
+
+之后运行:
+
+```bash
+mvn package
+```
+
+在`target`目录下拷贝生成的微服务jar包和`lib`(依赖jar)至任何目录,运行即可:
+
+```bash
+java -jar ${project.artifactId}-${project.version}.jar
+```
+
+>提示:
+>1. 
如果需要更改`microservice.yaml`中的配置项又不希望重新打包,可以直接编写一个新的`microservice.yaml`,然后放置于微服务jar包同级别目录,重启微服务即可;
+>2. 
请修改上面打包依赖配置中`${your-package}.Application`为微服务启动MainClass。
+
+## Docker容器化部署
+这种方式适合部署测试环境,当微服务数据量比较多的情况下能够大幅减少部署的工作量,一键拉起所有的微服务:
+
+![DockerDeployment](/assets/images/DockerDeployment.png)
+
+### 如何直接打包微服务为Docker镜像
+我们使用io.fabric8的[maven插件](https://github.com/fabric8io/docker-maven-plugin)从打包,镜像在微服务项目的`pom.xml`中添加以下依赖:
+
+```xml
+  
+
+  
+
+  io.fabric8
+  docker-maven-plugin
+  
+
+  
+${project.artifactId}:${project.version}
+${project.artifactId}
+
+  openjdk:8-jdk-stretch
+  
+8080
+  
+  
+/docker
+  
+  
+dir
+/
+assembly.xml
+  
+  
+java $JAVA_OPTS -jar 
/docker/${project.artifactId}-${project.version}.jar
+  
+
+  
+
+  
+  
+
+  build
+  package
+  
+build
+  
+
+  
+
+  
+
+  
+
+  
+
+  docker
+  
+
+  
+org.apache.maven.plugins
+maven-jar-plugin
+2.6
+
+  
+
+  true
+  lib/
+  
+  ${your-package}.Application
+
+
+  .
+
+  
+
+  
+  
+org.apache.maven.plugins
+maven-dependency-plugin
+
+  
+copy-dependencies
+package
+
+  copy-dependencies
+
+
+  target/lib
+
+  
+
+  
+  
+io.fabric8
+docker-maven-plugin
+  
+
+  
+
+  
+```
+
+在项目源代码`src\main`下,创建一个`docker`目录,之后在此目录中创建一个`assembly.xml`文件,填入下面的内容:
+
+```xml
+
+
+  installer
+  
+
+  ${project.build.directory}/lib
+  /docker/lib
+  0644
+  0755
+
+  
+  
+
+  
${project.build.directory}/${project.artifactId}-${project.version}.jar
+  /docker
+  ${project.artifactId}-${project.version}.jar
+
+  
+
+```
+
+完成之后的项目效果:
+
+![DockerPackageAssembly](/assets/images/DockerPackageAssembly.png)
+
+运行:
+
+```bash
+mvn package -Pdocker
+```
+
+等待打包完成,会有提示镜像生成成功并注册到本地镜像库的提示。
+
+>提示:
+>1. 
请修改上面打包依赖配置中`${your-package}.Application`为微服务启动MainClass;
+>2. 

[GitHub] coveralls commented on issue #730: SCB-381 Reverted the fork per test setting

2018-05-28 Thread GitBox
coveralls commented on issue #730: SCB-381 Reverted the fork per test setting
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/730#issuecomment-392451836
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17193073/badge)](https://coveralls.io/builds/17193073)
   
   Coverage decreased (-0.02%) to 87.504% when pulling 
**1c01bded40507a15e3703cbd273eb82c2ca4a4d6 on SCB-381** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on master**.
   


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


With regards,
Apache Git Services


[GitHub] zhengyangyong opened a new pull request #95: add Deploy mode

2018-05-28 Thread GitBox
zhengyangyong opened a new pull request #95: add Deploy mode
URL: https://github.com/apache/incubator-servicecomb-website/pull/95
 
 
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
coveralls commented on issue #729: [SCB-562] fix NPE when had empty interface 
(not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#issuecomment-392447423
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17192877/badge)](https://coveralls.io/builds/17192877)
   
   Coverage increased (+0.0007%) to 87.526% when pulling 
**db4676c71572507f20d1f407b2ca92a4ec47dbdf on zhengyangyong:SCB-562** into 
**6ce5280969d1949fff9cb26c6925a1774a409af8 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
wujimin commented on a change in pull request #729: [SCB-562] fix NPE when had 
empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191133658
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   so big block
   just return when null


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE 
when had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191133406
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   I think no necessary, user want fill this empty interface later, so it's not 
a **wrong scenario**


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong commented on a change in pull request #729: [SCB-562] fix NPE 
when had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191133406
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   I think no necessary, user want fill this empty interface later, so it's not 
a `wrong scenario`


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
WillemJiang commented on a change in pull request #729: [SCB-562] fix NPE when 
had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191129310
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-for (Entry entry : swagger.getPaths().entrySet()) {
-  String strPath = entry.getKey();
-  Path path = entry.getValue();
-  for (Entry operationEntry : 
path.getOperationMap().entrySet()) {
-Operation operation = operationEntry.getValue();
-if (operation.getOperationId() == null) {
-  throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+if (swagger.getPaths() != null) {
 
 Review comment:
   I think we to write a logger for it, so use can know what's wrong here.


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


With regards,
Apache Git Services


[GitHub] zhengyangyong opened a new pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-28 Thread GitBox
zhengyangyong opened a new pull request #729: [SCB-562] fix NPE when had empty 
interface (not have any method)
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/729
 
 
   Signed-off-by: zhengyangyong 
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   do not init operations if there are no path (empty interface) in 
swagger(prevent NPE)


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


With regards,
Apache Git Services