Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-147

Pipeline.writeTextFile should work with Avro data

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.4.0
    • 0.5.0
    • Core
    • None

    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

        1. CRUNCH-147.patch
          0.8 kB
          Dave Beech
        2. CRUNCH-147b.patch
          5 kB
          Josh Wills

        Issue Links

          Activity

            People

              jwills Josh Wills
              dbeech Dave Beech
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: