[GitHub] [servicecomb-java-chassis] yhs0092 closed issue #1292: NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure
yhs0092 closed issue #1292: NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure URL: https://github.com/apache/servicecomb-java-chassis/issues/1292 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] yhs0092 commented on issue #1292: NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure
yhs0092 commented on issue #1292: NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure URL: https://github.com/apache/servicecomb-java-chassis/issues/1292#issuecomment-521484523 Hello, your pull request has been merged, and this issues will be marked resolved. Please reopen it if you find this problem still exists. Thank you for your pull request! : ) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-java-chassis] 02/02: [SCB-1297] fix CI that DynamicProperty can not get Spring properties
This is an automated email from the ASF dual-hosted git repository. yaohaishi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git commit 55b0f165b58a70868a2e69083b1d30a3b8f82838 Author: l00393086 AuthorDate: Tue Aug 13 16:37:39 2019 +0800 [SCB-1297] fix CI that DynamicProperty can not get Spring properties --- .../servicecomb/config/ConfigurationSpringInitializer.java | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java index c7472c7..bf380f6 100644 --- a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java +++ b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java @@ -76,9 +76,6 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure */ @Override public void setEnvironment(Environment environment) { - -ConfigUtil.installDynamicConfig(); - String environmentName = generateNameForEnvironment(environment); LOGGER.info("Environment received, will get configurations from [{}].", environmentName); @@ -86,6 +83,8 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure ConfigUtil.addExtraConfig(EXTRA_CONFIG_SOURCE_PREFIX + environmentName, extraConfig); +ConfigUtil.installDynamicConfig(); + setUpSpringPropertySource(environment); } @@ -204,7 +203,7 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure if (ignoreResolveFailure()) { LOGGER.warn("set up spring property source failed.", e); } else { -throw new RuntimeException("set up spring property source failed.If you still want to start up the application and ignore the errors, you can set servicecomb.config.ignoreResolveFailure to true.", e); +throw new RuntimeException("set up spring property source failed.If you still want to start up the application and ignore errors, you can set servicecomb.config.ignoreResolveFailure to true.", e); } } } @@ -215,8 +214,8 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure } private boolean ignoreResolveFailure() { -return DynamicPropertyFactory.getInstance() -.getBooleanProperty("servicecomb.config.ignoreResolveFailure", false) -.get(); +return ConfigUtil +.createLocalConfig() +.getBoolean("servicecomb.config.ignoreResolveFailure", false); } }
[servicecomb-java-chassis] branch master updated (be73f2e -> 55b0f16)
This is an automated email from the ASF dual-hosted git repository. yaohaishi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git. from be73f2e [SCB-1431] set all dependency versions as properties new 7e23a66 [SCB-1297] NPE would be arised if you haven't given any value for servicecomb.config.ignoreResolveFailure new 55b0f16 [SCB-1297] fix CI that DynamicProperty can not get Spring properties 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: .../config/ConfigurationSpringInitializer.java | 12 +++- .../config/TestConfigurationSpringInitializer.java | 22 ++ 2 files changed, 29 insertions(+), 5 deletions(-)
[servicecomb-java-chassis] 01/02: [SCB-1297] NPE would be arised if you haven't given any value for servicecomb.config.ignoreResolveFailure
This is an automated email from the ASF dual-hosted git repository. yaohaishi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git commit 7e23a668ceb7e02cf1e3558a17e80edd9f688357 Author: l00393086 AuthorDate: Mon Aug 12 16:06:12 2019 +0800 [SCB-1297] NPE would be arised if you haven't given any value for servicecomb.config.ignoreResolveFailure --- .../config/ConfigurationSpringInitializer.java | 17 ++--- .../config/TestConfigurationSpringInitializer.java | 22 ++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java index ae6d217..c7472c7 100644 --- a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java +++ b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java @@ -76,6 +76,9 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure */ @Override public void setEnvironment(Environment environment) { + +ConfigUtil.installDynamicConfig(); + String environmentName = generateNameForEnvironment(environment); LOGGER.info("Environment received, will get configurations from [{}].", environmentName); @@ -83,8 +86,6 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure ConfigUtil.addExtraConfig(EXTRA_CONFIG_SOURCE_PREFIX + environmentName, extraConfig); -ConfigUtil.installDynamicConfig(); - setUpSpringPropertySource(environment); } @@ -200,10 +201,10 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure try { configFromSpringBoot.put(propertyName, environment.getProperty(propertyName, Object.class)); } catch (Exception e) { - if (!getIfIgnoreEnvironment()) { -throw new RuntimeException("set up spring property source failed.", e); - } else { + if (ignoreResolveFailure()) { LOGGER.warn("set up spring property source failed.", e); + } else { +throw new RuntimeException("set up spring property source failed.If you still want to start up the application and ignore the errors, you can set servicecomb.config.ignoreResolveFailure to true.", e); } } } @@ -213,7 +214,9 @@ public class ConfigurationSpringInitializer extends PropertyPlaceholderConfigure LOGGER.debug("a none EnumerablePropertySource is ignored, propertySourceName = [{}]", propertySource.getName()); } - private boolean getIfIgnoreEnvironment() { -return (Boolean) ConfigUtil.createLocalConfig().getProperty("servicecomb.config.ignoreResolveFailure"); + private boolean ignoreResolveFailure() { +return DynamicPropertyFactory.getInstance() +.getBooleanProperty("servicecomb.config.ignoreResolveFailure", false) +.get(); } } diff --git a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigurationSpringInitializer.java b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigurationSpringInitializer.java index c50e01e..ac20e23 100644 --- a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigurationSpringInitializer.java +++ b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigurationSpringInitializer.java @@ -43,6 +43,9 @@ import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.MutablePropertySources; +import org.springframework.core.env.PropertySource; +import org.springframework.core.env.StandardEnvironment; +import org.springframework.core.env.SystemEnvironmentPropertySource; import org.springframework.jndi.JndiPropertySource; import com.netflix.config.ConfigurationManager; @@ -224,8 +227,27 @@ public class TestConfigurationSpringInitializer { assertEquals("value2", extraProperties.get("key2")); } + @Test(expected = RuntimeException.class) + public void shoud_throw_exception_when_given_ignoreResolveFailure_false() { +StandardEnvironment environment = newStandardEnvironment(); + +ConfigurationSpringInitializer configurationSpringInitializer = new ConfigurationSpringInitializer(); +configurationSpringInitializer.setEnvironment(environment); + } + private Map> getExtraConfigMapFromConfigUtil() { return Deencapsulation .getField(ConfigUtil.class, "EXTRA_CONFIG_MAP"); } + + private StandardEnvironment newStandardEnvironment() { +Map envProperties = new HashMap<>(); +
[GitHub] [servicecomb-java-chassis] yhs0092 merged pull request #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure
yhs0092 merged pull request #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure URL: https://github.com/apache/servicecomb-java-chassis/pull/1294 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-toolkit] MabinGo commented on issue #17: SCB-1436 Model is not generated, but the related package is imported
MabinGo commented on issue #17: SCB-1436 Model is not generated, but the related package is imported URL: https://github.com/apache/servicecomb-toolkit/pull/17#issuecomment-521475910 @kakulisen Can you add some test cases for this? Thks: ) This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] coveralls commented on issue #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure
coveralls commented on issue #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure URL: https://github.com/apache/servicecomb-java-chassis/pull/1294#issuecomment-521388560 [![Coverage Status](https://coveralls.io/builds/25124323/badge)](https://coveralls.io/builds/25124323) Coverage increased (+0.02%) to 85.755% when pulling **4660a200587f9b5723a8dd40895ebb0178d25774 on HuaiJoe:master** into **bc333c5a976202f6d7f0945726b3d420f86edde3 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] coveralls commented on issue #1295: [SCB-1431] set all dependency versions as properties
coveralls commented on issue #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#issuecomment-521383166 [![Coverage Status](https://coveralls.io/builds/25124333/badge)](https://coveralls.io/builds/25124333) Coverage increased (+0.03%) to 85.766% when pulling **1e6f90b03d7ab10eb23baeba344979128d9d2bea on AngLi2:DM** into **bc333c5a976202f6d7f0945726b3d420f86edde3 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-pack] 02/02: SCB-1435 Update fsm_manual_zh.md link in user_guide_zh.md
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 7b3eb4671aa440cc261e365075ae885660c1cc3a Author: Lei Zhang AuthorDate: Wed Aug 14 19:40:50 2019 +0800 SCB-1435 Update fsm_manual_zh.md link in user_guide_zh.md --- docs/user_guide_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_guide_zh.md b/docs/user_guide_zh.md index 9bcbd44..a93c692 100644 --- a/docs/user_guide_zh.md +++ b/docs/user_guide_zh.md @@ -778,4 +778,4 @@ Alpha 可以通过部署多实例的方式保证高可用,使用 `alpha.cluste ## 实验 -[Alpha 状态机模式](fsm/how_to_use_fsm_zh.md) \ No newline at end of file +[Alpha 状态机模式](fsm/fsm_manual_zh.md) \ No newline at end of file
[servicecomb-pack] branch master updated (cbfacf5 -> 7b3eb46)
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/servicecomb-pack.git. from cbfacf5 SCB-1430 Update the license with new added module new f17284c SCB-1435 Add fsm manual new 7b3eb46 SCB-1435 Update fsm_manual_zh.md link in user_guide_zh.md 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: docs/fsm/assets/ui-dashboard.png | Bin 527466 -> 423555 bytes .../assets/ui-transaction-details-compensated.png | Bin 575211 -> 499027 bytes .../ui-transaction-details-failed-timeout.png | Bin 0 -> 544179 bytes ...ui-transaction-details-failed-unpredictable.png | Bin 0 -> 374627 bytes .../assets/ui-transaction-details-successful.png | Bin 625652 -> 572977 bytes docs/fsm/assets/ui-transactions-list.png | Bin 519288 -> 441339 bytes docs/fsm/fsm_manual_zh.md | 157 + docs/user_guide_zh.md | 2 +- 8 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 docs/fsm/assets/ui-transaction-details-failed-timeout.png create mode 100644 docs/fsm/assets/ui-transaction-details-failed-unpredictable.png create mode 100755 docs/fsm/fsm_manual_zh.md
[servicecomb-pack] 01/02: SCB-1435 Add fsm manual
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit f17284c7f40be02e31ef8c4e0b55bb4073e930c6 Author: Lei Zhang AuthorDate: Wed Aug 14 19:36:16 2019 +0800 SCB-1435 Add fsm manual --- docs/fsm/assets/ui-dashboard.png | Bin 527466 -> 423555 bytes .../assets/ui-transaction-details-compensated.png | Bin 575211 -> 499027 bytes .../ui-transaction-details-failed-timeout.png | Bin 0 -> 544179 bytes ...ui-transaction-details-failed-unpredictable.png | Bin 0 -> 374627 bytes .../assets/ui-transaction-details-successful.png | Bin 625652 -> 572977 bytes docs/fsm/assets/ui-transactions-list.png | Bin 519288 -> 441339 bytes docs/fsm/fsm_manual_zh.md | 157 + 7 files changed, 157 insertions(+) diff --git a/docs/fsm/assets/ui-dashboard.png b/docs/fsm/assets/ui-dashboard.png index 6325f93..51a2c81 100644 Binary files a/docs/fsm/assets/ui-dashboard.png and b/docs/fsm/assets/ui-dashboard.png differ diff --git a/docs/fsm/assets/ui-transaction-details-compensated.png b/docs/fsm/assets/ui-transaction-details-compensated.png index cf9e4f5..a822f51 100644 Binary files a/docs/fsm/assets/ui-transaction-details-compensated.png and b/docs/fsm/assets/ui-transaction-details-compensated.png differ diff --git a/docs/fsm/assets/ui-transaction-details-failed-timeout.png b/docs/fsm/assets/ui-transaction-details-failed-timeout.png new file mode 100644 index 000..8d2c575 Binary files /dev/null and b/docs/fsm/assets/ui-transaction-details-failed-timeout.png differ diff --git a/docs/fsm/assets/ui-transaction-details-failed-unpredictable.png b/docs/fsm/assets/ui-transaction-details-failed-unpredictable.png new file mode 100644 index 000..c37f69c Binary files /dev/null and b/docs/fsm/assets/ui-transaction-details-failed-unpredictable.png differ diff --git a/docs/fsm/assets/ui-transaction-details-successful.png b/docs/fsm/assets/ui-transaction-details-successful.png index d7f73ef..719c37c 100644 Binary files a/docs/fsm/assets/ui-transaction-details-successful.png and b/docs/fsm/assets/ui-transaction-details-successful.png differ diff --git a/docs/fsm/assets/ui-transactions-list.png b/docs/fsm/assets/ui-transactions-list.png index 4c0fdb2..5692d95 100644 Binary files a/docs/fsm/assets/ui-transactions-list.png and b/docs/fsm/assets/ui-transactions-list.png differ diff --git a/docs/fsm/fsm_manual_zh.md b/docs/fsm/fsm_manual_zh.md new file mode 100755 index 000..1cd0360 --- /dev/null +++ b/docs/fsm/fsm_manual_zh.md @@ -0,0 +1,157 @@ +# 状态机模式使用手册 + +ServiceComb Pack 0.5.0 版本开始我们尝试使用状态机模型解决分布式事务中复杂的事件和状态关系,我们将 Alpha 看作一个可以记录每个全局事务不同状态的的盒子,Alpha 收到 Omega 发送的事务消息(全局事务启动、全局事务停止,全局事务失败,子事务启动,子事务停止,子事务失败等等)后完成一些动作(等待、补偿、超时)和状态切换。 + +分布式事务的事件使我们面临很复杂的情况,我们希望可以通过一种DSL来清晰的定义状态机,并且能够解决状态机本身的持久化和分布式问题,再经过尝试后我们觉得 Akka FSM 是一个不错的选择。下面请跟我一起体验一下这个新功能。 + +## 重大更新 + +* 使用 Akka 状态机代替基于表扫描的状态判断 +* 性能提升一个数量级,事件吞吐量每秒1.8w+,全局事务处理量每秒1.2k+ +* 内置健康指标采集器,可清晰了解系统瓶颈 +* 通过多种数据通道适配实现高可用 +* 向前兼容原有 gRPC 协议 +* 全新的可视化监控界面 +* 开放全新的 API + +## 快速开始 + +ServiceComb Pack 0.5.0 开始支持 Saga 状态机模式,你只需要在启动 Alpha 和 Omega 端程序时增加 `alpha.feature.akka.enabled=true` 参数。你可以在 [docker hub](https://hub.docker.com/r/coolbeevip/servicecomb-pack) 找到一个 docker-compose 文件,也可以按照以下方式部署。 + +**注意:** 启用状态机模式后,Saga事务会工作在状态机模式,TCC依然采用数据库方式 + +* 启动 PostgresSQL + + ```bash + docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e "POSTGRES_PASSWORD=password" -p 5432:5432 postgres + ``` + +* 启动 Elasticsearch + + ```bash + docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.6.2 + ``` + +* 启动 Alpha + + ```bash + java -jar alpha-server-${version}-exec.jar \ +--spring.datasource.url=jdbc:postgresql://0.0.0.0:5432/saga?useSSL=false \ +--spring.datasource.username=saga \ +--spring.datasource.password=password \ +--spring.profiles.active=prd \ +--alpha.feature.akka.enabled=true \ +--alpha.feature.akka.transaction.repository.type=elasticsearch \ +--spring.data.elasticsearch.cluster-name=docker-cluster \ +--spring.data.elasticsearch.cluster-nodes=localhost:9300 + ``` + +* Alpha WEB 管理界面 + + 浏览器中打开 http://localhost:8090/admin + + +### WEB 管理界面 + +状态机模式开启后,我们还提供了一个简单的管理界面,你可以在这个界面上看到 Alpha 的性能指标、全局事务统计和事务明细 + + 仪表盘 + +![ui-dashboard](assets/ui-dashboard.png) + +* Dashboard 仪表盘上方显示已经结束的全局事务数量 + + TOTAL:总事务数 + + SUCCESSFUL:成功结束事务数 + + COMPENSATED:成功补偿结束事务数 + + FAILED:失败(挂起)事务数 + +* Active Transactions 活动事务计数器 + + COMMITTED:从启动到现在累计成功结束的事务数 + + COMPENSATED:从启动到现在累计补偿的事务数 + + SUSPENDED:从启动到现在累计挂起的事务数 + +* Active Transactions 组件计数器 + + Events、Actors、Sagas、DB是一组计数器,分别显示Alpha系统中每个处理组件的处理前、处理后计数器以及平均处理事件,通过跟踪这些指标可以了解系统当前的性能以及瓶颈 + + Events:显示 Alpha 收到的事件数量、受理的事件数量、拒绝的事件数量、平均每个事件的处理时间 + + Actors:显示状态机收到的事件数量、受理的事件数量、拒绝的事件数量、平均每个事件的处理时间 + +
[GitHub] [servicecomb-pack] WillemJiang merged pull request #535: [SCB-1435] Add fsm manual
WillemJiang merged pull request #535: [SCB-1435] Add fsm manual URL: https://github.com/apache/servicecomb-pack/pull/535 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-website] branch asf-site updated (9a67a3a -> a72544b)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from 9a67a3a Publish the website add 00515d6 Edit mersher quick start. new e246dd9 Merge branch 'master' into asf-site new a72544b Publish 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: _docs/cn/mersher-distributed-tracing.md| 10 +- _docs/cn/mersher-flow-control.md | 4 +- _docs/cn/mersher-load-balance.md | 29 - _docs/cn/mersher-quick-start.md| 114 +- _docs/cn/mersher-service-management.md | 32 +++--- _docs/mersher-distributed-tracing.md | 10 +- _docs/mersher-flow-control.md | 4 +- _docs/mersher-load-balance.md | 25 +++- _docs/mersher-quick-start.md | 112 -- _docs/mersher-service-management.md| 36 +++--- .../mersher/mersher-circuitbreaker-ret-nil.png | Bin 0 -> 7302 bytes .../images/mersher/mersher-circuitbreaker-ret.png | Bin 5972 -> 9028 bytes assets/images/mersher/mersher-circuitbreaker.png | Bin 15220 -> 30583 bytes .../images/mersher/mersher-deployment-simple.png | Bin 0 -> 51664 bytes .../images/mersher/mersher-flow-control-fail.png | Bin 26430 -> 6958 bytes assets/images/mersher/mersher-flowchart-simple.png | Bin 0 -> 23925 bytes assets/images/mersher/mersher-ser-manage-ver.png | Bin 5934 -> 16442 bytes assets/images/mersher/mersher-servercenter.png | Bin 31799 -> 28075 bytes assets/images/mersher/mersher-testinit.png | Bin 29517 -> 30550 bytes assets/images/mersher/mersher-testpythonhttp2.png | Bin 0 -> 31215 bytes assets/images/mersher/mersher-tracing-30111.png| Bin 42725 -> 48084 bytes .../mersher/mersher-circuitbreaker-ret-nil.png | Bin 0 -> 7302 bytes .../images/mersher/mersher-circuitbreaker-ret.png | Bin 5972 -> 9028 bytes .../images/mersher/mersher-circuitbreaker.png | Bin 15220 -> 30583 bytes .../images/mersher/mersher-deployment-simple.png | Bin 0 -> 51664 bytes .../images/mersher/mersher-flow-control-fail.png | Bin 26430 -> 6958 bytes .../images/mersher/mersher-flowchart-simple.png| Bin 0 -> 23925 bytes .../images/mersher/mersher-ser-manage-ver.png | Bin 5934 -> 16442 bytes .../assets/images/mersher/mersher-servercenter.png | Bin 31799 -> 28075 bytes content/assets/images/mersher/mersher-testinit.png | Bin 29517 -> 30550 bytes .../images/mersher/mersher-testpythonhttp2.png | Bin 0 -> 31215 bytes .../images/mersher/mersher-tracing-30111.png | Bin 42725 -> 48084 bytes .../mersher-distributed-tracing/index.html | 10 +- .../mersher-flow-control/index.html| 4 +- .../mersher-load-balance/index.html| 32 +- .../mersher-service-management/index.html | 33 +++--- content/cn/docs/mersher-quick-start/index.html | 128 +++-- .../mersher-distributed-tracing/index.html | 10 +- .../mersher-flow-control/index.html| 4 +- .../mersher-load-balance/index.html| 29 - .../mersher-service-management/index.html | 37 +++--- content/docs/mersher-quick-start/index.html| 121 +-- content/feed.xml | 2 +- content/sitemap.xml| 2 +- 44 files changed, 425 insertions(+), 363 deletions(-) create mode 100644 assets/images/mersher/mersher-circuitbreaker-ret-nil.png create mode 100644 assets/images/mersher/mersher-deployment-simple.png create mode 100644 assets/images/mersher/mersher-flowchart-simple.png create mode 100644 assets/images/mersher/mersher-testpythonhttp2.png create mode 100644 content/assets/images/mersher/mersher-circuitbreaker-ret-nil.png create mode 100644 content/assets/images/mersher/mersher-deployment-simple.png create mode 100644 content/assets/images/mersher/mersher-flowchart-simple.png create mode 100644 content/assets/images/mersher/mersher-testpythonhttp2.png
[servicecomb-website] 02/02: Publish website
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git commit a72544bec77540d62b993b036322a9024131398b Author: Willem Jiang AuthorDate: Wed Aug 14 22:34:21 2019 +0800 Publish website --- .../mersher/mersher-circuitbreaker-ret-nil.png | Bin 0 -> 7302 bytes .../images/mersher/mersher-circuitbreaker-ret.png | Bin 5972 -> 9028 bytes .../images/mersher/mersher-circuitbreaker.png | Bin 15220 -> 30583 bytes .../images/mersher/mersher-deployment-simple.png | Bin 0 -> 51664 bytes .../images/mersher/mersher-flow-control-fail.png | Bin 26430 -> 6958 bytes .../images/mersher/mersher-flowchart-simple.png| Bin 0 -> 23925 bytes .../images/mersher/mersher-ser-manage-ver.png | Bin 5934 -> 16442 bytes .../assets/images/mersher/mersher-servercenter.png | Bin 31799 -> 28075 bytes content/assets/images/mersher/mersher-testinit.png | Bin 29517 -> 30550 bytes .../images/mersher/mersher-testpythonhttp2.png | Bin 0 -> 31215 bytes .../images/mersher/mersher-tracing-30111.png | Bin 42725 -> 48084 bytes .../mersher-distributed-tracing/index.html | 10 +- .../mersher-flow-control/index.html| 4 +- .../mersher-load-balance/index.html| 32 +- .../mersher-service-management/index.html | 33 +++--- content/cn/docs/mersher-quick-start/index.html | 128 +++-- .../mersher-distributed-tracing/index.html | 10 +- .../mersher-flow-control/index.html| 4 +- .../mersher-load-balance/index.html| 29 - .../mersher-service-management/index.html | 37 +++--- content/docs/mersher-quick-start/index.html| 121 +-- content/feed.xml | 2 +- content/sitemap.xml| 2 +- 23 files changed, 227 insertions(+), 185 deletions(-) diff --git a/content/assets/images/mersher/mersher-circuitbreaker-ret-nil.png b/content/assets/images/mersher/mersher-circuitbreaker-ret-nil.png new file mode 100644 index 000..33bd3cf Binary files /dev/null and b/content/assets/images/mersher/mersher-circuitbreaker-ret-nil.png differ diff --git a/content/assets/images/mersher/mersher-circuitbreaker-ret.png b/content/assets/images/mersher/mersher-circuitbreaker-ret.png index 803de40..5309f72 100644 Binary files a/content/assets/images/mersher/mersher-circuitbreaker-ret.png and b/content/assets/images/mersher/mersher-circuitbreaker-ret.png differ diff --git a/content/assets/images/mersher/mersher-circuitbreaker.png b/content/assets/images/mersher/mersher-circuitbreaker.png index 907ae18..2bf3b5a 100644 Binary files a/content/assets/images/mersher/mersher-circuitbreaker.png and b/content/assets/images/mersher/mersher-circuitbreaker.png differ diff --git a/content/assets/images/mersher/mersher-deployment-simple.png b/content/assets/images/mersher/mersher-deployment-simple.png new file mode 100644 index 000..f65c8f3 Binary files /dev/null and b/content/assets/images/mersher/mersher-deployment-simple.png differ diff --git a/content/assets/images/mersher/mersher-flow-control-fail.png b/content/assets/images/mersher/mersher-flow-control-fail.png index bab78f0..6dedb46 100644 Binary files a/content/assets/images/mersher/mersher-flow-control-fail.png and b/content/assets/images/mersher/mersher-flow-control-fail.png differ diff --git a/content/assets/images/mersher/mersher-flowchart-simple.png b/content/assets/images/mersher/mersher-flowchart-simple.png new file mode 100644 index 000..a9d4549 Binary files /dev/null and b/content/assets/images/mersher/mersher-flowchart-simple.png differ diff --git a/content/assets/images/mersher/mersher-ser-manage-ver.png b/content/assets/images/mersher/mersher-ser-manage-ver.png index c65ee50..2348a34 100644 Binary files a/content/assets/images/mersher/mersher-ser-manage-ver.png and b/content/assets/images/mersher/mersher-ser-manage-ver.png differ diff --git a/content/assets/images/mersher/mersher-servercenter.png b/content/assets/images/mersher/mersher-servercenter.png index 5279def..ef14561 100644 Binary files a/content/assets/images/mersher/mersher-servercenter.png and b/content/assets/images/mersher/mersher-servercenter.png differ diff --git a/content/assets/images/mersher/mersher-testinit.png b/content/assets/images/mersher/mersher-testinit.png index 2ed1b64..cc5c861 100644 Binary files a/content/assets/images/mersher/mersher-testinit.png and b/content/assets/images/mersher/mersher-testinit.png differ diff --git a/content/assets/images/mersher/mersher-testpythonhttp2.png b/content/assets/images/mersher/mersher-testpythonhttp2.png new file mode 100644 index 000..a8a0fd1 Binary files /dev/null and b/content/assets/images/mersher/mersher-testpythonhttp2.png differ diff --git
[servicecomb-website] 01/02: Merge branch 'master' into asf-site
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git commit e246dd94a4bfb52efa697ad78b47db7e2f93ab35 Merge: 9a67a3a 00515d6 Author: Willem Jiang AuthorDate: Wed Aug 14 22:33:21 2019 +0800 Merge branch 'master' into asf-site _docs/cn/mersher-distributed-tracing.md| 10 +- _docs/cn/mersher-flow-control.md | 4 +- _docs/cn/mersher-load-balance.md | 29 +- _docs/cn/mersher-quick-start.md| 114 ++--- _docs/cn/mersher-service-management.md | 32 +++--- _docs/mersher-distributed-tracing.md | 10 +- _docs/mersher-flow-control.md | 4 +- _docs/mersher-load-balance.md | 25 - _docs/mersher-quick-start.md | 112 +--- _docs/mersher-service-management.md| 36 --- .../mersher/mersher-circuitbreaker-ret-nil.png | Bin 0 -> 7302 bytes .../images/mersher/mersher-circuitbreaker-ret.png | Bin 5972 -> 9028 bytes assets/images/mersher/mersher-circuitbreaker.png | Bin 15220 -> 30583 bytes .../images/mersher/mersher-deployment-simple.png | Bin 0 -> 51664 bytes .../images/mersher/mersher-flow-control-fail.png | Bin 26430 -> 6958 bytes assets/images/mersher/mersher-flowchart-simple.png | Bin 0 -> 23925 bytes assets/images/mersher/mersher-ser-manage-ver.png | Bin 5934 -> 16442 bytes assets/images/mersher/mersher-servercenter.png | Bin 31799 -> 28075 bytes assets/images/mersher/mersher-testinit.png | Bin 29517 -> 30550 bytes assets/images/mersher/mersher-testpythonhttp2.png | Bin 0 -> 31215 bytes assets/images/mersher/mersher-tracing-30111.png| Bin 42725 -> 48084 bytes 21 files changed, 198 insertions(+), 178 deletions(-)
[GitHub] [servicecomb-website] WillemJiang merged pull request #190: Edit mersher quick start.
WillemJiang merged pull request #190: Edit mersher quick start. URL: https://github.com/apache/servicecomb-website/pull/190 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-toolkit] kakulisen opened a new pull request #17: SCB-1436 Model is not generated, but the related package is imported
kakulisen opened a new pull request #17: SCB-1436 Model is not generated, but the related package is imported URL: https://github.com/apache/servicecomb-toolkit/pull/17 Model is not generated, but the related package is imported Signed-off-by: kakulisen <18813972...@163.com> This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-pack] coolbeevip opened a new pull request #535: [SCB-1435] Add fsm manual
coolbeevip opened a new pull request #535: [SCB-1435] Add fsm manual URL: https://github.com/apache/servicecomb-pack/pull/535 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-pack] 11/21: SCB-1418 change alpha-fsm-channel-kafka readme
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit e23065efbe26935b6854c2fd50c126ba0067e35c Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 09:54:45 2019 +0800 SCB-1418 change alpha-fsm-channel-kafka readme --- alpha/alpha-fsm-channel-kafka/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index d48070c..1213249 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -12,6 +12,6 @@ alpha.feature.akka.channel.type=kafka setting spring boot kafka ``` spring.kafka.bootstrap-servers=kafka bootstrap_servers -spring.kafka.consumer.group-id=kafka consumer group id -alpha.feature.akka.channel.kafka.topic= kafka topic name -``` \ No newline at end of file +spring.kafka.consumer.group-id=kafka consumer group id, default servicecomb-pack +alpha.feature.akka.channel.kafka.topic= kafka topic name, default servicecomb-pack-actor-event +```
[servicecomb-pack] 15/21: SCB-1418 add consumer param doc to readme
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 81e8b7f6bf571732ea63820ffc666d66c63a80ea Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:22:03 2019 +0800 SCB-1418 add consumer param doc to readme --- alpha/alpha-fsm-channel-kafka/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index 78d6167..6e9455d 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -17,4 +17,7 @@ alpha.feature.akka.channel.kafka.topic= kafka topic name, default servicecomb-pa spring.kafka.producer.batch-size= producer batch size, default 16384 spring.kafka.producer.retries = producer retries, default 0 spring.kafka.producer.buffer.memory = producer buffer memory, default 33364432 +spring.kafka.consumer.auto.offset.reset = consumer auto offset reset, default earliest +spring.kafka.consumer.enable.auto.commit = consumer enable auto commit, default true +spring.kafka.consumer.auto.commit.interval.ms = consumer auto commit interval ms, default 100 ```
[servicecomb-pack] 20/21: SCB-1418 add listener param doc to readme
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 54ca2189b175f0decd4ab2890b6e51729d77613a Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 11:00:20 2019 +0800 SCB-1418 add listener param doc to readme --- alpha/alpha-fsm-channel-kafka/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index 5a63b47..6f6df9c 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -20,4 +20,6 @@ spring.kafka.producer.buffer.memory = producer buffer memory, default 33364432 spring.kafka.consumer.auto.offset.reset = consumer auto offset reset, default earliest spring.kafka.consumer.enable.auto.commit = consumer enable auto commit, default false spring.kafka.consumer.auto.commit.interval.ms = consumer auto commit interval ms, default 100 +spring.kafka.listener.ackMode = consumer listener ack mode , default AckMode.MANUAL_IMMEDIATE +spring.kafka.listener.pollTimeout = consumer listener pool timeout, default 1500 ms ```
[servicecomb-pack] 07/21: SCB-1418 add License
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit fe0fc45e9684a6a89a7508be774a02d4a089a6d0 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 12:08:11 2019 +0800 SCB-1418 add License --- .../channel/kafka/KafkaChannelAutoConfiguration.java| 17 - .../fsm/channel/kafka/test/KafkaActorEventSink.java | 16 .../alpha/fsm/channel/kafka/test/KafkaApplication.java | 16 .../alpha/fsm/channel/kafka/test/KafkaChannelTest.java | 16 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index eca7432..4f6569c 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -1,3 +1,19 @@ +/* + * 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.pack.alpha.fsm.channel.kafka; import com.google.common.collect.Maps; @@ -5,7 +21,6 @@ import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.serialization.StringDeserializer; import org.apache.kafka.common.serialization.StringSerializer; -import org.apache.servicecomb.pack.alpha.core.NodeStatus; import org.apache.servicecomb.pack.alpha.core.fsm.sink.ActorEventSink; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java index cb08d43..06ed3c8 100644 --- a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java +++ b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java @@ -1,3 +1,19 @@ +/* + * 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.pack.alpha.fsm.channel.kafka.test; import org.apache.servicecomb.pack.alpha.core.fsm.event.base.BaseEvent; diff --git a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaApplication.java b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaApplication.java index 41d1b61..9b001eb 100644 --- a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaApplication.java +++ b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaApplication.java @@ -1,3 +1,19 @@ +/* + * 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
[servicecomb-pack] 17/21: SCB-1418 change spring.kafka.consumer.enable.auto.commit default value to false
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit f9ab6e462308b6447df310b6c60dd511f577336d Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:42:24 2019 +0800 SCB-1418 change spring.kafka.consumer.enable.auto.commit default value to false --- alpha/alpha-fsm-channel-kafka/README.md | 2 +- .../pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index 6e9455d..5a63b47 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -18,6 +18,6 @@ spring.kafka.producer.batch-size= producer batch size, default 16384 spring.kafka.producer.retries = producer retries, default 0 spring.kafka.producer.buffer.memory = producer buffer memory, default 33364432 spring.kafka.consumer.auto.offset.reset = consumer auto offset reset, default earliest -spring.kafka.consumer.enable.auto.commit = consumer enable auto commit, default true +spring.kafka.consumer.enable.auto.commit = consumer enable auto commit, default false spring.kafka.consumer.auto.commit.interval.ms = consumer auto commit interval ms, default 100 ``` diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index ac38098..6a451ec 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -73,7 +73,7 @@ public class KafkaChannelAutoConfiguration { @Value("${spring.kafka.consumer.auto.offset.reset:earliest}") private String autoOffsetReset; -@Value("${spring.kafka.consumer.enable.auto.commit:true}") +@Value("${spring.kafka.consumer.enable.auto.commit:false}") private boolean enableAutoCommit; @Value("${spring.kafka.consumer.auto.commit.interval.ms:100}")
[servicecomb-pack] 02/21: SCB-1418 add alpha-fsm-channel-kafka module to alpha
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 10bbf744f9caeecee7d4fc1fbee52654d4a78fd4 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:44:18 2019 +0800 SCB-1418 add alpha-fsm-channel-kafka module to alpha --- alpha/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/alpha/pom.xml b/alpha/pom.xml index 66e1660..7552ade 100644 --- a/alpha/pom.xml +++ b/alpha/pom.xml @@ -34,6 +34,7 @@ alpha-core alpha-fsm alpha-fsm-channel-redis +alpha-fsm-channel-kafka alpha-benchmark alpha-spring-cloud-starter-eureka alpha-spring-cloud-starter-consul
[servicecomb-pack] 19/21: SCB-1418 add ackMode poolTimeout to KafkaChannelAutoConfiguration
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit fa584b4cf30dedfaab4ceed6be47412e8f0d8c61 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:58:11 2019 +0800 SCB-1418 add ackMode poolTimeout to KafkaChannelAutoConfiguration --- .../alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index 6a451ec..a0793d1 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -37,6 +37,7 @@ import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; import org.springframework.kafka.config.KafkaListenerContainerFactory; import org.springframework.kafka.core.*; import org.springframework.kafka.listener.ConcurrentMessageListenerContainer; +import org.springframework.kafka.listener.ContainerProperties; import org.springframework.kafka.support.serializer.JsonDeserializer; import org.springframework.kafka.support.serializer.JsonSerializer; @@ -79,6 +80,12 @@ public class KafkaChannelAutoConfiguration { @Value("${spring.kafka.consumer.auto.commit.interval.ms:100}") private int autoCommitIntervalMs; +@Value("${spring.kafka.listener.ackMode:MANUAL_IMMEDIATE}") +private String ackMode; + +@Value("${spring.kafka.listener.pollTimeout:1500}") +private long poolTimeout; + @Bean @ConditionalOnMissingBean public ProducerFactory producerFactory(){ @@ -125,7 +132,8 @@ public class KafkaChannelAutoConfiguration { ConcurrentKafkaListenerContainerFactory concurrentKafkaListenerContainerFactory = new ConcurrentKafkaListenerContainerFactory<>(); concurrentKafkaListenerContainerFactory.setConsumerFactory(consumerFactory()); - concurrentKafkaListenerContainerFactory.getContainerProperties().setPollTimeout(1500L); + concurrentKafkaListenerContainerFactory.getContainerProperties().setPollTimeout(poolTimeout); + concurrentKafkaListenerContainerFactory.getContainerProperties().setAckMode(ContainerProperties.AckMode.valueOf(ackMode)); return concurrentKafkaListenerContainerFactory; }
[servicecomb-pack] 13/21: SCB-1418 add producer param to KafkaChannelAutoConfiguration
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit cf167571bbf7b8eb7488c8398d61d78b37ba93e3 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:12:17 2019 +0800 SCB-1418 add producer param to KafkaChannelAutoConfiguration --- .../fsm/channel/kafka/KafkaChannelAutoConfiguration.java | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index 4f6569c..723a36e 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -61,6 +61,16 @@ public class KafkaChannelAutoConfiguration { @Value("${spring.kafka.consumer.properties.spring.json.trusted.packages:org.apache.servicecomb.pack.alpha.core.fsm.event,org.apache.servicecomb.pack.alpha.core.fsm.event.base,}org.apache.servicecomb.pack.alpha.core.fsm.event.internal") private String trusted_packages; +@Value("${spring.kafka.producer.batch-size:16384}") +private int batchSize; + +@Value("${spring.kafka.producer.retries:0}") +private int retries; + +@Value("${spring.kafka.producer.buffer.memory:33364432}") +private long bufferMemory; + + @Bean @ConditionalOnMissingBean public ProducerFactory producerFactory(){ @@ -68,9 +78,9 @@ public class KafkaChannelAutoConfiguration { map.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrap_servers); map.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class); map.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class); -map.put(ProducerConfig.RETRIES_CONFIG, 0); -map.put(ProducerConfig.BATCH_SIZE_CONFIG, 16304); -map.put(ProducerConfig.BUFFER_MEMORY_CONFIG, 33354432); +map.put(ProducerConfig.RETRIES_CONFIG, retries); +map.put(ProducerConfig.BATCH_SIZE_CONFIG, batchSize); +map.put(ProducerConfig.BUFFER_MEMORY_CONFIG, bufferMemory); return new DefaultKafkaProducerFactory<>(map); }
[servicecomb-pack] 18/21: SCB-1418 add Acknowledgment to KafkaMessageListener
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 208e294bcfe90107f8dbb10dbefb2be2bce5e668 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:57:37 2019 +0800 SCB-1418 add Acknowledgment to KafkaMessageListener --- .../pack/alpha/fsm/channel/kafka/KafkaMessageListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessageListener.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessageListener.java index fe6d535..8d1f880 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessageListener.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaMessageListener.java @@ -21,6 +21,7 @@ import org.apache.servicecomb.pack.alpha.core.fsm.sink.ActorEventSink; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.kafka.annotation.KafkaListener; +import org.springframework.kafka.support.Acknowledgment; public class KafkaMessageListener { @@ -33,17 +34,16 @@ public class KafkaMessageListener { } @KafkaListener(topics = "${alpha.feature.akka.channel.kafka.topic:servicecomb-pack-actor-event}") -public void listener(BaseEvent baseEvent){ +public void listener(BaseEvent baseEvent, Acknowledgment acknowledgment){ if(logger.isDebugEnabled()){ logger.debug("listener event = [{}]", baseEvent); } try { actorEventSink.send(baseEvent); +acknowledgment.acknowledge(); }catch (Exception e){ logger.error("subscriber Exception = [{}]", e.getMessage(), e); } - - } } \ No newline at end of file
[servicecomb-pack] 06/21: SCB-1418 add alpha-fsm-channel-kafka module
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit f00727e48a1c27244de9f72aaae6ead2c377fc38 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:47:39 2019 +0800 SCB-1418 add alpha-fsm-channel-kafka module --- alpha/alpha-fsm-channel-kafka/README.md| 17 +++ alpha/alpha-fsm-channel-kafka/pom.xml | 125 + .../kafka/KafkaChannelAutoConfiguration.java | 110 ++ .../fsm/channel/kafka/KafkaMessageListener.java| 49 .../fsm/channel/kafka/KafkaMessagePublisher.java | 64 +++ .../src/main/resources/META-INF/spring.factories | 17 +++ .../channel/kafka/test/KafkaActorEventSink.java| 10 ++ .../fsm/channel/kafka/test/KafkaApplication.java | 24 .../fsm/channel/kafka/test/KafkaChannelTest.java | 72 .../src/test/resources/log4j2.xml | 30 + 10 files changed, 518 insertions(+) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md new file mode 100644 index 000..d48070c --- /dev/null +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -0,0 +1,17 @@ +# FSM kafka channel +## Enabled Saga State Machine Module + +Using `alpha.feature.akka.enabled=true` launch Alpha and Omega Side +Using `alpha.feature.akka.channel.type=kafka` launch Alpha and Omega Side + +```properties +alpha.feature.akka.enabled=true +alpha.feature.akka.channel.type=kafka +``` + +setting spring boot kafka +``` +spring.kafka.bootstrap-servers=kafka bootstrap_servers +spring.kafka.consumer.group-id=kafka consumer group id +alpha.feature.akka.channel.kafka.topic= kafka topic name +``` \ No newline at end of file diff --git a/alpha/alpha-fsm-channel-kafka/pom.xml b/alpha/alpha-fsm-channel-kafka/pom.xml new file mode 100644 index 000..b18babd --- /dev/null +++ b/alpha/alpha-fsm-channel-kafka/pom.xml @@ -0,0 +1,125 @@ + + + +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;> + +alpha +org.apache.servicecomb.pack +0.5.0-SNAPSHOT + + 4.0.0 + + alpha-fsm-channel-kafka + Pack::Alpha::Fsm::channel::kafka + + +1.8 +0.4.0 + + + + + +org.springframework.boot +spring-boot-dependencies +${spring.boot.version} +pom +import + + +com.typesafe.akka +akka-persistence_2.12 +${akka.version} + + + + + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.apache.servicecomb.pack + pack-common + + + org.apache.servicecomb.pack + alpha-core + + + com.google.guava + guava + + + org.springframework.boot + spring-boot-starter-log4j2 + + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-core + test + + + + + org.springframework.boot + spring-boot-starter-test + + + org.springframework.boot + spring-boot-starter-logging + + + + + junit + junit + + + org.springframework.kafka + spring-kafka + + + org.springframework.kafka + spring-kafka-test + test + + + org.scala-lang + scala-reflect + 2.11.12 +test + + + org.scala-lang + scala-library + 2.11.12 + test + + + + diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java new file mode 100644 index 000..eca7432 --- /dev/null +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -0,0 +1,110 @@ +package org.apache.servicecomb.pack.alpha.fsm.channel.kafka; + +import com.google.common.collect.Maps; +import org.apache.kafka.clients.consumer.ConsumerConfig; +import org.apache.kafka.clients.producer.ProducerConfig; +import org.apache.kafka.common.serialization.StringDeserializer; +import org.apache.kafka.common.serialization.StringSerializer; +import org.apache.servicecomb.pack.alpha.core.NodeStatus; +import org.apache.servicecomb.pack.alpha.core.fsm.sink.ActorEventSink; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import
[servicecomb-pack] 01/21: SCB-1418 add alpha-fsm-channel-kafka dependency to pom.xml
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit cb3aca273bf164f5e369ff133ac89c0eec9289b6 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:43:55 2019 +0800 SCB-1418 add alpha-fsm-channel-kafka dependency to pom.xml --- pom.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 5a7c7ee..461924d 100644 --- a/pom.xml +++ b/pom.xml @@ -325,6 +325,11 @@ 0.5.0-SNAPSHOT + org.apache.servicecomb.pack + alpha-fsm-channel-kafka + 0.5.0-SNAPSHOT + + org.apache.servicecomb.pack alpha-server 0.5.0-SNAPSHOT
[servicecomb-pack] 14/21: SCB-1418 add consumer param to KafkaChannelAutoConfiguration
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 189d8a1e208607d549543447cf96c408c9ada378 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:20:31 2019 +0800 SCB-1418 add consumer param to KafkaChannelAutoConfiguration --- .../fsm/channel/kafka/KafkaChannelAutoConfiguration.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index 723a36e..ac38098 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -70,6 +70,14 @@ public class KafkaChannelAutoConfiguration { @Value("${spring.kafka.producer.buffer.memory:33364432}") private long bufferMemory; +@Value("${spring.kafka.consumer.auto.offset.reset:earliest}") +private String autoOffsetReset; + +@Value("${spring.kafka.consumer.enable.auto.commit:true}") +private boolean enableAutoCommit; + +@Value("${spring.kafka.consumer.auto.commit.interval.ms:100}") +private int autoCommitIntervalMs; @Bean @ConditionalOnMissingBean @@ -100,9 +108,9 @@ public class KafkaChannelAutoConfiguration { map.put(ConsumerConfig.GROUP_ID_CONFIG, groupId); map.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class); map.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonDeserializer.class); -map.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); -map.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, true); -map.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, 100); +map.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, autoOffsetReset); +map.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, enableAutoCommit); +map.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, autoCommitIntervalMs); map.put(JsonDeserializer.TRUSTED_PACKAGES, trusted_packages); if(logger.isDebugEnabled()){
[servicecomb-pack] 04/21: SCB-1418 change FsmAutoConfiguration.kafkaEventChannel
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 33b2bf9adbe78596f79e0124e6e35b1fa722ac59 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:46:42 2019 +0800 SCB-1418 change FsmAutoConfiguration.kafkaEventChannel --- .../apache/servicecomb/pack/alpha/fsm/FsmAutoConfiguration.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/FsmAutoConfiguration.java b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/FsmAutoConfiguration.java index c26b82c..17ece87 100644 --- a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/FsmAutoConfiguration.java +++ b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/FsmAutoConfiguration.java @@ -26,6 +26,7 @@ import com.typesafe.config.ConfigFactory; import java.util.Map; import javax.annotation.PostConstruct; import org.apache.servicecomb.pack.alpha.fsm.channel.ActiveMQActorEventChannel; +import org.apache.servicecomb.pack.alpha.fsm.channel.kafka.KafkaMessagePublisher; import org.apache.servicecomb.pack.alpha.fsm.channel.redis.RedisMessagePublisher; import org.apache.servicecomb.pack.alpha.fsm.metrics.MetricsService; import org.apache.servicecomb.pack.alpha.fsm.repository.NoneTransactionRepository; @@ -102,6 +103,7 @@ public class FsmAutoConfiguration { } @Bean + @ConditionalOnProperty(value = "alpha.feature.akka.channel.type", havingValue = "memory") @ConditionalOnMissingBean(ActorEventChannel.class) public ActorEventChannel memoryEventChannel(ActorEventSink actorEventSink, MetricsService metricsService) { @@ -111,6 +113,7 @@ public class FsmAutoConfiguration { @Bean @ConditionalOnProperty(value = "alpha.feature.akka.channel.type", havingValue = "activemq") + @ConditionalOnMissingBean(ActorEventChannel.class) public ActorEventChannel activeMqEventChannel(ActorEventSink actorEventSink, MetricsService metricsService) { return new ActiveMQActorEventChannel(actorEventSink, metricsService); @@ -118,9 +121,10 @@ public class FsmAutoConfiguration { @Bean @ConditionalOnProperty(value = "alpha.feature.akka.channel.type", havingValue = "kafka") + @ConditionalOnMissingBean(ActorEventChannel.class) public ActorEventChannel kafkaEventChannel(ActorEventSink actorEventSink, - MetricsService metricsService) { -return new KafkaActorEventChannel(actorEventSink, metricsService); + MetricsService metricsService, @Lazy KafkaMessagePublisher kafkaMessagePublisher){ +return new KafkaActorEventChannel(actorEventSink, metricsService, kafkaMessagePublisher); } @Bean
[servicecomb-pack] 21/21: SCB-1418 change buffer.memory default value
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 7a0468baf8a77ff0874be201f7243e3ae3a39014 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 12:39:47 2019 +0800 SCB-1418 change buffer.memory default value --- alpha/alpha-fsm-channel-kafka/README.md | 2 +- .../pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index 6f6df9c..e632f8b 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -16,7 +16,7 @@ spring.kafka.consumer.group-id=kafka consumer group id, default servicecomb-pack alpha.feature.akka.channel.kafka.topic= kafka topic name, default servicecomb-pack-actor-event spring.kafka.producer.batch-size= producer batch size, default 16384 spring.kafka.producer.retries = producer retries, default 0 -spring.kafka.producer.buffer.memory = producer buffer memory, default 33364432 +spring.kafka.producer.buffer.memory = producer buffer memory, default 33554432 spring.kafka.consumer.auto.offset.reset = consumer auto offset reset, default earliest spring.kafka.consumer.enable.auto.commit = consumer enable auto commit, default false spring.kafka.consumer.auto.commit.interval.ms = consumer auto commit interval ms, default 100 diff --git a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java index a0793d1..229c888 100644 --- a/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java +++ b/alpha/alpha-fsm-channel-kafka/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/KafkaChannelAutoConfiguration.java @@ -68,7 +68,7 @@ public class KafkaChannelAutoConfiguration { @Value("${spring.kafka.producer.retries:0}") private int retries; -@Value("${spring.kafka.producer.buffer.memory:33364432}") +@Value("${spring.kafka.producer.buffer.memory:33554432}") private long bufferMemory; @Value("${spring.kafka.consumer.auto.offset.reset:earliest}")
[servicecomb-pack] 12/21: SCB-1418 add producer param doc to readme
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit a00a148448d4a396dc282cbd2acf8e8359c0e71e Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Wed Aug 14 10:12:02 2019 +0800 SCB-1418 add producer param doc to readme --- alpha/alpha-fsm-channel-kafka/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alpha/alpha-fsm-channel-kafka/README.md b/alpha/alpha-fsm-channel-kafka/README.md index 1213249..78d6167 100644 --- a/alpha/alpha-fsm-channel-kafka/README.md +++ b/alpha/alpha-fsm-channel-kafka/README.md @@ -14,4 +14,7 @@ setting spring boot kafka spring.kafka.bootstrap-servers=kafka bootstrap_servers spring.kafka.consumer.group-id=kafka consumer group id, default servicecomb-pack alpha.feature.akka.channel.kafka.topic= kafka topic name, default servicecomb-pack-actor-event +spring.kafka.producer.batch-size= producer batch size, default 16384 +spring.kafka.producer.retries = producer retries, default 0 +spring.kafka.producer.buffer.memory = producer buffer memory, default 33364432 ```
[servicecomb-pack] 10/21: SCB-1418 delete scala dependency to alpha-fsm-channel-kafka
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 5bde386f4476cea24bff7762d19364e09b16fdc9 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 17:03:57 2019 +0800 SCB-1418 delete scala dependency to alpha-fsm-channel-kafka --- alpha/alpha-fsm-channel-kafka/pom.xml | 12 1 file changed, 12 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/pom.xml b/alpha/alpha-fsm-channel-kafka/pom.xml index b18babd..90e95a4 100644 --- a/alpha/alpha-fsm-channel-kafka/pom.xml +++ b/alpha/alpha-fsm-channel-kafka/pom.xml @@ -108,18 +108,6 @@ spring-kafka-test test - - org.scala-lang - scala-reflect - 2.11.12 -test - - - org.scala-lang - scala-library - 2.11.12 - test -
[servicecomb-pack] 05/21: SCB-1418 add KafkaActorEventChannel.kafkaMessagePublisher field
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 35380b8ae96bcf00c834d5f773ec9d86ba53fbbd Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:47:18 2019 +0800 SCB-1418 add KafkaActorEventChannel.kafkaMessagePublisher field --- .../pack/alpha/fsm/channel/KafkaActorEventChannel.java| 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/KafkaActorEventChannel.java b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/KafkaActorEventChannel.java index 331d212..aca2676 100644 --- a/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/KafkaActorEventChannel.java +++ b/alpha/alpha-fsm/src/main/java/org/apache/servicecomb/pack/alpha/fsm/channel/KafkaActorEventChannel.java @@ -19,6 +19,7 @@ package org.apache.servicecomb.pack.alpha.fsm.channel; import java.lang.invoke.MethodHandles; import org.apache.servicecomb.pack.alpha.core.fsm.event.base.BaseEvent; +import org.apache.servicecomb.pack.alpha.fsm.channel.kafka.KafkaMessagePublisher; import org.apache.servicecomb.pack.alpha.fsm.metrics.MetricsService; import org.apache.servicecomb.pack.alpha.core.fsm.sink.ActorEventSink; import org.slf4j.Logger; @@ -27,13 +28,16 @@ import org.slf4j.LoggerFactory; public class KafkaActorEventChannel extends AbstractActorEventChannel { private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + private KafkaMessagePublisher kafkaMessagePublisher; + public KafkaActorEventChannel( - ActorEventSink actorEventSink, MetricsService metricsService) { + ActorEventSink actorEventSink, MetricsService metricsService, KafkaMessagePublisher kafkaMessagePublisher) { super(actorEventSink, metricsService); +this.kafkaMessagePublisher = kafkaMessagePublisher; } @Override public void sendTo(BaseEvent event){ -throw new UnsupportedOperationException("Doesn't implement yet!"); + kafkaMessagePublisher.publish(event); } }
[servicecomb-pack] 09/21: SCB-1418 add countDownLatch field to KafkaActorEventSink
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 6438dd32d83d87bb40dd1a4d383740927b83e4eb Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 16:38:48 2019 +0800 SCB-1418 add countDownLatch field to KafkaActorEventSink --- .../pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java | 5 + 1 file changed, 5 insertions(+) diff --git a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java index 06ed3c8..b392a94 100644 --- a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java +++ b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaActorEventSink.java @@ -19,8 +19,13 @@ package org.apache.servicecomb.pack.alpha.fsm.channel.kafka.test; import org.apache.servicecomb.pack.alpha.core.fsm.event.base.BaseEvent; import org.apache.servicecomb.pack.alpha.core.fsm.sink.ActorEventSink; +import java.util.concurrent.CountDownLatch; + public class KafkaActorEventSink implements ActorEventSink { +public static final CountDownLatch countDownLatch = new CountDownLatch(8); + @Override public void send(BaseEvent event) throws Exception { +countDownLatch.countDown(); } }
[servicecomb-pack] 08/21: SCB-1418 add test actorEventSink to KafkaChannelTest
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 0ef23fb5fd83eaf3b0218ae1607da6bf6bd093b0 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 16:38:32 2019 +0800 SCB-1418 add test actorEventSink to KafkaChannelTest --- .../pack/alpha/fsm/channel/kafka/test/KafkaChannelTest.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaChannelTest.java b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaChannelTest.java index 68d650a..942b16d 100644 --- a/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaChannelTest.java +++ b/alpha/alpha-fsm-channel-kafka/src/test/java/org/apache/servicecomb/pack/alpha/fsm/channel/kafka/test/KafkaChannelTest.java @@ -34,6 +34,8 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.*; import java.util.concurrent.TimeUnit; +import static org.junit.Assert.assertEquals; + @RunWith(SpringRunner.class) @SpringBootTest(classes = KafkaApplication.class, @@ -52,6 +54,9 @@ public class KafkaChannelTest { @Autowired private KafkaMessagePublisher kafkaMessagePublisher; +@Autowired +private KafkaActorEventSink actorEventSink; + @Before public void setup(){ } @@ -66,11 +71,13 @@ public class KafkaChannelTest { buildData(globalTxId, localTxId_1, localTxId_2, localTxId_3).forEach(baseEvent -> kafkaMessagePublisher.publish(baseEvent)); try { -TimeUnit.SECONDS.sleep(100); +// Waiting for sub +TimeUnit.SECONDS.sleep(5); } catch (InterruptedException e) { -e.printStackTrace(); } +assertEquals(0, actorEventSink.countDownLatch.getCount()); + } private List buildData(String globalTxId, String localTxId_1, String localTxId_2, String localTxId_3){
[servicecomb-pack] 03/21: SCB-1418 add alpha-fsm-channel-kafka dependency to alpha-fsm
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git commit 562a0c53a5019cf461933340e5aba61186bb1ac5 Author: CMonkey <42.codemon...@gmail.com> AuthorDate: Tue Aug 13 11:44:48 2019 +0800 SCB-1418 add alpha-fsm-channel-kafka dependency to alpha-fsm --- alpha/alpha-fsm/pom.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/alpha/alpha-fsm/pom.xml b/alpha/alpha-fsm/pom.xml index 4ec848b..ed56e4a 100644 --- a/alpha/alpha-fsm/pom.xml +++ b/alpha/alpha-fsm/pom.xml @@ -71,7 +71,10 @@ org.apache.servicecomb.pack alpha-fsm-channel-redis - + + org.apache.servicecomb.pack + alpha-fsm-channel-kafka + org.springframework.boot spring-boot-starter-data-elasticsearch
[GitHub] [servicecomb-pack] WillemJiang merged pull request #534: SCB-1418 Alpha Event Kafka Channel Plugin
WillemJiang merged pull request #534: SCB-1418 Alpha Event Kafka Channel Plugin URL: https://github.com/apache/servicecomb-pack/pull/534 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-website] surechen opened a new pull request #190: Edit mersher quick start.
surechen opened a new pull request #190: Edit mersher quick start. URL: https://github.com/apache/servicecomb-website/pull/190 Signed-off-by: surechen This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-java-chassis] branch master updated: [SCB-1431] set all dependency versions as properties
This is an automated email from the ASF dual-hosted git repository. yaohaishi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git The following commit(s) were added to refs/heads/master by this push: new be73f2e [SCB-1431] set all dependency versions as properties be73f2e is described below commit be73f2ea603b254244912f8944ffe2d3f70e549d Author: AngLi2 AuthorDate: Mon Aug 12 17:08:19 2019 +0800 [SCB-1431] set all dependency versions as properties --- java-chassis-dependencies/default/pom.xml | 1212 ++--- java-chassis-dependencies/spring4/pom.xml |1 + java-chassis-dependencies/spring5/pom.xml | 37 +- java-chassis-dependencies/springboot1/pom.xml | 19 +- java-chassis-dependencies/springboot2/pom.xml | 10 +- 5 files changed, 699 insertions(+), 580 deletions(-) diff --git a/java-chassis-dependencies/default/pom.xml b/java-chassis-dependencies/default/pom.xml index 3bccb80..15d79a0 100644 --- a/java-chassis-dependencies/default/pom.xml +++ b/java-chassis-dependencies/default/pom.xml @@ -31,70 +31,94 @@ pom + +3.7 +0.7.6 +1.6.2 +1.8.13 +3.0.0 +5.6.0 +1.9.3 +1.10 +2.6 +2.6 +1.2 +3.1.6 + 1.0.7.fixed.3500 +8.5.32 +8.5.2 +4.0.2 +2.0.0 +3.0.1 +1.14.2 +1.12.10 +26.0-jre +4.2.0 +1.3 +6.0.2.Final +6.0.14.Final +4.5.7 +1.5.12 2.9.8 -3.6.3 -0.10 -4.3.20.RELEASE -1.7.26 +3.24.0-GA +0.26 +1.2 +1 +1.5 +4.0.1 +1.2 +2.0.1.Final +2.0.1 +2.9.0 +2.22.2 +1.3.8 +1.30 +2.4 +4.12 1.2.17 2.11.2 -2.6 -3.24.0-GA -2.0.1 -4.0.1 -4.5.7 +1.2.3 +1.10.19 +3.10.4 +5.3.2.Final +0.3.0 +4.1.28.Final +3.11.0 +1.6.2 +3.6.1 1.5.9 +2.2.25 +2.2.5 +1.1.6 +0.4.9 +1.0.0 +0.12.25 +0.3.0 +0.1.0 +1.7.26 +1.23 +0.83.0 +4.3.20.RELEASE +1.5.12.RELEASE +Edgware.SR3 1.5.22 -4.1.28.Final +1.3.3 2.0.14.Final -${basedir}/../.. -5.3.2.Final -3.1.6 -1.2.3 -5.6.0 +0.10 +2.6.0 +3.6.3 +4.4.1 +1.4.9 2.9.3 2.7.13 +3.4.13 + +${basedir}/../.. - -javax.inject -javax.inject -1 - - -com.netflix.ribbon -ribbon -2.2.5 - - -com.netflix.ribbon -ribbon-core -2.2.5 - - -com.google.code.findbugs -annotations - - - - -com.netflix.ribbon -ribbon-loadbalancer -2.2.5 - - -com.google.code.findbugs -annotations - - - - -com.netflix.hystrix -hystrix-core -1.5.12 - + ch.qos.logback logback-classic @@ -105,311 +129,352 @@ logback-core ${logback.version} + -junit -junit -4.12 -test +com.101tec +zkclient +${tec-zkclient.version} + -org.awaitility -awaitility -3.0.0 -test +com.dyuproject.protostuff +protostuff-api +${dyuproject-protostuff.version} -com.github.seanyinx -unit-scaffolding -1.0.0 -test +com.dyuproject.protostuff +protostuff-collectionschema +${dyuproject-protostuff.version} -com.github.tomakehurst -wiremock-standalone -2.6.0 -test +com.dyuproject.protostuff +protostuff-core +${dyuproject-protostuff.version} -io.reactivex -rxjava -1.1.6 +com.dyuproject.protostuff +protostuff-runtime +${dyuproject-protostuff.version} + -org.mockito -mockito-core -1.10.19 -test +com.esotericsoftware +kryo-shaded +${esotericsoftware.version} + -org.mockito -mockito-all -1.10.19 -test +com.fasterxml.jackson.core +jackson-annotations +${jackson.version} -org.jmockit -jmockit -1.30 -test +com.fasterxml.jackson.core +jackson-core +${jackson.version} -org.hamcrest -hamcrest-core -1.3 -test +com.fasterxml.jackson.core +jackson-databind +${jackson.version} + -org.hamcrest -hamcrest-all -1.3 -test +com.fasterxml.jackson.dataformat +jackson-dataformat-protobuf +${jackson.version} -
[GitHub] [servicecomb-java-chassis] yhs0092 merged pull request #1295: [SCB-1431] set all dependency versions as properties
yhs0092 merged pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313785733 ## File path: java-chassis-dependencies/default/pom.xml ## @@ -31,70 +31,94 @@ pom + +3.7 +0.7.6 +1.6.2 +1.8.13 +3.0.0 +5.6.0 +1.9.3 +1.10 +2.6 +2.6 +1.2 +3.1.6 + 1.0.7.fixed.3500 +8.5.32 +8.5.2 +4.0.2 +2.0.0 +3.0.1 +1.14.2 +1.12.10 +26.0-jre +4.2.0 +1.3 +6.0.2.Final +6.0.14.Final +4.5.7 +1.5.12 2.9.8 -3.6.3 -0.10 -4.3.20.RELEASE -1.7.26 +3.24.0-GA +0.26 +1.2 +1 +1.5 +4.0.1 +1.2 +2.0.1.Final +2.0.1 +2.9.0 +2.22.2 +1.3.8 +1.30 +2.4 +4.12 1.2.17 2.11.2 -2.6 -3.24.0-GA -2.0.1 -4.0.1 -4.5.7 +1.2.3 +1.10.19 +3.10.4 +5.3.2.Final +0.3.0 +4.1.28.Final +3.11.0 +1.6.2 +3.6.1 1.5.9 +2.2.25 +2.2.5 +1.1.6 +0.4.9 +1.0.0 +0.12.25 +0.3.0 +0.1.0 +1.7.26 +1.23 +0.83.0 +4.3.20.RELEASE +1.5.12.RELEASE +Edgware.SR3 1.5.22 -4.1.28.Final +1.3.3 2.0.14.Final -${basedir}/../.. -5.3.2.Final -3.1.6 -1.2.3 -5.6.0 +0.10 +2.6.0 +3.6.3 +4.4.1 +1.4.9 Review comment: Yes, that is exactly what I meant. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
yhs0092 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313782156 ## File path: java-chassis-dependencies/default/pom.xml ## @@ -31,70 +31,94 @@ pom + +3.7 +0.7.6 +1.6.2 +1.8.13 +3.0.0 +5.6.0 +1.9.3 +1.10 +2.6 +2.6 +1.2 +3.1.6 + 1.0.7.fixed.3500 +8.5.32 +8.5.2 +4.0.2 +2.0.0 +3.0.1 +1.14.2 +1.12.10 +26.0-jre +4.2.0 +1.3 +6.0.2.Final +6.0.14.Final +4.5.7 +1.5.12 2.9.8 -3.6.3 -0.10 -4.3.20.RELEASE -1.7.26 +3.24.0-GA +0.26 +1.2 +1 +1.5 +4.0.1 +1.2 +2.0.1.Final +2.0.1 +2.9.0 +2.22.2 +1.3.8 +1.30 +2.4 +4.12 1.2.17 2.11.2 -2.6 -3.24.0-GA -2.0.1 -4.0.1 -4.5.7 +1.2.3 +1.10.19 +3.10.4 +5.3.2.Final +0.3.0 +4.1.28.Final +3.11.0 +1.6.2 +3.6.1 1.5.9 +2.2.25 +2.2.5 +1.1.6 +0.4.9 +1.0.0 +0.12.25 +0.3.0 +0.1.0 +1.7.26 +1.23 +0.83.0 +4.3.20.RELEASE +1.5.12.RELEASE +Edgware.SR3 1.5.22 -4.1.28.Final +1.3.3 2.0.14.Final -${basedir}/../.. -5.3.2.Final -3.1.6 -1.2.3 -5.6.0 +0.10 +2.6.0 +3.6.3 +4.4.1 +1.4.9 Review comment: Hi, do you mean this pull request is just for the dependencies rearrangement, and the dependencies upgradation is in your next pull request? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] linzb0123 opened a new pull request #1296: [SCB-1434] add a springboot2 archetype
linzb0123 opened a new pull request #1296: [SCB-1434] add a springboot2 archetype URL: https://github.com/apache/servicecomb-java-chassis/pull/1296 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 -Pit` 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 to 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] [servicecomb-java-chassis] yhs0092 commented on issue #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure
yhs0092 commented on issue #1294: [SCB-1297] NPE would be arised if you haven't set any value for servicecomb.config.ignoreResolveFailure URL: https://github.com/apache/servicecomb-java-chassis/pull/1294#issuecomment-521163256 #1292 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-kie] branch master updated: add project in uri path, modify related api to support the change (#25)
This is an automated email from the ASF dual-hosted git repository. tianxiaoliang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git The following commit(s) were added to refs/heads/master by this push: new ad07721 add project in uri path, modify related api to support the change (#25) ad07721 is described below commit ad07721aa1124f6952a9733e7cab6317e63f4e6c Author: Qi Liu <30484670+liuq...@users.noreply.github.com> AuthorDate: Wed Aug 14 16:01:39 2019 +0800 add project in uri path, modify related api to support the change (#25) * change rest api from '/v1/xxx' to '/v1/kie/xxx', add project field in label schema * add project in uri path, modify related api to support change 1. add project field in KVDoc and LabelDoc, add the param for project in backend api 2. all related mongo CRUD should add filter for project * remove project method, use existing methods * add a option in client side for project * remove mutiple read project --- client/client.go| 35 +++ client/client_test.go | 31 ++--- client/options.go | 31 - pkg/model/mongodb_doc.go| 2 + server/db/db.go | 8 ++-- server/resource/v1/doc_struct.go| 7 ++- server/resource/v1/history_resource.go | 4 +- server/resource/v1/history_resource_test.go | 4 +- server/resource/v1/kv_resource.go | 43 +- server/resource/v1/kv_resource_test.go | 2 +- server/service/history/service.go | 2 +- server/service/kv/dao.go| 13 +++--- server/service/kv/kv_test.go| 41 - server/service/kv/service.go| 45 +++ server/service/label/dao.go | 20 ++--- server/service/label/service.go | 7 +-- swagger/servicecomb-kie.yaml| 68 +++-- 17 files changed, 267 insertions(+), 96 deletions(-) diff --git a/client/client.go b/client/client.go index c1975ff..cfa41bb 100644 --- a/client/client.go +++ b/client/client.go @@ -35,7 +35,8 @@ import ( //const const ( - APIPathKV = "v1/kv" + version = "v1" + APIPathKV = "kie/kv" ) //client errors @@ -81,8 +82,15 @@ func New(config Config) (*Client, error) { } //Put create value of a key -func (c *Client) Put(ctx context.Context, kv model.KVDoc) (*model.KVDoc, error) { - url := fmt.Sprintf("%s/%s/%s", c.opts.Endpoint, APIPathKV, kv.Key) +func (c *Client) Put(ctx context.Context, kv model.KVDoc, opts ...OpOption) (*model.KVDoc, error) { + options := OpOptions{} + for _, o := range opts { + o() + } + if options.Project == "" { + options.Project = defaultProject + } + url := fmt.Sprintf("%s/%s/%s/%s/%s", c.opts.Endpoint, version, options.Project, APIPathKV, kv.Key) h := http.Header{} h.Set("Content-Type", "application/json") body, _ := json.Marshal(kv) @@ -118,7 +126,10 @@ func (c *Client) Get(ctx context.Context, key string, opts ...GetOption) ([]*mod for _, o := range opts { o() } - url := fmt.Sprintf("%s/%s/%s", c.opts.Endpoint, APIPathKV, key) + if options.Project == "" { + options.Project = defaultProject + } + url := fmt.Sprintf("%s/%s/%s/%s/%s", c.opts.Endpoint, version, options.Project, APIPathKV, key) h := http.Header{} resp, err := c.c.HTTPDoWithContext(ctx, "GET", url, h, nil) if err != nil { @@ -136,9 +147,8 @@ func (c *Client) Get(ctx context.Context, key string, opts ...GetOption) ([]*mod })) return nil, fmt.Errorf("get %s failed,http status [%s], body [%s]", key, resp.Status, b) } - - kvs := make([]*model.KVDoc, 0) - err = json.Unmarshal(b, kvs) + var kvs []*model.KVDoc + err = json.Unmarshal(b, ) if err != nil { openlogging.Error("unmarshal kv failed:" + err.Error()) return nil, err @@ -147,8 +157,15 @@ func (c *Client) Get(ctx context.Context, key string, opts ...GetOption) ([]*mod } //Delete remove kv -func (c *Client) Delete(ctx context.Context, kvID, labelID string) error { - url := fmt.Sprintf("%s/%s/?kvID=%s", c.opts.Endpoint, APIPathKV, kvID) +func (c *Client) Delete(ctx context.Context, kvID, labelID string, opts ...OpOption) error { + options := OpOptions{} + for _, o := range opts { + o() + } + if options.Project == "" { + options.Project = defaultProject + } + url := fmt.Sprintf("%s/%s/%s/%s/?kvID=%s", c.opts.Endpoint, version, options.Project, APIPathKV, kvID) if labelID != "" { url =
[GitHub] [servicecomb-kie] tianxiaoliang merged pull request #25: add project in uri path, modify related api to support the change
tianxiaoliang merged pull request #25: add project in uri path, modify related api to support the change URL: https://github.com/apache/servicecomb-kie/pull/25 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313733183 ## File path: java-chassis-dependencies/default/pom.xml ## @@ -31,70 +31,94 @@ pom + +3.7 +0.7.6 +1.6.2 +1.8.13 +3.0.0 +5.6.0 +1.9.3 +1.10 +2.6 +2.6 +1.2 +3.1.6 + 1.0.7.fixed.3500 +8.5.32 +8.5.2 +4.0.2 +2.0.0 +3.0.1 +1.14.2 +1.12.10 +26.0-jre +4.2.0 +1.3 +6.0.2.Final +6.0.14.Final +4.5.7 +1.5.12 2.9.8 -3.6.3 -0.10 -4.3.20.RELEASE -1.7.26 +3.24.0-GA +0.26 +1.2 +1 +1.5 +4.0.1 +1.2 +2.0.1.Final +2.0.1 +2.9.0 +2.22.2 +1.3.8 +1.30 +2.4 +4.12 1.2.17 2.11.2 -2.6 -3.24.0-GA -2.0.1 -4.0.1 -4.5.7 +1.2.3 +1.10.19 +3.10.4 +5.3.2.Final +0.3.0 +4.1.28.Final +3.11.0 +1.6.2 +3.6.1 1.5.9 +2.2.25 +2.2.5 +1.1.6 +0.4.9 +1.0.0 +0.12.25 +0.3.0 +0.1.0 +1.7.26 +1.23 +0.83.0 +4.3.20.RELEASE +1.5.12.RELEASE +Edgware.SR3 1.5.22 -4.1.28.Final +1.3.3 2.0.14.Final -${basedir}/../.. -5.3.2.Final -3.1.6 -1.2.3 -5.6.0 +0.10 +2.6.0 +3.6.3 +4.4.1 +1.4.9 Review comment: Just in case, this PR is just for setting versions as properties, all versions are the same as previous. Updating version will be done after this PR. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
AngLi2 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313732860 ## File path: java-chassis-dependencies/springboot2/pom.xml ## @@ -31,12 +31,16 @@ pom -2.1.2.RELEASE + +2.1.2.RELEASE Review comment: Just in case, this PR is just for setting versions as properties, all versions are the same as previous. Updating version will be done after this PR. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] jeho0815 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
jeho0815 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313730253 ## File path: java-chassis-dependencies/springboot2/pom.xml ## @@ -31,12 +31,16 @@ pom -2.1.2.RELEASE + +2.1.2.RELEASE Review comment: 2.1.3.RELEASE is better This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [servicecomb-java-chassis] jeho0815 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties
jeho0815 commented on a change in pull request #1295: [SCB-1431] set all dependency versions as properties URL: https://github.com/apache/servicecomb-java-chassis/pull/1295#discussion_r313729231 ## File path: java-chassis-dependencies/default/pom.xml ## @@ -31,70 +31,94 @@ pom + +3.7 +0.7.6 +1.6.2 +1.8.13 +3.0.0 +5.6.0 +1.9.3 +1.10 +2.6 +2.6 +1.2 +3.1.6 + 1.0.7.fixed.3500 +8.5.32 +8.5.2 +4.0.2 +2.0.0 +3.0.1 +1.14.2 +1.12.10 +26.0-jre +4.2.0 +1.3 +6.0.2.Final +6.0.14.Final +4.5.7 +1.5.12 2.9.8 -3.6.3 -0.10 -4.3.20.RELEASE -1.7.26 +3.24.0-GA +0.26 +1.2 +1 +1.5 +4.0.1 +1.2 +2.0.1.Final +2.0.1 +2.9.0 +2.22.2 +1.3.8 +1.30 +2.4 +4.12 1.2.17 2.11.2 -2.6 -3.24.0-GA -2.0.1 -4.0.1 -4.5.7 +1.2.3 +1.10.19 +3.10.4 +5.3.2.Final +0.3.0 +4.1.28.Final +3.11.0 +1.6.2 +3.6.1 1.5.9 +2.2.25 +2.2.5 +1.1.6 +0.4.9 +1.0.0 +0.12.25 +0.3.0 +0.1.0 +1.7.26 +1.23 +0.83.0 +4.3.20.RELEASE +1.5.12.RELEASE +Edgware.SR3 1.5.22 -4.1.28.Final +1.3.3 2.0.14.Final -${basedir}/../.. -5.3.2.Final -3.1.6 -1.2.3 -5.6.0 +0.10 +2.6.0 +3.6.3 +4.4.1 +1.4.9 Review comment: xstream should use 1.4.11.1 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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