How big is the original data you are trying to compress? 

Sent from my iPhone

On Mar 30, 2012, at 12:43 AM, snikhil0 <[email protected]> wrote:

> I must be doing something wrong: I am writing out avro files with three 
> options: a. no codec b. deflate codec c. snappy codec I am measuring size of 
> final avro file. In my observation, the snappy file is larger than the 
> original avro file? duh? code snippet: File fs = new 
> File("$DATA/log_snappy.avro"); DatumWriter writer = new GenericDatumWriter( 
> schema); dataFileWriter = new DataFileWriter(writer); 
> dataFileWriter.setCodec(CodecFactory.snappyCodec()); 
> dataFileWriter.create(schema, fs); while(...){ GenericRecord datum = //get 
> datum from object dataFileWriter.append(datum); dataFileWriter.flush(); } 
> Thanks, Nikhil 
> View this message in context: avro compression using snappy and deflate
> Sent from the Avro - Users mailing list archive at Nabble.com.

Reply via email to