You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Jagannathrao Mudda (Jira)" <ji...@apache.org> on 2019/08/20 17:28:00 UTC

[jira] [Updated] (AVRO-2514) Making Avro serialization error message more actionable with schema name and field name

     [ https://issues.apache.org/jira/browse/AVRO-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jagannathrao Mudda updated AVRO-2514:
-------------------------------------
    Description: 
In certain scenarios when there is a serialization error, avro serializer gives following error messages that are not actionable without any schema name and/field name in it.
 * java.lang.Double cannot be cast to java.lang.Long
 * Not an enum: null
 * ClassCastException 
 * ..

If there is a filed name of specific schema that is causing these serialization errors, that helps to fix such issues quickly.

 

*Proposed Changes:*

The "writeWithoutConversion" method of "GenericDatumWriter"  class can be updated to handle "ClassCastException" along with "NullPointerException" to throw an exception with schema name and field name.

The "writeEnum" and "error" method can be enhanced to add field names so that error message can have the field that is causing the issue.

 

 

  was:
In certain scenarios when there is a serialization error, avro serializer gives following error messages that are not actionable without any schema name and/field name in it.
 * java.lang.Double cannot be cast to java.lang.Long
 * Not an enum: null
 * ClassCastException 
 * ..

If there is a filed name of specific schema that is causing these serialization errors, that helps to fix such issues quickly.

 

 

 


> Making Avro serialization error message more actionable with schema name and field name
> ---------------------------------------------------------------------------------------
>
>                 Key: AVRO-2514
>                 URL: https://issues.apache.org/jira/browse/AVRO-2514
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.6.3, 1.9.0, 1.8.2
>            Reporter: Jagannathrao Mudda
>            Priority: Major
>             Fix For: 1.9.1
>
>
> In certain scenarios when there is a serialization error, avro serializer gives following error messages that are not actionable without any schema name and/field name in it.
>  * java.lang.Double cannot be cast to java.lang.Long
>  * Not an enum: null
>  * ClassCastException 
>  * ..
> If there is a filed name of specific schema that is causing these serialization errors, that helps to fix such issues quickly.
>  
> *Proposed Changes:*
> The "writeWithoutConversion" method of "GenericDatumWriter"  class can be updated to handle "ClassCastException" along with "NullPointerException" to throw an exception with schema name and field name.
> The "writeEnum" and "error" method can be enhanced to add field names so that error message can have the field that is causing the issue.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)