use of org.apache.pulsar.client.api.schema.SchemaDefinition in project incubator-pulsar by apache.
the class NativeAvroBytesSchema method setSchema.
public void setSchema(org.apache.avro.Schema schema) {
SchemaDefinition schemaDefinition = SchemaDefinition.builder().withJsonDef(schema.toString(false)).build();
this.nativeSchema = schema;
this.schema = AvroSchema.of(schemaDefinition);
}
use of org.apache.pulsar.client.api.schema.SchemaDefinition in project pulsar by yahoo.
the class NativeAvroBytesSchema method setSchema.
public void setSchema(org.apache.avro.Schema schema) {
SchemaDefinition schemaDefinition = SchemaDefinition.builder().withJsonDef(schema.toString(false)).build();
this.nativeSchema = schema;
this.schema = AvroSchema.of(schemaDefinition);
}
use of org.apache.pulsar.client.api.schema.SchemaDefinition in project pulsar by apache.
the class NativeAvroBytesSchema method setSchema.
public void setSchema(org.apache.avro.Schema schema) {
SchemaDefinition schemaDefinition = SchemaDefinition.builder().withJsonDef(schema.toString(false)).build();
this.nativeSchema = schema;
this.schema = AvroSchema.of(schemaDefinition);
}
Aggregations