Class DeriveProtobufSchema
java.lang.Object
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveProtobufSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
classToDataType, mapper, PRIMITIVE_SCHEMA_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected com.fasterxml.jackson.databind.node.TextNodeconvertToFormat(com.fasterxml.jackson.databind.JsonNode schema, String name) Converts json schema template to protobuf formatprotected StringconvertToFormatArray(com.fasterxml.jackson.databind.JsonNode schema, String name, int fieldNum) protected StringconvertToFormatRecord(com.fasterxml.jackson.databind.JsonNode schema, String name) protected com.fasterxml.jackson.databind.node.ObjectNodemergeMultipleDataTypes(com.fasterxml.jackson.databind.node.ObjectNode mergedArray, List<com.fasterxml.jackson.databind.JsonNode> primitives, List<com.fasterxml.jackson.databind.JsonNode> records, List<com.fasterxml.jackson.databind.JsonNode> arrays, boolean checkElements) Merge different records into one record and merge number types: double and int/long If there are multiple data types or nested arrays error is returnedprotected com.fasterxml.jackson.databind.node.ArrayNodemergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas, Map<com.fasterxml.jackson.databind.JsonNode, com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex) Merge schemas for multiple messages to combine records and number typesMethods inherited from class io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
getNullSchema, getPrimitiveSchema, getSchemaForArray, getSchemaForMultipleMessages, getSchemaForRecord, getSchemaOfAllElements, getSingleDataType, mergeArrays, mergeRecords, updateSchemaInformation
-
Field Details
-
DOUBLE
- See Also:
-
STRING
- See Also:
-
BOOL
- See Also:
-
INT_32
- See Also:
-
INT_64
- See Also:
-
ANY_FIELD
- See Also:
-
IMPORT_ANY_FIELD
- See Also:
-
FIELD_ENTRY
- See Also:
-
PROTOBUF_SYNTAX
- See Also:
-
-
Constructor Details
-
DeriveProtobufSchema
public DeriveProtobufSchema()
-
-
Method Details
-
mergeMultipleMessages
protected com.fasterxml.jackson.databind.node.ArrayNode mergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas, Map<com.fasterxml.jackson.databind.JsonNode, com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex) Merge schemas for multiple messages to combine records and number types- Specified by:
mergeMultipleMessagesin classDeriveSchema
-
mergeMultipleDataTypes
protected com.fasterxml.jackson.databind.node.ObjectNode mergeMultipleDataTypes(com.fasterxml.jackson.databind.node.ObjectNode mergedArray, List<com.fasterxml.jackson.databind.JsonNode> primitives, List<com.fasterxml.jackson.databind.JsonNode> records, List<com.fasterxml.jackson.databind.JsonNode> arrays, boolean checkElements) Merge different records into one record and merge number types: double and int/long If there are multiple data types or nested arrays error is returned- Specified by:
mergeMultipleDataTypesin classDeriveSchema
-
checkName
- Overrides:
checkNamein classDeriveSchema
-
convertToFormat
protected com.fasterxml.jackson.databind.node.TextNode convertToFormat(com.fasterxml.jackson.databind.JsonNode schema, String name) Converts json schema template to protobuf format- Specified by:
convertToFormatin classDeriveSchema
-
convertToFormatRecord
-
convertToFormatArray
-