pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3752: revise the schema default type not null
Date Wed, 13 Mar 2019 06:11:12 GMT
sijie commented on a change in pull request #3752: revise the schema default type not null
URL: https://github.com/apache/pulsar/pull/3752#discussion_r264985523
 
 

 ##########
 File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Schema.java
 ##########
 @@ -167,25 +168,47 @@ default T decode(byte[] bytes, byte[] schemaVersion) {
     }
 
     /**
-     * Create a Avro schema type by extracting the fields of the specified class.
+     * Create a  Avro schema type by default configuration of the class
      *
      * @param clazz the POJO class to be used to extract the Avro schema
      * @return a Schema instance
      */
     static <T> Schema<T> AVRO(Class<T> clazz) {
-        return DefaultImplementation.newAvroSchema(clazz);
+        return DefaultImplementation.newAvroSchema(new SchemaDefinition<>(clazz));
     }
 
     /**
-     * Create a JSON schema type by extracting the fields of the specified class.
+     * Create a Avro schema type with schema definition
+     *
+     * @param schemaDefinition the definition of the schema
+     * @return a Schema instance
+     */
+    static <T> Schema<T> AVRO(SchemaDefinition<T> schemaDefinition) {
 
 Review comment:
   Okay If I understand this correctly, the comment is changing the SchemaDefinition to use
a builder pattern. correct?

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message