This is an automated email from the ASF dual-hosted git repository.
min pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 3dd261a [Dubbo-4147] restore the metadata store key change (#4170)
3dd261a is described below
commit 3dd261a4362332533dbc5fcac12151c8e334c362
Author: Huxing Zhang <[email protected]>
AuthorDate: Mon May 27 17:32:36 2019 +0800
[Dubbo-4147] restore the metadata store key change (#4170)
---
.../org/apache/dubbo/metadata/identifier/MetadataIdentifier.java | 4 ++--
.../apache/dubbo/metadata/identifier/MetadataIdentifierTest.java | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git
a/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/identifier/MetadataIdentifier.java
b/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/identifier/MetadataIdentifier.java
index 3b20bc7..f9b7e4c 100644
---
a/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/identifier/MetadataIdentifier.java
+++
b/dubbo-metadata-report/dubbo-metadata-report-api/src/main/java/org/apache/dubbo/metadata/identifier/MetadataIdentifier.java
@@ -61,9 +61,9 @@ public class MetadataIdentifier {
public String getUniqueKey(KeyTypeEnum keyType) {
if (keyType == KeyTypeEnum.PATH) {
- return getFilePathKey() + PATH_SEPARATOR + DEFAULT_PATH_TAG;
+ return getFilePathKey();
}
- return getIdentifierKey() + META_DATA_STORE_TAG;
+ return getIdentifierKey();
}
public String getIdentifierKey() {
diff --git
a/dubbo-metadata-report/dubbo-metadata-report-api/src/test/java/org/apache/dubbo/metadata/identifier/MetadataIdentifierTest.java
b/dubbo-metadata-report/dubbo-metadata-report-api/src/test/java/org/apache/dubbo/metadata/identifier/MetadataIdentifierTest.java
index cdb089b..2467571 100644
---
a/dubbo-metadata-report/dubbo-metadata-report-api/src/test/java/org/apache/dubbo/metadata/identifier/MetadataIdentifierTest.java
+++
b/dubbo-metadata-report/dubbo-metadata-report-api/src/test/java/org/apache/dubbo/metadata/identifier/MetadataIdentifierTest.java
@@ -35,17 +35,15 @@ public class MetadataIdentifierTest {
String group = null;
String application = "vic.zk.md";
MetadataIdentifier providerMetadataIdentifier = new
MetadataIdentifier(interfaceName, version, group, PROVIDER_SIDE, application);
-
System.out.println(providerMetadataIdentifier.getUniqueKey(MetadataIdentifier.KeyTypeEnum.PATH));
Assertions.assertEquals(providerMetadataIdentifier.getUniqueKey(MetadataIdentifier.KeyTypeEnum.PATH),
"metadata" + PATH_SEPARATOR + interfaceName + PATH_SEPARATOR +
(version == null ? "" : (version + PATH_SEPARATOR))
+ (group == null ? "" : (group + PATH_SEPARATOR)) +
PROVIDER_SIDE
- + PATH_SEPARATOR + application + PATH_SEPARATOR +
"metadata");
-
System.out.println(providerMetadataIdentifier.getUniqueKey(MetadataIdentifier.KeyTypeEnum.UNIQUE_KEY));
+ + PATH_SEPARATOR + application);
Assertions.assertEquals(providerMetadataIdentifier.getUniqueKey(MetadataIdentifier.KeyTypeEnum.UNIQUE_KEY),
interfaceName + MetadataIdentifier.SEPARATOR +
(version == null ? "" : version +
MetadataIdentifier.SEPARATOR)
+ (group == null ? "" : group +
MetadataIdentifier.SEPARATOR)
- + PROVIDER_SIDE + MetadataIdentifier.SEPARATOR +
application + META_DATA_STORE_TAG);
+ + PROVIDER_SIDE + MetadataIdentifier.SEPARATOR +
application);
}
}