You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "rahulkg31 (via GitHub)" <gi...@apache.org> on 2023/03/14 11:55:10 UTC

[GitHub] [druid] rahulkg31 commented on issue #13757: Ingest base64 encoded avro messages in druid

rahulkg31 commented on issue #13757:
URL: https://github.com/apache/druid/issues/13757#issuecomment-1467962012

   Hi,
   
   I could not find any existing solution for this, so I created a separate extension which is a copy of existing avro-extension. I just made the following changes in file `src/main/java/org/apache/druid/data/input/avro/InlineSchemaAvroBytesDecoder.java` and created the jar for the same and used in the setup- 
   
   ```
   try (ByteBufferInputStream inputStream = new ByteBufferInputStream(Collections.singletonList(bytes))) {
     return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream, null));
   }
   ```
   to
   
   ```
   try (ByteBufferInputStream inputStream = new ByteBufferInputStream(Collections.singletonList(Base64.getDecoder().decode(bytes)))) {
         return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream, null));
   }
   
   ```
   
   Closing the issue!
   


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

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org