sijie commented on a change in pull request #4211: 
[issue#4155][pulsar-clients]Support key value schema versioning
URL: https://github.com/apache/pulsar/pull/4211#discussion_r281460443
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/KeyValueSchema.java
 ##########
 @@ -125,6 +171,23 @@ private KeyValueSchema(Schema<K> keySchema,
         properties.put("kv.encoding.type", 
String.valueOf(keyValueEncodingType));
 
         
this.schemaInfo.setSchema(byteBuffer.array()).setProperties(properties);
+
+        this.schemaInfoProvider = new SchemaInfoProvider() {
+            @Override
+            public SchemaInfo getSchemaByVersion(byte[] schemaVersion) {
+                return schemaInfo;
+            }
+
+            @Override
+            public SchemaInfo getLatestSchema() {
+                return schemaInfo;
+            }
+
+            @Override
+            public String getTopicName() {
+                return null;
 
 Review comment:
   try to avoid returning "null"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to