You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2024/07/31 02:40:49 UTC
(dubbo) branch 3.3 updated: Update metadata_service_v2.proto (#14474)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 98e96d9ef6 Update metadata_service_v2.proto (#14474)
98e96d9ef6 is described below
commit 98e96d9ef6a60e0993a25c6e59769585d660d714
Author: namelessssssssssss <10...@users.noreply.github.com>
AuthorDate: Wed Jul 31 10:40:44 2024 +0800
Update metadata_service_v2.proto (#14474)
Co-authored-by: wuyuhao <wu...@xiaohongshu.com>
---
.../metadata/DubboMetadataServiceV2Triple.java | 28 +--
.../{Revision.java => MetadataRequest.java} | 207 +++++++++++----------
...rBuilder.java => MetadataRequestOrBuilder.java} | 16 +-
.../apache/dubbo/metadata/MetadataServiceV2.java | 4 +-
.../metadata/MetadataServiceV2OuterClass.java | 48 ++---
.../src/main/proto/metadata_service_v2.proto | 8 +-
.../metadata/MetadataServiceDelegationV2.java | 8 +-
.../registry/client/metadata/MetadataUtils.java | 7 +-
8 files changed, 165 insertions(+), 161 deletions(-)
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/DubboMetadataServiceV2Triple.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/DubboMetadataServiceV2Triple.java
index 2cbb904e79..37cad3c89a 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/DubboMetadataServiceV2Triple.java
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/DubboMetadataServiceV2Triple.java
@@ -63,32 +63,32 @@ public final class DubboMetadataServiceV2Triple {
private static final StubMethodDescriptor getMetadataInfoMethod = new StubMethodDescriptor(
"GetMetadataInfo",
- Revision.class,
+ MetadataRequest.class,
MetadataInfoV2.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
- Revision::parseFrom,
+ MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);
private static final StubMethodDescriptor getMetadataInfoAsyncMethod = new StubMethodDescriptor(
"GetMetadataInfo",
- Revision.class,
+ MetadataRequest.class,
CompletableFuture.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
- Revision::parseFrom,
+ MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);
private static final StubMethodDescriptor getMetadataInfoProxyAsyncMethod = new StubMethodDescriptor(
"GetMetadataInfoAsync",
- Revision.class,
+ MetadataRequest.class,
MetadataInfoV2.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
- Revision::parseFrom,
+ MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);
static {
@@ -104,15 +104,15 @@ public final class DubboMetadataServiceV2Triple {
}
@Override
- public MetadataInfoV2 getMetadataInfo(Revision request) {
+ public MetadataInfoV2 getMetadataInfo(MetadataRequest request) {
return StubInvocationUtil.unaryCall(invoker, getMetadataInfoMethod, request);
}
- public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(Revision request) {
+ public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(MetadataRequest request) {
return StubInvocationUtil.unaryCall(invoker, getMetadataInfoAsyncMethod, request);
}
- public void getMetadataInfo(Revision request, StreamObserver<MetadataInfoV2> responseObserver) {
+ public void getMetadataInfo(MetadataRequest request, StreamObserver<MetadataInfoV2> responseObserver) {
StubInvocationUtil.unaryCall(invoker, getMetadataInfoMethod, request, responseObserver);
}
}
@@ -136,7 +136,7 @@ public final class DubboMetadataServiceV2Triple {
}
@Override
- public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(Revision request) {
+ public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(MetadataRequest request) {
return CompletableFuture.completedFuture(getMetadataInfo(request));
}
@@ -144,7 +144,7 @@ public final class DubboMetadataServiceV2Triple {
* This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
* It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
*/
- public void getMetadataInfo(Revision request, StreamObserver<MetadataInfoV2> responseObserver) {
+ public void getMetadataInfo(MetadataRequest request, StreamObserver<MetadataInfoV2> responseObserver) {
getMetadataInfoAsync(request).whenComplete((r, t) -> {
if (t != null) {
responseObserver.onError(t);
@@ -168,9 +168,9 @@ public final class DubboMetadataServiceV2Triple {
pathResolver.addNativeStub("/" + JAVA_SERVICE_NAME + "/GetMetadataInfo");
pathResolver.addNativeStub("/" + JAVA_SERVICE_NAME + "/GetMetadataInfoAsync");
- BiConsumer<Revision, StreamObserver<MetadataInfoV2>> getMetadataInfoFunc = this::getMetadataInfo;
+ BiConsumer<MetadataRequest, StreamObserver<MetadataInfoV2>> getMetadataInfoFunc = this::getMetadataInfo;
handlers.put(getMetadataInfoMethod.getMethodName(), new UnaryStubMethodHandler<>(getMetadataInfoFunc));
- BiConsumer<Revision, StreamObserver<MetadataInfoV2>> getMetadataInfoAsyncFunc =
+ BiConsumer<MetadataRequest, StreamObserver<MetadataInfoV2>> getMetadataInfoAsyncFunc =
syncToAsync(this::getMetadataInfo);
handlers.put(
getMetadataInfoProxyAsyncMethod.getMethodName(),
@@ -180,7 +180,7 @@ public final class DubboMetadataServiceV2Triple {
}
@Override
- public MetadataInfoV2 getMetadataInfo(Revision request) {
+ public MetadataInfoV2 getMetadataInfo(MetadataRequest request) {
throw unimplementedMethodException(getMetadataInfoMethod);
}
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/Revision.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequest.java
similarity index 69%
rename from dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/Revision.java
rename to dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequest.java
index e200128057..c989693c43 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/Revision.java
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequest.java
@@ -17,68 +17,68 @@
package org.apache.dubbo.metadata;
/**
- * Protobuf type {@code org.apache.dubbo.metadata.Revision}
+ * Protobuf type {@code org.apache.dubbo.metadata.MetadataRequest}
*/
-public final class Revision extends com.google.protobuf.GeneratedMessageV3
+public final class MetadataRequest extends com.google.protobuf.GeneratedMessageV3
implements
- // @@protoc_insertion_point(message_implements:org.apache.dubbo.metadata.Revision)
- RevisionOrBuilder {
+ // @@protoc_insertion_point(message_implements:org.apache.dubbo.metadata.MetadataRequest)
+ MetadataRequestOrBuilder {
private static final long serialVersionUID = 0L;
- // Use Revision.newBuilder() to construct.
- private Revision(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ // Use MetadataRequest.newBuilder() to construct.
+ private MetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
- private Revision() {
- value_ = "";
+ private MetadataRequest() {
+ revision_ = "";
}
@Override
@SuppressWarnings({"unused"})
protected Object newInstance(UnusedPrivateParameter unused) {
- return new Revision();
+ return new MetadataRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_Revision_descriptor;
+ return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor;
}
@Override
protected FieldAccessorTable internalGetFieldAccessorTable() {
- return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_Revision_fieldAccessorTable
- .ensureFieldAccessorsInitialized(Revision.class, Builder.class);
+ return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_MetadataRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(MetadataRequest.class, Builder.class);
}
- public static final int VALUE_FIELD_NUMBER = 1;
+ public static final int REVISION_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
- private volatile Object value_ = "";
+ private volatile Object revision_ = "";
/**
- * <code>string value = 1;</code>
- * @return The value.
+ * <code>string revision = 1;</code>
+ * @return The revision.
*/
@Override
- public String getValue() {
- Object ref = value_;
+ public String getRevision() {
+ Object ref = revision_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
- value_ = s;
+ revision_ = s;
return s;
}
}
/**
- * <code>string value = 1;</code>
- * @return The bytes for value.
+ * <code>string revision = 1;</code>
+ * @return The bytes for revision.
*/
@Override
- public com.google.protobuf.ByteString getValueBytes() {
- Object ref = value_;
+ public com.google.protobuf.ByteString getRevisionBytes() {
+ Object ref = revision_;
if (ref instanceof String) {
com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- value_ = b;
+ revision_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
@@ -99,8 +99,8 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
@Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, revision_);
}
getUnknownFields().writeTo(output);
}
@@ -111,8 +111,8 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
if (size != -1) return size;
size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, revision_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -124,12 +124,12 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
if (obj == this) {
return true;
}
- if (!(obj instanceof Revision)) {
+ if (!(obj instanceof MetadataRequest)) {
return super.equals(obj);
}
- Revision other = (Revision) obj;
+ MetadataRequest other = (MetadataRequest) obj;
- if (!getValue().equals(other.getValue())) return false;
+ if (!getRevision().equals(other.getRevision())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -141,69 +141,69 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getValue().hashCode();
+ hash = (37 * hash) + REVISION_FIELD_NUMBER;
+ hash = (53 * hash) + getRevision().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
- public static Revision parseFrom(java.nio.ByteBuffer data)
+ public static MetadataRequest parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static Revision parseFrom(
+ public static MetadataRequest parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static Revision parseFrom(com.google.protobuf.ByteString data)
+ public static MetadataRequest parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static Revision parseFrom(
+ public static MetadataRequest parseFrom(
com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static Revision parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ public static MetadataRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static Revision parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ public static MetadataRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static Revision parseFrom(java.io.InputStream input) throws java.io.IOException {
+ public static MetadataRequest parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- public static Revision parseFrom(
+ public static MetadataRequest parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static Revision parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ public static MetadataRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
- public static Revision parseDelimitedFrom(
+ public static MetadataRequest parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static Revision parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ public static MetadataRequest parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- public static Revision parseFrom(
+ public static MetadataRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
@@ -218,7 +218,7 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(Revision prototype) {
+ public static Builder newBuilder(MetadataRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@@ -233,23 +233,24 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
return builder;
}
/**
- * Protobuf type {@code org.apache.dubbo.metadata.Revision}
+ * Protobuf type {@code org.apache.dubbo.metadata.MetadataRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
implements
- // @@protoc_insertion_point(builder_implements:org.apache.dubbo.metadata.Revision)
- RevisionOrBuilder {
+ // @@protoc_insertion_point(builder_implements:org.apache.dubbo.metadata.MetadataRequest)
+ MetadataRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_Revision_descriptor;
+ return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor;
}
@Override
protected FieldAccessorTable internalGetFieldAccessorTable() {
- return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_Revision_fieldAccessorTable
- .ensureFieldAccessorsInitialized(Revision.class, Builder.class);
+ return MetadataServiceV2OuterClass
+ .internal_static_org_apache_dubbo_metadata_MetadataRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(MetadataRequest.class, Builder.class);
}
- // Construct using org.apache.dubbo.metadata.Revision.newBuilder()
+ // Construct using org.apache.dubbo.metadata.MetadataRequest.newBuilder()
private Builder() {}
private Builder(BuilderParent parent) {
@@ -260,23 +261,23 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
public Builder clear() {
super.clear();
bitField0_ = 0;
- value_ = "";
+ revision_ = "";
return this;
}
@Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_Revision_descriptor;
+ return MetadataServiceV2OuterClass.internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor;
}
@Override
- public Revision getDefaultInstanceForType() {
- return Revision.getDefaultInstance();
+ public MetadataRequest getDefaultInstanceForType() {
+ return MetadataRequest.getDefaultInstance();
}
@Override
- public Revision build() {
- Revision result = buildPartial();
+ public MetadataRequest build() {
+ MetadataRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -284,8 +285,8 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
}
@Override
- public Revision buildPartial() {
- Revision result = new Revision(this);
+ public MetadataRequest buildPartial() {
+ MetadataRequest result = new MetadataRequest(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
@@ -293,27 +294,27 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
return result;
}
- private void buildPartial0(Revision result) {
+ private void buildPartial0(MetadataRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
- result.value_ = value_;
+ result.revision_ = revision_;
}
}
@Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof Revision) {
- return mergeFrom((Revision) other);
+ if (other instanceof MetadataRequest) {
+ return mergeFrom((MetadataRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(Revision other) {
- if (other == Revision.getDefaultInstance()) return this;
- if (!other.getValue().isEmpty()) {
- value_ = other.value_;
+ public Builder mergeFrom(MetadataRequest other) {
+ if (other == MetadataRequest.getDefaultInstance()) return this;
+ if (!other.getRevision().isEmpty()) {
+ revision_ = other.revision_;
bitField0_ |= 0x00000001;
onChanged();
}
@@ -343,7 +344,7 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
done = true;
break;
case 10: {
- value_ = input.readStringRequireUtf8();
+ revision_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
@@ -365,71 +366,71 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
private int bitField0_;
- private Object value_ = "";
+ private Object revision_ = "";
/**
- * <code>string value = 1;</code>
- * @return The value.
+ * <code>string revision = 1;</code>
+ * @return The revision.
*/
- public String getValue() {
- Object ref = value_;
+ public String getRevision() {
+ Object ref = revision_;
if (!(ref instanceof String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
- value_ = s;
+ revision_ = s;
return s;
} else {
return (String) ref;
}
}
/**
- * <code>string value = 1;</code>
- * @return The bytes for value.
+ * <code>string revision = 1;</code>
+ * @return The bytes for revision.
*/
- public com.google.protobuf.ByteString getValueBytes() {
- Object ref = value_;
+ public com.google.protobuf.ByteString getRevisionBytes() {
+ Object ref = revision_;
if (ref instanceof String) {
com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- value_ = b;
+ revision_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
- * <code>string value = 1;</code>
- * @param value The value to set.
+ * <code>string revision = 1;</code>
+ * @param value The revision to set.
* @return This builder for chaining.
*/
- public Builder setValue(String value) {
+ public Builder setRevision(String value) {
if (value == null) {
throw new NullPointerException();
}
- value_ = value;
+ revision_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
- * <code>string value = 1;</code>
+ * <code>string revision = 1;</code>
* @return This builder for chaining.
*/
- public Builder clearValue() {
- value_ = getDefaultInstance().getValue();
+ public Builder clearRevision() {
+ revision_ = getDefaultInstance().getRevision();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
- * <code>string value = 1;</code>
- * @param value The bytes for value to set.
+ * <code>string revision = 1;</code>
+ * @param value The bytes for revision to set.
* @return This builder for chaining.
*/
- public Builder setValueBytes(com.google.protobuf.ByteString value) {
+ public Builder setRevisionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
- value_ = value;
+ revision_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
@@ -445,24 +446,24 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
return super.mergeUnknownFields(unknownFields);
}
- // @@protoc_insertion_point(builder_scope:org.apache.dubbo.metadata.Revision)
+ // @@protoc_insertion_point(builder_scope:org.apache.dubbo.metadata.MetadataRequest)
}
- // @@protoc_insertion_point(class_scope:org.apache.dubbo.metadata.Revision)
- private static final Revision DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:org.apache.dubbo.metadata.MetadataRequest)
+ private static final MetadataRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new Revision();
+ DEFAULT_INSTANCE = new MetadataRequest();
}
- public static Revision getDefaultInstance() {
+ public static MetadataRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser<Revision> PARSER =
- new com.google.protobuf.AbstractParser<Revision>() {
+ private static final com.google.protobuf.Parser<MetadataRequest> PARSER =
+ new com.google.protobuf.AbstractParser<MetadataRequest>() {
@Override
- public Revision parsePartialFrom(
+ public MetadataRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -481,17 +482,17 @@ public final class Revision extends com.google.protobuf.GeneratedMessageV3
}
};
- public static com.google.protobuf.Parser<Revision> parser() {
+ public static com.google.protobuf.Parser<MetadataRequest> parser() {
return PARSER;
}
@Override
- public com.google.protobuf.Parser<Revision> getParserForType() {
+ public com.google.protobuf.Parser<MetadataRequest> getParserForType() {
return PARSER;
}
@Override
- public Revision getDefaultInstanceForType() {
+ public MetadataRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/RevisionOrBuilder.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequestOrBuilder.java
similarity index 76%
rename from dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/RevisionOrBuilder.java
rename to dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequestOrBuilder.java
index e8e1596246..4099bb21ce 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/RevisionOrBuilder.java
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataRequestOrBuilder.java
@@ -16,19 +16,19 @@
*/
package org.apache.dubbo.metadata;
-public interface RevisionOrBuilder
+public interface MetadataRequestOrBuilder
extends
- // @@protoc_insertion_point(interface_extends:org.apache.dubbo.metadata.Revision)
+ // @@protoc_insertion_point(interface_extends:org.apache.dubbo.metadata.MetadataRequest)
com.google.protobuf.MessageOrBuilder {
/**
- * <code>string value = 1;</code>
- * @return The value.
+ * <code>string revision = 1;</code>
+ * @return The revision.
*/
- String getValue();
+ String getRevision();
/**
- * <code>string value = 1;</code>
- * @return The bytes for value.
+ * <code>string revision = 1;</code>
+ * @return The bytes for revision.
*/
- com.google.protobuf.ByteString getValueBytes();
+ com.google.protobuf.ByteString getRevisionBytes();
}
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2.java
index 5ab5538403..d85df91a14 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2.java
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2.java
@@ -23,7 +23,7 @@ public interface MetadataServiceV2 extends org.apache.dubbo.rpc.model.DubboStub
String JAVA_SERVICE_NAME = "org.apache.dubbo.metadata.MetadataServiceV2";
String SERVICE_NAME = "org.apache.dubbo.metadata.MetadataServiceV2";
- MetadataInfoV2 getMetadataInfo(Revision request);
+ MetadataInfoV2 getMetadataInfo(MetadataRequest request);
- CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(Revision request);
+ CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(MetadataRequest request);
}
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2OuterClass.java b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2OuterClass.java
index ff1e6a2374..01c1362d70 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2OuterClass.java
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataServiceV2OuterClass.java
@@ -26,9 +26,9 @@ public final class MetadataServiceV2OuterClass {
}
static final com.google.protobuf.Descriptors.Descriptor
- internal_static_org_apache_dubbo_metadata_Revision_descriptor;
+ internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_org_apache_dubbo_metadata_Revision_fieldAccessorTable;
+ internal_static_org_apache_dubbo_metadata_MetadataRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_org_apache_dubbo_metadata_MetadataInfoV2_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -55,33 +55,33 @@ public final class MetadataServiceV2OuterClass {
static {
String[] descriptorData = {
"\n\031metadata_service_v2.proto\022\031org.apache."
- + "dubbo.metadata\"\031\n\010Revision\022\r\n\005value\030\001 \001("
- + "\t\"\324\001\n\016MetadataInfoV2\022\013\n\003app\030\001 \001(\t\022\017\n\007ver"
- + "sion\030\002 \001(\t\022I\n\010services\030\003 \003(\01327.org.apach"
- + "e.dubbo.metadata.MetadataInfoV2.Services"
- + "Entry\032Y\n\rServicesEntry\022\013\n\003key\030\001 \001(\t\0227\n\005v"
- + "alue\030\002 \001(\0132(.org.apache.dubbo.metadata.S"
- + "erviceInfoV2:\0028\001\"\340\001\n\rServiceInfoV2\022\014\n\004na"
- + "me\030\001 \001(\t\022\r\n\005group\030\002 \001(\t\022\017\n\007version\030\003 \001(\t"
- + "\022\020\n\010protocol\030\004 \001(\t\022\014\n\004port\030\005 \001(\005\022\014\n\004path"
- + "\030\006 \001(\t\022D\n\006params\030\007 \003(\01324.org.apache.dubb"
- + "o.metadata.ServiceInfoV2.ParamsEntry\032-\n\013"
- + "ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:"
- + "\0028\0012v\n\021MetadataServiceV2\022a\n\017GetMetadataI"
- + "nfo\022#.org.apache.dubbo.metadata.Revision"
- + "\032).org.apache.dubbo.metadata.MetadataInf"
- + "oV2BO\n\031org.apache.dubbo.metadataP\001Z0dubb"
- + "o.apache.org/dubbo-go/v3/metadata/triple"
- + "_apib\006proto3"
+ + "dubbo.metadata\"#\n\017MetadataRequest\022\020\n\010rev"
+ + "ision\030\001 \001(\t\"\324\001\n\016MetadataInfoV2\022\013\n\003app\030\001 "
+ + "\001(\t\022\017\n\007version\030\002 \001(\t\022I\n\010services\030\003 \003(\01327"
+ + ".org.apache.dubbo.metadata.MetadataInfoV"
+ + "2.ServicesEntry\032Y\n\rServicesEntry\022\013\n\003key\030"
+ + "\001 \001(\t\0227\n\005value\030\002 \001(\0132(.org.apache.dubbo."
+ + "metadata.ServiceInfoV2:\0028\001\"\340\001\n\rServiceIn"
+ + "foV2\022\014\n\004name\030\001 \001(\t\022\r\n\005group\030\002 \001(\t\022\017\n\007ver"
+ + "sion\030\003 \001(\t\022\020\n\010protocol\030\004 \001(\t\022\014\n\004port\030\005 \001"
+ + "(\005\022\014\n\004path\030\006 \001(\t\022D\n\006params\030\007 \003(\01324.org.a"
+ + "pache.dubbo.metadata.ServiceInfoV2.Param"
+ + "sEntry\032-\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va"
+ + "lue\030\002 \001(\t:\0028\0012}\n\021MetadataServiceV2\022h\n\017Ge"
+ + "tMetadataInfo\022*.org.apache.dubbo.metadat"
+ + "a.MetadataRequest\032).org.apache.dubbo.met"
+ + "adata.MetadataInfoV2BZ\n\031org.apache.dubbo"
+ + ".metadataP\001Z;dubbo.apache.org/dubbo-go/v"
+ + "3/metadata/triple_api;triple_apib\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
- internal_static_org_apache_dubbo_metadata_Revision_descriptor =
+ internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
- internal_static_org_apache_dubbo_metadata_Revision_fieldAccessorTable =
+ internal_static_org_apache_dubbo_metadata_MetadataRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_org_apache_dubbo_metadata_Revision_descriptor, new String[] {
- "Value",
+ internal_static_org_apache_dubbo_metadata_MetadataRequest_descriptor, new String[] {
+ "Revision",
});
internal_static_org_apache_dubbo_metadata_MetadataInfoV2_descriptor =
getDescriptor().getMessageTypes().get(1);
diff --git a/dubbo-metadata/dubbo-metadata-api/src/main/proto/metadata_service_v2.proto b/dubbo-metadata/dubbo-metadata-api/src/main/proto/metadata_service_v2.proto
index 709d35c1a1..77c49d1021 100644
--- a/dubbo-metadata/dubbo-metadata-api/src/main/proto/metadata_service_v2.proto
+++ b/dubbo-metadata/dubbo-metadata-api/src/main/proto/metadata_service_v2.proto
@@ -18,16 +18,16 @@
syntax = "proto3";
package org.apache.dubbo.metadata;
-option go_package = "dubbo.apache.org/dubbo-go/v3/metadata/triple_api";
+option go_package = "dubbo.apache.org/dubbo-go/v3/metadata/triple_api;triple_api";
option java_package = "org.apache.dubbo.metadata";
option java_multiple_files = true;
service MetadataServiceV2{
- rpc GetMetadataInfo(Revision) returns (MetadataInfoV2);
+ rpc GetMetadataInfo(MetadataRequest) returns (MetadataInfoV2);
}
-message Revision{
- string value = 1;
+message MetadataRequest{
+ string revision = 1;
}
message MetadataInfoV2{
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceDelegationV2.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceDelegationV2.java
index 1eec46e195..10878cce00 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceDelegationV2.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataServiceDelegationV2.java
@@ -22,6 +22,7 @@ import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.metadata.DubboMetadataServiceV2Triple.MetadataServiceV2ImplBase;
import org.apache.dubbo.metadata.MetadataInfo;
+import org.apache.dubbo.metadata.MetadataRequest;
import org.apache.dubbo.registry.client.ServiceDiscovery;
import org.apache.dubbo.registry.support.RegistryManager;
import org.apache.dubbo.rpc.model.ApplicationModel;
@@ -47,8 +48,8 @@ public class MetadataServiceDelegationV2 extends MetadataServiceV2ImplBase {
}
@Override
- public org.apache.dubbo.metadata.MetadataInfoV2 getMetadataInfo(org.apache.dubbo.metadata.Revision revisionV2) {
- String revision = revisionV2.getValue();
+ public org.apache.dubbo.metadata.MetadataInfoV2 getMetadataInfo(MetadataRequest metadataRequestV2) {
+ String revision = metadataRequestV2.getRevision();
MetadataInfo info = null;
if (StringUtils.isEmpty(revision)) {
return null;
@@ -63,7 +64,8 @@ public class MetadataServiceDelegationV2 extends MetadataServiceV2ImplBase {
}
if (logger.isWarnEnabled()) {
- logger.warn(REGISTRY_FAILED_LOAD_METADATA, "", "", "metadataV2 not found for revision: " + revisionV2);
+ logger.warn(
+ REGISTRY_FAILED_LOAD_METADATA, "", "", "metadataV2 not found for revision: " + metadataRequestV2);
}
return null;
}
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
index 79c6208fad..9c170eb835 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
@@ -24,10 +24,10 @@ import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.metadata.MetadataInfo;
+import org.apache.dubbo.metadata.MetadataRequest;
import org.apache.dubbo.metadata.MetadataService;
import org.apache.dubbo.metadata.MetadataServiceV2;
import org.apache.dubbo.metadata.MetadataServiceV2Detector;
-import org.apache.dubbo.metadata.Revision;
import org.apache.dubbo.metadata.definition.model.FullServiceDefinition;
import org.apache.dubbo.metadata.report.MetadataReport;
import org.apache.dubbo.metadata.report.MetadataReportInstance;
@@ -343,8 +343,9 @@ public class MetadataUtils {
return ((MetadataService) existProxy).getMetadataInfo(revision);
} else {
return MetadataServiceVersionUtils.toV1(((MetadataServiceV2) existProxy)
- .getMetadataInfo(
- Revision.newBuilder().setValue(revision).build()));
+ .getMetadataInfo(MetadataRequest.newBuilder()
+ .setRevision(revision)
+ .build()));
}
}
}