You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by "harisgx ." <ha...@gmail.com> on 2011/05/30 17:07:25 UTC

Converting written layout for log4j using avro to data file

Hi,

I have written a layout for log4j using avro.

http://bytescrolls.blogspot.com/2011/05/using-avro-to-serialize-logs-in-log4j.html

https://github.com/harisgx/avro-log4j

But if I want to convert the records to a avro data file in a compressed
form, in the docs it is mentioned about to use  DataFileWriteTool to read
new-line delimited JSON records.
in the method,
- run(InputStream stdin, PrintStream out, PrintStream err, List<String>
args)

args is to be non null. How do we populate the args values?

thanks
-haris

Re: Converting written layout for log4j using avro to data file

Posted by Doug Cutting <cu...@apache.org>.
On 05/30/2011 05:07 PM, harisgx . wrote:
> But if I want to convert the records to a avro data file in a compressed
> form, in the docs it is mentioned about to use  DataFileWriteTool to
> read new-line delimited JSON records.
> in the method,
> -run(InputStream stdin, PrintStream out, PrintStream err, List<String>
> args) 
> 
> args is to be non null. How do we populate the args values?

DataFileWriteTool is for command-line use.  The 'args' parameter
contains parameters supplied on the command-line.  From a Java program
you should instead use DataFileWriter.

http://avro.apache.org/docs/current/api/java/org/apache/avro/file/DataFileWriter.html

Doug