Aditya Toomula created SAMZA-2777:
-------------------------------------

             Summary: Add support for GenericFixed to AzureBlobAvroWriter
                 Key: SAMZA-2777
                 URL: https://issues.apache.org/jira/browse/SAMZA-2777
             Project: Samza
          Issue Type: Bug
            Reporter: Aditya Toomula


Add support for avro type {{GenericFixed}} to 
{{{}AzureBlobAvroWriter.write(){}}}. This will allow the caller to provide both 
{{Schema}} and an encoded message when sending messages to the 
{{{}SystemProducer{}}}. This types avoids the message encoding required by 
{{IndexedRecord}} and still provides the {{Schema}} to the writer instance.

The existing {{AzureBlobAvroWriter}} allows either an {{IndexedRecord}} or a 
{{{}byte[]{}}}, but requires that the first message is *always* an 
{{{}IndexedRecord{}}}. The existing writer uses the first message to "set" the 
{{{}Schema, }}subsequent messages can be \{{{}byte[]{}}}s. This requires the 
sender be aware of the writer's internal state and how it's state is changed by 
{{flush()}} and {{{}close(){}}}. The writer can use the {{GenericFixed}} to 
"set" the {{Schema}} since the {{Schema}} is provided by the common parent type 
{{{}GenericContainer{}}}. 

 

Avro reference:
 * 
[GenericFixed|https://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/generic/GenericFixed.html]
 * 
[GenericContainer|https://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/generic/GenericContainer.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to