Class AvroSchemaUtils
java.lang.Object
io.confluent.kafka.schemaregistry.avro.AvroSchemaUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddLogicalTypeConversion(org.apache.avro.generic.GenericData avroData) static voidstatic AvroSchemacopyOf(AvroSchema schema) static com.fasterxml.jackson.databind.JsonNodefindMatchingEntity(com.fasterxml.jackson.databind.JsonNode node, SchemaEntity entity) static org.apache.avro.generic.GenericDatastatic org.apache.avro.io.DatumWriter<?>getDatumWriter(Object value, org.apache.avro.Schema schema, boolean avroUseLogicalTypeConverters) static org.apache.avro.io.DatumWriter<?>getDatumWriter(Object value, org.apache.avro.Schema schema, boolean useLogicalTypes, boolean allowNull) static org.apache.avro.generic.GenericDatastatic org.apache.avro.generic.GenericDatagetGenericData(boolean useLogicalTypes) static org.apache.avro.reflect.ReflectDatastatic org.apache.avro.reflect.ReflectDatagetReflectData(boolean useLogicalTypes, boolean allowNull) static org.apache.avro.reflect.ReflectDatastatic org.apache.avro.Schemastatic org.apache.avro.SchemagetSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties) static org.apache.avro.SchemagetSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties, boolean throwError) static org.apache.avro.SchemagetSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean useLogicalTypeConverters, boolean removeJavaProperties, boolean throwError) static org.apache.avro.specific.SpecificDatastatic <T> org.apache.avro.specific.SpecificDatagetSpecificDataForClass(Class<T> c) static org.apache.avro.specific.SpecificDatagetSpecificDataForSchema(org.apache.avro.Schema reader) static org.apache.avro.specific.SpecificDatagetSpecificDataForSchema(org.apache.avro.Schema reader, boolean useLogicalTypes) static org.apache.avro.generic.GenericDatastatic org.apache.avro.reflect.ReflectDatastatic org.apache.avro.specific.SpecificDatastatic voidsetThreadLocalData(org.apache.avro.Schema schema, boolean useLogicaltypes, boolean allowNull) static byte[]static voidtoJson(Object value, OutputStream out) protected static StringtoNormalizedString(AvroSchema schema) static ObjecttoObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema) static ObjecttoObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) static ObjecttoObject(String value, AvroSchema schema) static ObjecttoObject(String value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader)
-
Constructor Details
-
AvroSchemaUtils
public AvroSchemaUtils()
-
-
Method Details
-
setThreadLocalData
public static void setThreadLocalData(org.apache.avro.Schema schema, boolean useLogicaltypes, boolean allowNull) -
getThreadLocalGenericData
public static org.apache.avro.generic.GenericData getThreadLocalGenericData() -
getThreadLocalReflectData
public static org.apache.avro.reflect.ReflectData getThreadLocalReflectData() -
getThreadLocalSpecificData
public static org.apache.avro.specific.SpecificData getThreadLocalSpecificData() -
clearThreadLocalData
public static void clearThreadLocalData() -
getGenericData
public static org.apache.avro.generic.GenericData getGenericData(boolean useLogicalTypes) -
getGenericData
public static org.apache.avro.generic.GenericData getGenericData() -
getReflectData
public static org.apache.avro.reflect.ReflectData getReflectData(boolean useLogicalTypes, boolean allowNull) -
getReflectData
public static org.apache.avro.reflect.ReflectData getReflectData() -
getReflectDataAllowNull
public static org.apache.avro.reflect.ReflectData getReflectDataAllowNull() -
getSpecificDataForSchema
public static org.apache.avro.specific.SpecificData getSpecificDataForSchema(org.apache.avro.Schema reader, boolean useLogicalTypes) -
getSpecificDataForSchema
public static org.apache.avro.specific.SpecificData getSpecificDataForSchema(org.apache.avro.Schema reader) -
getSpecificDataForClass
-
getSpecificData
public static org.apache.avro.specific.SpecificData getSpecificData() -
addLogicalTypeConversion
public static void addLogicalTypeConversion(org.apache.avro.generic.GenericData avroData) -
copyOf
-
getPrimitiveSchemas
-
getSchema
-
getSchema
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties) -
getSchema
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean removeJavaProperties, boolean throwError) -
getSchema
public static org.apache.avro.Schema getSchema(Object object, boolean useReflection, boolean reflectionAllowNull, boolean useLogicalTypeConverters, boolean removeJavaProperties, boolean throwError) -
toObject
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema) throws IOException - Throws:
IOException
-
toObject
public static Object toObject(com.fasterxml.jackson.databind.JsonNode value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) throws IOException - Throws:
IOException
-
toObject
- Throws:
IOException
-
toObject
public static Object toObject(String value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) throws IOException - Throws:
IOException
-
toJson
- Throws:
IOException
-
toJson
- Throws:
IOException
-
getData
public static org.apache.avro.generic.GenericData getData(org.apache.avro.Schema schema, Object message, boolean useLogicalTypes, boolean allowNull) -
getDatumWriter
public static org.apache.avro.io.DatumWriter<?> getDatumWriter(Object value, org.apache.avro.Schema schema, boolean avroUseLogicalTypeConverters) -
getDatumWriter
public static org.apache.avro.io.DatumWriter<?> getDatumWriter(Object value, org.apache.avro.Schema schema, boolean useLogicalTypes, boolean allowNull) -
findMatchingEntity
public static com.fasterxml.jackson.databind.JsonNode findMatchingEntity(com.fasterxml.jackson.databind.JsonNode node, SchemaEntity entity) -
toNormalizedString
-