From 7bc11090166084aa2d0e498429feab2e52c6a37e Mon Sep 17 00:00:00 2001 From: Ryan Amari Date: Tue, 23 Jul 2024 14:01:36 -0400 Subject: [PATCH] ALS-6511: Attempt to fix snappy codec bug --- .../hms/dbmi/avillach/hpds/processing/io/PfbWriter.java | 3 +++ 1 file changed, 3 insertions(+) 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); }