[GitHub] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-381000704 registry just provide infomation about providers ,but don't control the real action that the consumer should take,so just let the consumer to control the lifecycle of the invokers,for examples, use timeout or fuse strategy when it's only has 'bad data' . 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-380403298 It is better to keep "good data" and "bad data" than to lose all data, I will chose the second choice .but impl it to abstract strategy will be the final solution. 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379517607 ` ChildListener zkListener = listeners.get(listener); if (zkListener == null) { listeners.putIfAbsent(listener, new ChildListener() { public void childChanged(String parentPath, List currentChilds) { ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds)); } }); zkListener = listeners.get(listener); } zkClient.create(path, false); List children = zkClient.addChildListener(path, zkListener); if (children != null) { urls.addAll(toUrlsWithEmpty(url, path, children)); }` ` private List toUrlsWithEmpty(URL consumer, String path, List providers) { List urls = toUrlsWithoutEmpty(consumer, providers); if (urls == null || urls.isEmpty()) { int i = path.lastIndexOf('/'); String category = i < 0 ? path : path.substring(i + 1); URL empty = consumer.setProtocol(Constants.EMPTY_PROTOCOL).addParameter(Constants.CATEGORY_KEY, category); urls.add(empty); } return urls; }` zookeeper ,sorry to did not say clearly at the beginning 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379517607 ` ChildListener zkListener = listeners.get(listener); if (zkListener == null) { listeners.putIfAbsent(listener, new ChildListener() { public void childChanged(String parentPath, List currentChilds) { ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds)); } }); zkListener = listeners.get(listener); } zkClient.create(path, false); List children = zkClient.addChildListener(path, zkListener); if (children != null) { urls.addAll(toUrlsWithEmpty(url, path, children)); }` ` private List toUrlsWithEmpty(URL consumer, String path, List providers) { List urls = toUrlsWithoutEmpty(consumer, providers); if (urls == null || urls.isEmpty()) { int i = path.lastIndexOf('/'); String category = i < 0 ? path : path.substring(i + 1); URL empty = consumer.setProtocol(Constants.EMPTY_PROTOCOL).addParameter(Constants.CATEGORY_KEY, category); urls.add(empty); } return urls; }` zookeeper ,sorry to did not say clearly at the beginning 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379517607 ` ChildListener zkListener = listeners.get(listener); if (zkListener == null) { listeners.putIfAbsent(listener, new ChildListener() { public void childChanged(String parentPath, List currentChilds) { ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds)); } }); zkListener = listeners.get(listener); } zkClient.create(path, false); List children = zkClient.addChildListener(path, zkListener); if (children != null) { urls.addAll(toUrlsWithEmpty(url, path, children)); }` ` private List toUrlsWithEmpty(URL consumer, String path, List providers) { List urls = toUrlsWithoutEmpty(consumer, providers); if (urls == null || urls.isEmpty()) { int i = path.lastIndexOf('/'); String category = i < 0 ? path : path.substring(i + 1); URL empty = consumer.setProtocol(Constants.EMPTY_PROTOCOL).addParameter(Constants.CATEGORY_KEY, category); urls.add(empty); } return urls; }` zookeeper ,sorry to did not say clearly at the beginning 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379517607 ` ChildListener zkListener = listeners.get(listener); if (zkListener == null) { listeners.putIfAbsent(listener, new ChildListener() { public void childChanged(String parentPath, List currentChilds) { ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds)); } }); zkListener = listeners.get(listener); } zkClient.create(path, false); List children = zkClient.addChildListener(path, zkListener); if (children != null) { urls.addAll(toUrlsWithEmpty(url, path, children)); }` zookeeper ,sorry to did not say clearly at the beginning 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379516916 when register center is zookeeper, the invokerUrls will not be empty,it has one element and the protocol is Constants.EMPTY_PROTOCOL,so the code may not be right. 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379516916 but when register center lost all provider instance , invokerUrls will not be empty,it has one element and the protocol is Constants.EMPTY_PROTOCOL,so the code may not be right. 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] HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP
HouZhiHouJue commented on issue #1508: feature required: set registrydirectory to AP when implementation is CP URL: https://github.com/apache/incubator-dubbo/issues/1508#issuecomment-379516916 but when register center lost all provider instance , invokerUrls will not be empty,it has one element and the protocol is Constants.EMPTY_PROTOCOL,so the code may not be right. 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