[
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
Ok, I've added "data_file_read" and "data_file_write"; also
"data_file_get_schema". I didn't do the thing where the schema is the first
line (in part because I want that to be turn-offable, and we need commandline
parsing for that). I've renamed the json_to_binary tool to
json_to_binary_fragment.
I added two classes to hold some utilities, Tool/Util.java, and
TestingUtil.java, for tiny things that made sense. (It's future work to use
them more widely, but I didn't want to clutter this patch.) I wanted to name
the second one TestUtil, but then junit would run it. Even so, I had to update
build.xml to only include tests for filenames Test[A-Z]* (instead of Test*),
but I figure that's alright. I'm very open to other naming suggestions.
If folks prefer, I could break up the data_file and the data_fragment stuff
across two JIRAs.
For now, I'm continuing to do tests both in Java and in the shell script.
That's getting a bit tiresome, admittedly.
Here's what the set of tool commands are with this change:
{noformat}
$/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -jar
/Users/philip/src/avro/build/avroj-1.2.0-dev.jar
Available tools:
binary_fragment_to_json Converts binary data to JSON.
compile Generates Java code for the given schema.
data_file_get_schema Prints out schema of an Avro data file.
data_file_read Dumps the contents of an Avro data file as JSON, one
record per line.
data_file_write Reads in JSON (one record per line), and writes to an
avro data file.
induce Use reflection to induce a schema from a class or a
protocol from an interface.
json_to_binary_fragment Converts text data to an Avro binary fragment.
{noformat}
AVRO-160 was very noticeable when I wrote "data_file_read", since you can't
read an avro data file from stdin: you need something seekable.
> 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, 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.