You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/01/10 02:04:32 UTC

[GitHub] [servicecomb-java-chassis] GuoYL123 opened a new pull request #1518: [SCB-1711] support kie

GuoYL123 opened a new pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   (cherry picked from commit 833af5050ca3e26e75b327b499b0f9534f55d8b6)
   
   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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] coveralls edited a comment on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-572986333
 
 
   
   [![Coverage Status](https://coveralls.io/builds/28561546/badge)](https://coveralls.io/builds/28561546)
   
   Coverage decreased (-0.3%) to 85.052% when pulling **20563c1aabe5997b6eb28c115a8c85ef4a690779 on GuoYL123:master** into **1793757077ad2eebff71cdeb924fc920db3d55f0 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-584955432
 
 
   retrigger CI

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] coveralls edited a comment on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-572986333
 
 
   
   [![Coverage Status](https://coveralls.io/builds/28059898/badge)](https://coveralls.io/builds/28059898)
   
   Coverage decreased (-0.06%) to 83.9% when pulling **cf35e05f0ffc6d4faa6a553b4f3f2e4c82e337a4 on GuoYL123:master** into **c9e381b5d49b92698f069e6ecd77b3fa49b534b7 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376832350
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/client/KieClient.java
 ##########
 @@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.config.kie.client;
+
+import io.netty.handler.codec.http.HttpResponseStatus;
+import io.vertx.core.DeploymentOptions;
+import io.vertx.core.Vertx;
+import io.vertx.core.VertxOptions;
+import io.vertx.core.http.HttpClientOptions;
+import io.vertx.core.http.HttpClientRequest;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import org.apache.http.HttpStatus;
+import org.apache.servicecomb.config.kie.archaius.sources.KieConfigurationSourceImpl.UpdateHandler;
+import org.apache.servicecomb.config.kie.model.KVResponse;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.net.IpPort;
+import org.apache.servicecomb.foundation.common.net.NetUtils;
+import org.apache.servicecomb.foundation.common.utils.JsonUtils;
+import org.apache.servicecomb.foundation.vertx.AddressResolverConfig;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.foundation.vertx.client.ClientPoolManager;
+import org.apache.servicecomb.foundation.vertx.client.ClientVerticle;
+import org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory;
+import org.apache.servicecomb.foundation.vertx.client.http.HttpClientWithContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @Author GuoYl123
+ * @Date 2020/1/9
+ **/
+public class KieClient {
+
+  private static final Logger LOGGER = LoggerFactory.getLogger(KieClient.class);
+
+  private ScheduledExecutorService EXECUTOR = Executors.newScheduledThreadPool(1);
+
+  private static final long TIME_OUT = 10000;
+
+  private static final KieConfig KIE_CONFIG = KieConfig.INSTANCE;
+
+  private final int refreshInterval = KIE_CONFIG.getRefreshInterval();
+
+  private final int firstRefreshInterval = KIE_CONFIG.getFirstRefreshInterval();
+
+  private final String serviceUri = KIE_CONFIG.getServerUri();
+
+  private ClientPoolManager<HttpClientWithContext> clientMgr;
+
+  public KieClient(UpdateHandler updateHandler) {
+    KieWatcher.INSTANCE.setUpdateHandler(updateHandler);
+  }
+
+  public void refreshKieConfig() {
+    try {
+      deployConfigClient();
+    } catch (InterruptedException e) {
+      throw new IllegalStateException(e);
+    }
+    EXECUTOR
+        .scheduleWithFixedDelay(new ConfigRefresh(serviceUri), firstRefreshInterval,
+            refreshInterval, TimeUnit.SECONDS);
+  }
+
+  private void deployConfigClient() throws InterruptedException {
+    VertxOptions vertxOptions = new VertxOptions();
+    //todo :  how to deal with it
 
 Review comment:
   This TODO does not tell what is going to be done. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-575429649
 
 
   Please rename all your base package to ```org.apache.servicecomb.config.kie``` to avoid naming conflicts with classes in config-center module. check config-nacos module for a reference. 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-574073277
 
 
   How about dependen on client/kie-client module? 
   
   I think for kie-client, the reactive performance is not important, and kie-client is quite simple, we can use the module for both spring-cloud-huawei and java-chassis. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] WillemJiang commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
WillemJiang commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376838690
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/archaius/sources/KieConfigurationSourceImpl.java
 ##########
 @@ -0,0 +1,135 @@
+/*
+ * 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.config.kie.archaius.sources;
+
+import static com.netflix.config.WatchedUpdateResult.createIncremental;
+
+import com.google.common.collect.ImmutableMap;
+import com.netflix.config.ConcurrentCompositeConfiguration;
+import com.netflix.config.WatchedUpdateListener;
+import com.netflix.config.WatchedUpdateResult;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import org.apache.commons.configuration.Configuration;
+import org.apache.servicecomb.config.ConfigMapping;
+import org.apache.servicecomb.config.kie.client.KieClient;
+import org.apache.servicecomb.config.kie.client.KieConfig;
+import org.apache.servicecomb.config.spi.ConfigCenterConfigurationSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @Author GuoYl123
 
 Review comment:
   Please remove the Author information, as we can look it up from SCM.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] coveralls commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-572986333
 
 
   
   [![Coverage Status](https://coveralls.io/builds/28025942/badge)](https://coveralls.io/builds/28025942)
   
   Coverage decreased (-0.8%) to 83.187% when pulling **e1b8ad5e9e13d7d09a0f05f7b3be4a677f8d818f on GuoYL123:master** into **c9e381b5d49b92698f069e6ecd77b3fa49b534b7 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 closed pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 closed pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-584553002
 
 
   retrigger CI

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376887681
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/model/ValueType.java
 ##########
 @@ -0,0 +1,31 @@
+/*
+ * 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.config.kie.model;
+
+/**
+ * @Author GuoYl123
+ * @Date 2020/1/8
+ **/
+public enum ValueType {
+  yml,
 
 Review comment:
   done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376832110
 
 

 ##########
 File path: dynamic-config/config-kie/src/test/java/org/apache/servicecomb/config/kie/client/TestKieUtil.java
 ##########
 @@ -0,0 +1,40 @@
+/*
+ * 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.config.kie.client;
+
+import mockit.Expectations;
+import mockit.Mocked;
+import org.apache.servicecomb.config.kie.model.KVResponse;
+import org.junit.Test;
+
+public class TestKieUtil {
+
+  @Test
+  public void testGetConfigByLabel(final @Mocked KVResponse resp) {
 
 Review comment:
   Delete useless code

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376887422
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/archaius/sources/KieConfigurationSourceImpl.java
 ##########
 @@ -0,0 +1,135 @@
+/*
+ * 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.config.kie.archaius.sources;
+
+import static com.netflix.config.WatchedUpdateResult.createIncremental;
+
+import com.google.common.collect.ImmutableMap;
+import com.netflix.config.ConcurrentCompositeConfiguration;
+import com.netflix.config.WatchedUpdateListener;
+import com.netflix.config.WatchedUpdateResult;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import org.apache.commons.configuration.Configuration;
+import org.apache.servicecomb.config.ConfigMapping;
+import org.apache.servicecomb.config.kie.client.KieClient;
+import org.apache.servicecomb.config.kie.client.KieConfig;
+import org.apache.servicecomb.config.spi.ConfigCenterConfigurationSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @Author GuoYl123
 
 Review comment:
   done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376887467
 
 

 ##########
 File path: dynamic-config/config-kie/src/test/java/org/apache/servicecomb/config/kie/client/TestKieUtil.java
 ##########
 @@ -0,0 +1,40 @@
+/*
+ * 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.config.kie.client;
+
+import mockit.Expectations;
+import mockit.Mocked;
+import org.apache.servicecomb.config.kie.model.KVResponse;
+import org.junit.Test;
+
+public class TestKieUtil {
+
+  @Test
+  public void testGetConfigByLabel(final @Mocked KVResponse resp) {
 
 Review comment:
   done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376832059
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/model/ValueType.java
 ##########
 @@ -0,0 +1,31 @@
+/*
+ * 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.config.kie.model;
+
+/**
+ * @Author GuoYl123
+ * @Date 2020/1/8
+ **/
+public enum ValueType {
+  yml,
 
 Review comment:
   It's better to name constant with UPPER case, and add a value of string with LOWER case.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 edited a comment on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 edited a comment on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-584515205
 
 
   I defined version in ./dependencies/default/pom.xml. But CI still failed ,it tell me version is missing. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#discussion_r376887441
 
 

 ##########
 File path: dynamic-config/config-kie/src/main/java/org/apache/servicecomb/config/kie/client/KieClient.java
 ##########
 @@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.config.kie.client;
+
+import io.netty.handler.codec.http.HttpResponseStatus;
+import io.vertx.core.DeploymentOptions;
+import io.vertx.core.Vertx;
+import io.vertx.core.VertxOptions;
+import io.vertx.core.http.HttpClientOptions;
+import io.vertx.core.http.HttpClientRequest;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import org.apache.http.HttpStatus;
+import org.apache.servicecomb.config.kie.archaius.sources.KieConfigurationSourceImpl.UpdateHandler;
+import org.apache.servicecomb.config.kie.model.KVResponse;
+import org.apache.servicecomb.foundation.common.event.EventManager;
+import org.apache.servicecomb.foundation.common.net.IpPort;
+import org.apache.servicecomb.foundation.common.net.NetUtils;
+import org.apache.servicecomb.foundation.common.utils.JsonUtils;
+import org.apache.servicecomb.foundation.vertx.AddressResolverConfig;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.apache.servicecomb.foundation.vertx.client.ClientPoolManager;
+import org.apache.servicecomb.foundation.vertx.client.ClientVerticle;
+import org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory;
+import org.apache.servicecomb.foundation.vertx.client.http.HttpClientWithContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @Author GuoYl123
+ * @Date 2020/1/9
+ **/
+public class KieClient {
+
+  private static final Logger LOGGER = LoggerFactory.getLogger(KieClient.class);
+
+  private ScheduledExecutorService EXECUTOR = Executors.newScheduledThreadPool(1);
+
+  private static final long TIME_OUT = 10000;
+
+  private static final KieConfig KIE_CONFIG = KieConfig.INSTANCE;
+
+  private final int refreshInterval = KIE_CONFIG.getRefreshInterval();
+
+  private final int firstRefreshInterval = KIE_CONFIG.getFirstRefreshInterval();
+
+  private final String serviceUri = KIE_CONFIG.getServerUri();
+
+  private ClientPoolManager<HttpClientWithContext> clientMgr;
+
+  public KieClient(UpdateHandler updateHandler) {
+    KieWatcher.INSTANCE.setUpdateHandler(updateHandler);
+  }
+
+  public void refreshKieConfig() {
+    try {
+      deployConfigClient();
+    } catch (InterruptedException e) {
+      throw new IllegalStateException(e);
+    }
+    EXECUTOR
+        .scheduleWithFixedDelay(new ConfigRefresh(serviceUri), firstRefreshInterval,
+            refreshInterval, TimeUnit.SECONDS);
+  }
+
+  private void deployConfigClient() throws InterruptedException {
+    VertxOptions vertxOptions = new VertxOptions();
+    //todo :  how to deal with it
 
 Review comment:
   done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 opened a new pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 opened a new pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   (cherry picked from commit 833af5050ca3e26e75b327b499b0f9534f55d8b6)
   
   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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 closed pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
liubao68 closed pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 commented on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-584515205
 
 
   I defined version in ./dependencies/default/pom.xml. But CI still failed ,and tell me version is missing. It‘s strange.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] coveralls edited a comment on issue #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518#issuecomment-572986333
 
 
   
   [![Coverage Status](https://coveralls.io/builds/28673589/badge)](https://coveralls.io/builds/28673589)
   
   Coverage decreased (-0.3%) to 84.953% when pulling **2791e3caf4a7c5d088826e4abf6a6d926f04bebf on GuoYL123:master** into **d49c6a85716c8b179e88ca9be2937b1b23e87234 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] GuoYL123 opened a new pull request #1518: [SCB-1711] support kie

Posted by GitBox <gi...@apache.org>.
GuoYL123 opened a new pull request #1518: [SCB-1711] support kie
URL: https://github.com/apache/servicecomb-java-chassis/pull/1518
 
 
   (cherry picked from commit 833af5050ca3e26e75b327b499b0f9534f55d8b6)
   
   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:
users@infra.apache.org


With regards,
Apache Git Services