Search in sources :

Example 1 with Avro1124RESTRepositoryClientWrapper

use of io.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<String, Integer>(new Avro1124SubjectAndIdConverter(TOPIC), repository));
    ByteBufferInputRowParser parser2 = jsonMapper.readValue(jsonMapper.writeValueAsString(parser), ByteBufferInputRowParser.class);
    assertEquals(parser, parser2);
}
Also used : Avro1124SubjectAndIdConverter(io.druid.data.input.schemarepo.Avro1124SubjectAndIdConverter) Repository(org.schemarepo.Repository) InMemoryRepository(org.schemarepo.InMemoryRepository) TypedSchemaRepository(org.schemarepo.api.TypedSchemaRepository) Avro1124RESTRepositoryClientWrapper(io.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper) Test(org.junit.Test)

Aggregations

Avro1124RESTRepositoryClientWrapper (io.druid.data.input.schemarepo.Avro1124RESTRepositoryClientWrapper)1 Avro1124SubjectAndIdConverter (io.druid.data.input.schemarepo.Avro1124SubjectAndIdConverter)1 Test (org.junit.Test)1 InMemoryRepository (org.schemarepo.InMemoryRepository)1 Repository (org.schemarepo.Repository)1 TypedSchemaRepository (org.schemarepo.api.TypedSchemaRepository)1