pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] Persi commented on a change in pull request #6905: [Issue #6842] feat(schema): allow for schema reader and writer registration on SchemaDefinition
Date Thu, 07 May 2020 16:57:24 GMT

Persi commented on a change in pull request #6905:
URL: https://github.com/apache/pulsar/pull/6905#discussion_r421648325



##########
File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/SchemaDefinition.java
##########
@@ -76,4 +78,18 @@
      * @return the flag of supportSchemaVersioning
      */
     boolean getSupportSchemaVersioning();
+
+    /**
+     * Get a configured schema reader.
+     *
+     * @return optional containing configured schema reader or empty optional if none is
configure
+     */
+    Optional<SchemaReader<T>> getSchemaReaderOpt();

Review comment:
       This interface can be used for other schemas as well, but both SchemaReader and SchemaWriter
as well. I see what you mean, did not recognize the Producer and Consumer instantiators with
Schema as parameter. But I am not sure if Schema class is meant to be used like that from
outside the framework. As they already introduced some default Schema instantiators in the
client api Schema class, I would not promote Schema.of for public use, as it is an internal
of the framework.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message