Class AvroSchemaUtils

java.lang.Object
io.confluent.kafka.schemaregistry.avro.AvroSchemaUtils

public class AvroSchemaUtils extends Object
  • 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

      public static <T> org.apache.avro.specific.SpecificData getSpecificDataForClass(Class<T> c)
    • getSpecificData

      public static org.apache.avro.specific.SpecificData getSpecificData()
    • addLogicalTypeConversion

      public static void addLogicalTypeConversion(org.apache.avro.generic.GenericData avroData)
    • copyOf

      public static AvroSchema copyOf(AvroSchema schema)
    • getPrimitiveSchemas

      public static Map<String,org.apache.avro.Schema> getPrimitiveSchemas()
    • getSchema

      public static org.apache.avro.Schema getSchema(Object object)
    • 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

      public static Object toObject(String value, AvroSchema schema) throws IOException
      Throws:
      IOException
    • toObject

      public static Object toObject(String value, AvroSchema schema, org.apache.avro.io.DatumReader<Object> reader) throws IOException
      Throws:
      IOException
    • toJson

      public static byte[] toJson(Object value) throws IOException
      Throws:
      IOException
    • toJson

      public static void toJson(Object value, OutputStream out) throws IOException
      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

      protected static String toNormalizedString(AvroSchema schema)