abhishekrb19 commented on code in PR #15018:
URL: https://github.com/apache/druid/pull/15018#discussion_r1332370317
##########
extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemaAvroBytesDecoder.java:
##########
@@ -88,7 +88,6 @@ public GenericRecord parse(ByteBuffer bytes)
return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream,
null));
}
catch (EOFException eof) {
- // waiting for avro v1.9.0 (#AVRO-813)
Review Comment:
Had the chance to look a bit more closely - here's a stacktrace:
```
java.io.EOFException: null
at org.apache.avro.io.BinaryDecoder.readBoolean(BinaryDecoder.java:164)
~[?:?]
at
org.apache.avro.io.ValidatingDecoder.readBoolean(ValidatingDecoder.java:76)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:204)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:161)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:260)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:248)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:180)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:161)
~[?:?]
at
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:154)
~[?:?]
at
org.apache.druid.data.input.avro.InlineSchemaAvroBytesDecoder.parse(InlineSchemaAvroBytesDecoder.java:88)
~[?:?]
at
org.apache.druid.data.input.avro.AvroStreamReader.intermediateRowIterator(AvroStreamReader.java:78)
~[?:?]
```
Tracing it to the avro
[code](https://github.com/apache/avro/blob/release-1.11.1/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java#L164).
Also, the `read()` method in `1.11.1` now
[only](https://avro.apache.org/docs/1.11.1/api/java/org/apache/avro/util/ByteBufferInputStream.html)
throws `IOException` (in
[previous](https://avro.apache.org/docs/1.7.6/api/java/org/apache/avro/util/ByteBufferInputStream.html)
versions, it seems like both `EOFException` and `IOException` were thrown). So
yeah, I will replace the `EOFException` catch block with `IOException` and
update the exception message.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]