Skip to content

Commit

Permalink
ALS-6511: Attempt to fix snappy codec bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Jul 23, 2024
1 parent 1360901 commit 7bc1109
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 7bc1109

Please sign in to comment.