use of org.apache.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper in project druid by druid-io.
the class AvroStreamInputFormatTest method testSerdeNonDefault.
@Test
public void testSerdeNonDefault() throws IOException {
Repository repository = new Avro1124RESTRepositoryClientWrapper("http://github.io");
AvroStreamInputFormat inputFormat = new AvroStreamInputFormat(flattenSpec, new SchemaRepoBasedAvroBytesDecoder<>(new Avro1124SubjectAndIdConverter(TOPIC), repository), true, true);
NestedInputFormat inputFormat2 = jsonMapper.readValue(jsonMapper.writeValueAsString(inputFormat), NestedInputFormat.class);
Assert.assertEquals(inputFormat, inputFormat2);
}
use of org.apache.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper in project druid by druid-io.
the class AvroStreamInputFormatTest method testSerde.
@Test
public void testSerde() throws IOException {
Repository repository = new Avro1124RESTRepositoryClientWrapper("http://github.io");
AvroStreamInputFormat inputFormat = new AvroStreamInputFormat(flattenSpec, new SchemaRepoBasedAvroBytesDecoder<>(new Avro1124SubjectAndIdConverter(TOPIC), repository), false, false);
NestedInputFormat inputFormat2 = jsonMapper.readValue(jsonMapper.writeValueAsString(inputFormat), NestedInputFormat.class);
Assert.assertEquals(inputFormat, inputFormat2);
}
use of org.apache.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper in project druid by druid-io.
the class AvroStreamInputRowParserTest method testSerdeNonDefault.
@Test
public void testSerdeNonDefault() throws IOException {
Repository repository = new Avro1124RESTRepositoryClientWrapper("http://github.io");
AvroStreamInputRowParser parser = new AvroStreamInputRowParser(PARSE_SPEC, new SchemaRepoBasedAvroBytesDecoder<>(new Avro1124SubjectAndIdConverter(TOPIC), repository), true, true);
ByteBufferInputRowParser parser2 = jsonMapper.readValue(jsonMapper.writeValueAsString(parser), ByteBufferInputRowParser.class);
Assert.assertEquals(parser, parser2);
}
use of org.apache.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper in project druid by druid-io.
the class AvroStreamInputRowParserTest method testSerde.
@Test
public void testSerde() throws IOException {
Repository repository = new Avro1124RESTRepositoryClientWrapper("http://github.io");
AvroStreamInputRowParser parser = new AvroStreamInputRowParser(PARSE_SPEC, new SchemaRepoBasedAvroBytesDecoder<>(new Avro1124SubjectAndIdConverter(TOPIC), repository), false, false);
ByteBufferInputRowParser parser2 = jsonMapper.readValue(jsonMapper.writeValueAsString(parser), ByteBufferInputRowParser.class);
Assert.assertEquals(parser, parser2);
}
Aggregations