Search in sources :

Example 6 with CodecFactory

use of org.apache.avro.file.CodecFactory in project incubator-gobblin by apache.

the class WriterUtilsTest method testGetCodecFactoryIgnoresCase.

@Test
public void testGetCodecFactoryIgnoresCase() {
    CodecFactory codecFactory = WriterUtils.getCodecFactory(Optional.of("SNAPPY"), Optional.<String>absent());
    Assert.assertEquals(codecFactory.toString(), "snappy");
    codecFactory = WriterUtils.getCodecFactory(Optional.of("snappy"), Optional.<String>absent());
    Assert.assertEquals(codecFactory.toString(), "snappy");
}
Also used : CodecFactory(org.apache.avro.file.CodecFactory) Test(org.testng.annotations.Test)

Aggregations

CodecFactory (org.apache.avro.file.CodecFactory)6 Schema (org.apache.avro.Schema)4 DataFileWriter (org.apache.avro.file.DataFileWriter)3 GenericDatumWriter (org.apache.avro.generic.GenericDatumWriter)3 IOException (java.io.IOException)2 OutputStream (java.io.OutputStream)2 GenericRecord (org.apache.avro.generic.GenericRecord)2 Closeable (java.io.Closeable)1 Record (org.apache.avro.generic.GenericData.Record)1 Option (org.apache.commons.cli.Option)1 AvroSerdeException (org.apache.hadoop.hive.serde2.avro.AvroSerdeException)1 Expressions.filterSchema (org.apache.parquet.cli.util.Expressions.filterSchema)1 Test (org.testng.annotations.Test)1