Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1232

Output of Avro data using MapReduce with TextOutputFormat is not useful

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.3
    • 1.7.4
    • java
    • None

    Description

      When using Avro data as the output key/values of a MapReduce job with TextOutputFormat, you get output that looks like:

      org.apache.avro.mapred.AvroKey@1f62000	org.apache.avro.mapred.AvroValue@1
      org.apache.avro.mapred.AvroKey@1fe8c4a	org.apache.avro.mapred.AvroValue@1
      org.apache.avro.mapred.AvroKey@10b85e	org.apache.avro.mapred.AvroValue@1
      org.apache.avro.mapred.AvroKey@877ec817	org.apache.avro.mapred.AvroValue@1
      org.apache.avro.mapred.AvroKey@3f904e5b	org.apache.avro.mapred.AvroValue@1
      org.apache.avro.mapred.AvroKey@b581cda5	org.apache.avro.mapred.AvroValue@1
      

      I think all that needs to be done is implement toString() on AvroWrapper. It should return its datum as JSON.

      Attachments

        1. AVRO-1232.patch
          0.5 kB
          Doug Cutting
        2. AVRO-1232.patch
          2 kB
          Garrett Wu
        3. AVRO-1232.patch
          6 kB
          Garrett Wu

        Activity

          People

            gwu Garrett Wu
            gwu Garrett Wu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: