Search in sources :

Example 1 with SchemaRegistryBasedAvroBytesDecoder

use of org.apache.druid.data.input.avro.SchemaRegistryBasedAvroBytesDecoder in project druid by druid-io.

the class AvroStreamInputFormatTest method testSerdeForSchemaRegistry.

@Test
public void testSerdeForSchemaRegistry() throws IOException {
    AvroStreamInputFormat inputFormat = new AvroStreamInputFormat(flattenSpec, new SchemaRegistryBasedAvroBytesDecoder("http://test:8081", 100, null, null, null, null), false, false);
    NestedInputFormat inputFormat2 = jsonMapper.readValue(jsonMapper.writeValueAsString(inputFormat), NestedInputFormat.class);
    Assert.assertEquals(inputFormat, inputFormat2);
}
Also used : NestedInputFormat(org.apache.druid.data.input.impl.NestedInputFormat) SchemaRegistryBasedAvroBytesDecoder(org.apache.druid.data.input.avro.SchemaRegistryBasedAvroBytesDecoder) AvroStreamInputFormat(org.apache.druid.data.input.avro.AvroStreamInputFormat) Test(org.junit.Test)

Aggregations

AvroStreamInputFormat (org.apache.druid.data.input.avro.AvroStreamInputFormat)1 SchemaRegistryBasedAvroBytesDecoder (org.apache.druid.data.input.avro.SchemaRegistryBasedAvroBytesDecoder)1 NestedInputFormat (org.apache.druid.data.input.impl.NestedInputFormat)1 Test (org.junit.Test)1