[ 
https://issues.apache.org/jira/browse/AVRO-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784501#action_12784501
 ] 

Philip Zeyliger commented on AVRO-245:
--------------------------------------

bq. Since there's no code in the containing class, I see no point to having it. 
Rather we should just have JsonToBinaryTool and BinaryToJsonTool. 

Done.  I kept both tests in the same class, because it was convenient to share 
constants.

bq. Also, these should be more symmetric, both either taking their input from a 
file, from the command line or from standard input. My preference would 
probably be either a named file or standard in/out if that's not provided.

Changed so that it uses a named file, and "-" implies stdin.  Agreed that the 
symmetric form looks better.

bq. You're not using the container file format, but rather just a file 
containing a single record. A tool that takes json lines from standard input 
and emits an avro data file and vice versa would be useful, no?

Absolutely.  I'm just doing these one at a time.

bq. Finally, it doesn't look like you close the file you open for write.

Good catch: I didn't close the file I opened for _read_.  I don't think one is 
supposed to close System.out and System.in, so I ended up having to bifurcate 
the code there.

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