Search in sources :

Example 1 with SerdeFeature

use of io.confluent.ksql.serde.SerdeFeature in project ksql by confluentinc.

the class DataGenProducer method getKeySerializer.

private Serializer<GenericKey> getKeySerializer(final LogicalSchema schema) {
    final Set<SerdeFeature> supported = keySerializerFactory.format().supportedFeatures();
    final SerdeFeatures features = supported.contains(SerdeFeature.UNWRAP_SINGLES) ? SerdeFeatures.of(SerdeFeature.UNWRAP_SINGLES) : SerdeFeatures.of();
    final PersistenceSchema persistenceSchema = PersistenceSchema.from(schema.key(), features);
    return keySerializerFactory.create(persistenceSchema);
}
Also used : SerdeFeature(io.confluent.ksql.serde.SerdeFeature) PersistenceSchema(io.confluent.ksql.schema.ksql.PersistenceSchema) SerdeFeatures(io.confluent.ksql.serde.SerdeFeatures)

Aggregations

PersistenceSchema (io.confluent.ksql.schema.ksql.PersistenceSchema)1 SerdeFeature (io.confluent.ksql.serde.SerdeFeature)1 SerdeFeatures (io.confluent.ksql.serde.SerdeFeatures)1