[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration

2018-04-19 Thread GitBox
zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931277
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java
 ##
 @@ -0,0 +1,30 @@
+/*
+ * 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.springboot.starter.discovery;
+
+import org.apache.servicecomb.core.filter.EndpointDiscoveryFilter;
+import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext;
+import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode;
+
+public class CseRibbonEndpointDiscoveryFilter extends EndpointDiscoveryFilter {
 
 Review comment:
   Done


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration

2018-04-19 Thread GitBox
zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931334
 
 

 ##
 File path: spring-boot-starter/spring-boot-starter-discovery/pom.xml
 ##
 @@ -73,7 +73,7 @@


org.apache.servicecomb
-   service-registry
+   java-chassis-core
 
 Review comment:
   Done,now CseRibbonEndpointDiscoveryFilter extend from 
AbstractEndpointDiscoveryFilter


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration

2018-04-19 Thread GitBox
zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931282
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java
 ##
 @@ -49,13 +49,11 @@ public ServiceCombServerList() {
 RegistryUtils.getAppId(),
 serviceId,
 DefinitionConst.VERSION_RULE_ALL);
-Map servers = serversVersionedCache.data();
-List instances = new ArrayList<>(servers.size());
-for (MicroserviceInstance s : servers.values()) {
-  for (String endpoint : s.getEndpoints()) {
-URIEndpointObject uri = new URIEndpointObject(endpoint);
-instances.add(new Server(uri.getHostOrIp(), uri.getPort()));
-  }
+ArrayList endpoints = serversVersionedCache.data();
 
 Review comment:
   Done


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration

2018-04-19 Thread GitBox
zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182739600
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java
 ##
 @@ -0,0 +1,30 @@
+/*
+ * 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.springboot.starter.discovery;
+
+import org.apache.servicecomb.core.filter.EndpointDiscoveryFilter;
+import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext;
+import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode;
+
+public class CseRibbonEndpointDiscoveryFilter extends EndpointDiscoveryFilter {
 
 Review comment:
   this package also have a set of "Cse.java" in it ,we may rename them by 
the way?


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


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration

2018-04-19 Thread GitBox
zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182740480
 
 

 ##
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java
 ##
 @@ -49,13 +49,11 @@ public ServiceCombServerList() {
 RegistryUtils.getAppId(),
 serviceId,
 DefinitionConst.VERSION_RULE_ALL);
-Map servers = serversVersionedCache.data();
-List instances = new ArrayList<>(servers.size());
-for (MicroserviceInstance s : servers.values()) {
-  for (String endpoint : s.getEndpoints()) {
-URIEndpointObject uri = new URIEndpointObject(endpoint);
-instances.add(new Server(uri.getHostOrIp(), uri.getPort()));
-  }
+ArrayList endpoints = serversVersionedCache.data();
 
 Review comment:
   got it


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


With regards,
Apache Git Services