This is an automated email from the ASF dual-hosted git repository. victory pushed a commit to branch samples-for-2.7.0-SNAPSHOT in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-samples.git
The following commit(s) were added to refs/heads/samples-for-2.7.0-SNAPSHOT by this push: new 4ad375e fix compile issue for refactor metadataReport 4ad375e is described below commit 4ad375e7d93c75b798d696183359abe8b2872a85 Author: cvictory <shenglic...@gmail.com> AuthorDate: Mon Dec 24 15:33:02 2018 +0800 fix compile issue for refactor metadataReport --- .../metadatareport/configcenter/MetadataConfigcenterConsumer.java | 8 +++++--- .../metadatareport/configcenter/MetadataConfigcenterProvider.java | 7 ++++--- .../local/annotation/MetadataLocalAnnotationConsumer.java | 5 +++-- .../local/annotation/MetadataLocalAnnotationProvider.java | 5 +++-- .../metadatareport/local/xml/MetadataLocalXmlConsumer.java | 5 +++-- .../metadatareport/local/xml/MetadataLocalXmlProvider.java | 5 +++-- .../dubbo-samples-simplified-registry-annotation/pom.xml | 1 + .../dubbo-samples-simplified-registry-nosimple/pom.xml | 1 + .../dubbo-samples-simplified-registry-xml/pom.xml | 1 + 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java index 3c18fb0..d95c15d 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java @@ -19,10 +19,11 @@ package org.apache.dubbo.samples.metadatareport.configcenter; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.dubbo.metadata.identifier.ConsumerMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.configcenter.action.AnnotationAction; @@ -57,10 +58,11 @@ public class MetadataConfigcenterConsumer { static public class ConsumerConfiguration { } - private static void printServiceData(){ + + private static void printServiceData() { // get service data(consumer) from zookeeper. ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ConsumerMetadataIdentifier(AnnotationService.class.getName(), "1.1.1", "d-test", "metadatareport-configcenter-consumer"))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(AnnotationService.class.getName(), "1.1.1", "d-test", Constants.CONSUMER_SIDE, "metadatareport-configcenter-consumer"))); System.out.println("*********************************************************"); System.out.println("Dubbo store consumer param into special store(as zk,redis) when configcenter:"); System.out.println(data); diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java index 3f31338..07fceb9 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java @@ -20,11 +20,12 @@ package org.apache.dubbo.samples.metadatareport.configcenter; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.config.ProviderConfig; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.dubbo.metadata.identifier.ProviderMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService; @@ -61,10 +62,10 @@ public class MetadataConfigcenterProvider { } } - private static void printServiceData(){ + private static void printServiceData() { // get service data(provider) from zookeeper . ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ProviderMetadataIdentifier(AnnotationService.class.getName(), "1.1.1", "d-test"))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(AnnotationService.class.getName(), "1.1.1", "d-test", Constants.PROVIDER_SIDE, "metadatareport-configcenter-provider"))); System.out.println("*********************************************************"); System.out.println("Dubbo store metadata into special store(as zk,redis) when configcenter:"); System.out.println(data); diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java index f87ad59..b2bad97 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java @@ -19,11 +19,12 @@ package org.apache.dubbo.samples.metadatareport.local.annotation; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.config.MetadataReportConfig; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.dubbo.metadata.identifier.ConsumerMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.local.annotation.action.AnnotationAction; @@ -68,7 +69,7 @@ public class MetadataLocalAnnotationConsumer { private static void printServiceData(){ // get service data(consumer) from zookeeper. ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ConsumerMetadataIdentifier(AnnotationService.class.getName(), "1.1.8", "d-test", "metadatareport-local-annotaion-consumer"))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(AnnotationService.class.getName(), "1.1.8", "d-test", Constants.CONSUMER_SIDE, "metadatareport-local-annotaion-consumer"))); System.out.println("*********************************************************"); System.out.println("Dubbo store consumer param into special store(as zk,redis) when local annotation:"); System.out.println(data); diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java index 7d3c3bd..415bfa8 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java @@ -20,12 +20,13 @@ package org.apache.dubbo.samples.metadatareport.local.annotation; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.config.MetadataReportConfig; import org.apache.dubbo.config.ProviderConfig; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.dubbo.metadata.identifier.ProviderMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService; @@ -72,7 +73,7 @@ public class MetadataLocalAnnotationProvider { private static void printServiceData() { // get service data(provider) from zookeeper . ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ProviderMetadataIdentifier(AnnotationService.class.getName(), "1.1.8", "d-test"))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(AnnotationService.class.getName(), "1.1.8", "d-test", Constants.PROVIDER_SIDE, "metadatareport-local-annotaion-provider"))); System.out.println("*********************************************************"); System.out.println("Dubbo store metadata into special store(as zk,redis) when local annotation:"); System.out.println(data); diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlConsumer.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlConsumer.java index 981cc45..04cf7a1 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlConsumer.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlConsumer.java @@ -19,9 +19,10 @@ package org.apache.dubbo.samples.metadatareport.local.xml; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; -import org.apache.dubbo.metadata.identifier.ConsumerMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.local.xml.api.DemoService; @@ -53,7 +54,7 @@ public class MetadataLocalXmlConsumer { private static void printServiceData() { // get service data(consumer) from zookeeper. ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ConsumerMetadataIdentifier(DemoService.class.getName(), null, null, "metadatareport-local-xml-consumer"))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(DemoService.class.getName(), null, null, Constants.CONSUMER_SIDE, "metadatareport-local-xml-consumer"))); System.out.println("*********************************************************"); System.out.println("Dubbo store consumer param into special store(as zk,redis) when local xml:"); System.out.println(data); diff --git a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlProvider.java b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlProvider.java index 1874a56..43f697b 100644 --- a/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlProvider.java +++ b/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/src/main/java/org/apache/dubbo/samples/metadatareport/local/xml/MetadataLocalXmlProvider.java @@ -19,9 +19,10 @@ package org.apache.dubbo.samples.metadatareport.local.xml; +import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionLoader; -import org.apache.dubbo.metadata.identifier.ProviderMetadataIdentifier; +import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.remoting.zookeeper.ZookeeperClient; import org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter; import org.apache.dubbo.samples.metadatareport.local.xml.api.DemoService; @@ -44,7 +45,7 @@ public class MetadataLocalXmlProvider { private static void printServiceData() { // get service data(provider) from zookeeper . ZookeeperClient zookeeperClient = ExtensionLoader.getExtensionLoader(ZookeeperTransporter.class).getExtension("curator").connect(new URL("zookeeper", "127.0.0.1", 2181)); - String data = zookeeperClient.getContent(ZkUtil.getNodePath(new ProviderMetadataIdentifier(DemoService.class.getName(), null, null))); + String data = zookeeperClient.getContent(ZkUtil.getNodePath(new MetadataIdentifier(DemoService.class.getName(), null, null, Constants.PROVIDER_SIDE, "metadatareport-local-xml-provider"))); System.out.println("*********************************************************"); System.out.println("Dubbo store metadata into special store(as zk,redis) when local xml:"); System.out.println(data); diff --git a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-annotation/pom.xml b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-annotation/pom.xml index cda880e..4cab672 100644 --- a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-annotation/pom.xml +++ b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-annotation/pom.xml @@ -25,6 +25,7 @@ <artifactId>dubbo-samples-all</artifactId> <groupId>org.apache.dubbo</groupId> <version>1.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging> diff --git a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-nosimple/pom.xml b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-nosimple/pom.xml index e8b20f7..5e7424f 100644 --- a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-nosimple/pom.xml +++ b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-nosimple/pom.xml @@ -25,6 +25,7 @@ <artifactId>dubbo-samples-all</artifactId> <groupId>org.apache.dubbo</groupId> <version>1.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging> diff --git a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-xml/pom.xml b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-xml/pom.xml index e3c2045..9f83b4a 100644 --- a/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-xml/pom.xml +++ b/dubbo-samples-simplified-registry/dubbo-samples-simplified-registry-xml/pom.xml @@ -25,6 +25,7 @@ <artifactId>dubbo-samples-all</artifactId> <groupId>org.apache.dubbo</groupId> <version>1.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging>