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

Doug Cutting commented on AVRO-567:
-----------------------------------

Looks good!  A few nits:
 - I prefer naming these "totext" and "fromtext", or perhaps "tolines" and 
"fromlines", and classes named ToTextTool and FromTextTool.  Avro's implicit.
 - System.getProperty("line.separator").getBytes() should be stored in a 
constant
 - inStream and outStream should be buffered for performance so that every call 
to read or write doesn't result in a system call.  DataFileStream doesn't 
automatically add buffering.  Hadoop streams are always buffered, and 
DataFileWriter add's buffering, but adding it redundantly shouldn't cause 
problems either.
 - compressionLevel should be optional, no?  you can use withOptionalArg, e.g. 
{code}
OptionSpec<Integer> level = p.accepts("level", "compression level")
  .withOptionalArg().ofType(Integer.class);
OptionSet opts = p.parse(...);
if (ops.hasArgument(level))
  compressionLevel = level.value(opts);{code}


> add tools for text file import and export
> -----------------------------------------
>
>                 Key: AVRO-567
>                 URL: https://issues.apache.org/jira/browse/AVRO-567
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Patrick Wendell
>             Fix For: 1.4.0
>
>         Attachments: AVRO-567.patch.txt
>
>
> It would be good to have command-line tools to convert between 
> newline-delimited text to Avro data files.

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