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

ASF GitHub Bot commented on SCB-1039:
-------------------------------------

wujimin commented on a change in pull request #1007: [SCB-1039]Add interface to 
compatible with ServiceCenter Aggregator
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1007#discussion_r236030818
 
 

 ##########
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
 ##########
 @@ -356,6 +356,30 @@ public String getSchema(String microserviceId, String 
schemaId) {
         syncHandler(countDownLatch, GetSchemaResponse.class, holder));
     try {
       countDownLatch.await();
+    } catch (Exception e) {
+      LOGGER.error("query schema exist {}/{} failed",
+          schemaId,
+          e);
+    }
+    if (holder.value != null) {
+      return holder.value.getSchema();
+    }
+
+    return null;
+  }
+
+  @Override
+  public String getAggregatedSchema(String microserviceId, String schemaId) {
+    Holder<GetSchemaResponse> holder = new Holder<>();
 
 Review comment:
   do not copy code
   just make global to be a parameter

----------------------------------------------------------------
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


> Add interface to compatible with ServiceCenter Aggregator
> ---------------------------------------------------------
>
>                 Key: SCB-1039
>                 URL: https://issues.apache.org/jira/browse/SCB-1039
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>            Reporter: 何一乐
>            Assignee: 何一乐
>            Priority: Major
>
> 1.增加几个接口
>   
> org.apache.servicecomb.serviceregistry.client.ServiceRegistryClient#getMicroservice旁边加getAggregatedMicroervice
>   
> org.apache.servicecomb.serviceregistry.ServiceRegistry#getRemoteMicroservice旁边加上getAggregatedRemoteMicroervice
>   
> org.apache.servicecomb.serviceregistry.client.ServiceRegistryClient#getSchema旁边加getAggregatedSchema
>   都加上java doc注释,描述以下信息:
>       1)连接普通ServiceCenter时,效果等同于不带Aggregagit chected的信息
>       2)连接ServiceCenter 
> Aggregator时,表示获取范围不仅仅局限在本ServiceCenter中,还包括其他ServiceCenter集群
>   向ServiceCenter发RESTful请求时,Aggregated的版本是在query参数部分加上global=true
> 2.搜索旧接口的所有引用
>    所有在服务发现流程中对它们的调用,都需要切换为Aggregated版本



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

Reply via email to