You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Alexandre Normand (JIRA)" <ji...@apache.org> on 2012/09/13 23:17:07 UTC

[jira] [Created] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Alexandre Normand created AVRO-1162:
---------------------------------------

             Summary: AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
                 Key: AVRO-1162
                 URL: https://issues.apache.org/jira/browse/AVRO-1162
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.7.2
            Reporter: Alexandre Normand
            Assignee: Alexandre Normand


When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.

I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Alexandre Normand (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandre Normand updated AVRO-1162:
------------------------------------

    Attachment: AVRO-1162.patch

This patch includes a new test in {{TestAvroKeyValueRecordWriter}} that fails before the fix but is successful with the change.
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: java, newbie
>         Attachments: AVRO-1162.patch, AVRO-1162.patch
>
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455335#comment-13455335 ] 

Doug Cutting commented on AVRO-1162:
------------------------------------

This looks reasonable to me.  Can you please add a test that fails without it?
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: java, newbie
>         Attachments: AVRO-1162.patch
>
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455308#comment-13455308 ] 

Doug Cutting commented on AVRO-1162:
------------------------------------

Did you intend to attach the patch?
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: java, newbie
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-1162:
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7.2
           Status: Resolved  (was: Patch Available)

I committed this.  Thanks, Alexandre.
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: java, newbie
>             Fix For: 1.7.2
>
>         Attachments: AVRO-1162.patch, AVRO-1162.patch
>
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Alexandre Normand (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandre Normand updated AVRO-1162:
------------------------------------

    Attachment: AVRO-1162.patch

Yes, sorry about that :)
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: java, newbie
>         Attachments: AVRO-1162.patch
>
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AVRO-1162) AvroKeyValueOutputFormat doesn't support serialization of data using reflection

Posted by "Alexandre Normand (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandre Normand updated AVRO-1162:
------------------------------------

    Labels: java newbie  (was: )
    Status: Patch Available  (was: Open)

I've tested with this patch that just changes GenericDatumWriter to ReflectDatumWriter in AvroKeyValueRecordWriter. 
                
> AvroKeyValueOutputFormat doesn't support serialization of data using reflection 
> --------------------------------------------------------------------------------
>
>                 Key: AVRO-1162
>                 URL: https://issues.apache.org/jira/browse/AVRO-1162
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: newbie, java
>
> When setting up a map/reduce job with the AvroKeyValueOutputFormat, using Reflection to create the schema and AvroValue to wrap the data objects to serialize, I get a ClassCastException because the datum is the object and not an instance of IndexedRecord.
> I think that AvroKeyValueRecordWriter should create a {{ReflectDatumWriter}} much like AvroKeyRecordWriter does instead of a {{GenericDatumWriter}}, right?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira