1.Avro基本数据类型
类型 描述 模式示例
null The absence of a value "null"
boolean A binary value "boolean"
int 32位带符号整数 "int"
long 64位带符号整数 "long"
float 32位单精度浮点数 "float"
double 64位双精度浮点数 "double"
bytes byte数组(8位无字符字节序列) "bytes"
string Unicode字符串 "string"
【Avro基本数据类型还可以使用更冗长的形式使用type属性来指定如{"type":"null"}】
2.Avro复杂数据类型
数据类型 类型描述 模式示例
array An ordered collection of objects. {
All objects in a particular "type": "array",
array must have the same schema. "items": "long"
}
map An unordered collection of key-value pairs. {
Keys must be strings and values may be any type, "type": "map",
although within a particular map, "values": "string"
all values must have the same schema. }
类型 描述 模式示例
null The absence of a value "null"
boolean A binary value "boolean"
int 32位带符号整数 "int"
long 64位带符号整数 "long"
float 32位单精度浮点数 "float"
double 64位双精度浮点数 "double"
bytes byte数组(8位无字符字节序列) "bytes"
string Unicode字符串 "string"
【Avro基本数据类型还可以使用更冗长的形式使用type属性来指定如{"type":"null"}】
2.Avro复杂数据类型
数据类型 类型描述 模式示例
array An ordered collection of objects. {
All objects in a particular "type": "array",
array must have the same schema. "items": "long"
}
map An unordered collection of key-value pairs. {
Keys must be strings and values may be any type, "type": "map",
although within a particular map, "values": "string"
all values must have the same schema. }