Description
I'd find it useful to be able to dump Avro collections to a text file (as json) during development to have a quick look inside without having to mess around with avro-tools. The current Pipeline.writeTextFile method expects Writables and gives the following error when you attempt to pass Avro to it:
Exception in thread "main" java.lang.ClassCastException: class my.avro.Record
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)
at org.apache.crunch.types.writable.WritableTypeFamily.as(WritableTypeFamily.java:135)
Attachments
Attachments
Issue Links
- relates to
-
CRUNCH-52 Writing to a text file with avro types fills a file with the tostring of AvroWrapper
- Closed