[ 
https://issues.apache.org/jira/browse/CRUNCH-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443061#comment-13443061
 ] 

Rahul Sharma commented on CRUNCH-52:
------------------------------------

Some addition to this, when we try to write avro data to text using 
pipeline.writeToTextFile(.....) it throws back ClassCastException as the class 
is not of type o.a.hadoop.io.Writable

java.lang.ClassCastException: class org.apache.crunch.test.Person
        at java.lang.Class.asSubclass(Class.java:3018)
        at 
org.apache.crunch.types.writable.Writables.records(Writables.java:250)
        at 
org.apache.crunch.types.writable.WritableTypeFamily.records(WritableTypeFamily.java:86)
        at org.apache.crunch.types.PTypeUtils.convert(PTypeUtils.java:61)
        
So should it be allowed to write back avro data to text files ? If so, 
shouldn't the behavior be the same at both the places ?
                
> Writing to a text file with avro types fills a file with the tostring of 
> AvroWrapper
> ------------------------------------------------------------------------------------
>
>                 Key: CRUNCH-52
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-52
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Robert Chu
>
> Currently when writing a pcollection to a text file (provided by 
> To.textFile(...)) TextOutputFormat doesn't unwrap avro types.

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

Reply via email to