[ 
https://issues.apache.org/jira/browse/AVRO-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Zeyliger updated AVRO-245:
---------------------------------

    Attachment: AVRO-245.patch.txt

Attaching a new version of the patch.

The utilities have been given shorter names (see below).  

The debate about how to deal with newlines actually had an elegant solution: we 
simply read in JSON records, no matter how they're delimited.  So "1 2 3" and 
"1\n2\n3\n" would be read in the same way.  Newline is still standard (and used 
by the "tojson" tool), but no need to special case it.  Furthermore. 
parser.init() is called at every record to reset the JsonGenerator, which was 
causing extra spaces to occur.

This patch also inserted a bunch of checkEof() methods in JsonParser.  Ideally 
those wouldn't need to be at every line, but, practically, it turns out that 
parser.advance() calls back into JsonParser, which calls in.nextToken().  An 
alternative is to just ignore partial records at the end of files.  That has 
fewer ugly lines.

{noformat}
Available tools:
   compile  Generates Java code for the given schema.
fragtojson  Converts binary data to JSON.
  fromjson  Reads in JSON (one record per line), and writes to an avro data 
file.
 getschema  Prints out schema of an Avro data file.
    induce  Use reflection to induce a schema from a class or a protocol from 
an interface.
jsontofrag  Converts text data to an Avro binary fragment.
    tojson  Dumps the contents of an Avro data file as JSON, one record per 
line.
{noformat}

> Commandline utility for converting to and from Avro's binary format.
> --------------------------------------------------------------------
>
>                 Key: AVRO-245
>                 URL: https://issues.apache.org/jira/browse/AVRO-245
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>            Priority: Minor
>         Attachments: AVRO-245.patch, AVRO-245.patch, AVRO-245.patch.txt, 
> AVRO-245.patch.txt, AVRO-245.patch.txt, AVRO-245.patch.txt, AVRO-245.patch.txt
>
>
> A utility for avrotool that can convert between Avro binary data and the JSON 
> textual form.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to