diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java index 692c03eb..3d179655 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/io/PfbWriter.java @@ -2,6 +2,8 @@ import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; +import org.apache.avro.file.Codec; +import org.apache.avro.file.CodecFactory; import org.apache.avro.file.DataFileWriter; import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericDatumWriter; @@ -71,6 +73,7 @@ public void writeHeader(String[] data) { try { log.info("Creating temp avro file at " + file.getAbsoluteFile()); dataFileWriter.create(entitySchema, file); + dataFileWriter.setCodec(CodecFactory.deflateCodec(5)); } catch (IOException e) { throw new UncheckedIOException(e); }