I've set emitNullTuples to false and I log an error, as you said: I control
the Avro producer so decoding errors shouldn't happen.

Thanks.

Le sam. 21 oct. 2017 à 11:34, Stig Rohde Døssing <[email protected]> a écrit :

> You can return null and use the null filtering feature to drop the tuple
> https://github.com/apache/storm/pull/1999/files#diff-d659c1bc030b3a9d2af43523215ccceeR412
> (1.1.0 or later).
>
> If you control the Avro producer so decoding errors shouldn't happen, I'd
> log it as an error log because it indicates a bug in your code.
>
> 2017-10-18 11:36 GMT+02:00 Arnaud BOS <[email protected]>:
>
>> Hi all,
>>
>> I've implemented a simple RecordTranslator in order to decode an
>> Avro message sent by a Kafka producer.
>>
>> The interesting bit looks like the standard decoding example:
>>
>> SpecificDatumReader<User> reader = new 
>> SpecificDatumReader<User>(User.getClassSchema());
>> Decoder decoder = DecoderFactory.get().binaryDecoder(bytes, null);
>> User user = reader.read(null, decoder);
>>
>> However `reader.read` throws an `IOException` in case of a decoding error.
>>
>> How am I supposed to deal with the error ?
>>
>> Logging a warning message and return `null` ?
>> What would be the implications downstream ?
>>
>> Thanks for your help.
>>
>
>

Reply via email to