没有合适的资源?快使用搜索试试~ 我知道了~
首页Avro Schema 格式说明+示例
Avro Schema 格式说明+示例

例如:Test.avsc文件,利用avro的插件可生成对应的Test 类,这个类可以利用avro的API序列化和反序列化
资源详情
资源评论
资源推荐

Avro简单格式列表(8种)
原生类型
说明
null
表示没有值
boolean
表示一个二级制布尔值
int
表示
32
位有符号整数
long
表示
64
位有符号整数
float
表示
32
位单精度浮点数
double
表示
64
位双精度浮点数
bytes
表示
8
位无符号字节序列
string
表示字符序列
Avro复杂格式列表(6种)
只需掌握:record
复杂类型
属性
说明
Records
type name
record
name
a JSON string providing the name of the record (required).
namespace
a JSON string that qualifies the name(optional).
doc
a JSON string providing documentation to the user of this schema (optional).
aliases
a JSON array of strings, providing alternate names for this record (optional).
fields
a JSON array, listing fields (required).
name
a JSON string.
type
a schema/a string of defined record.
default
a default value for field when lack.
order
ordering of this field.
Enums
type name
enum
name
a JSON string providing the name of the enum (required).
namespace
a JSON string that qualifies the name.
doc
a JSON string providing documentation to the user of this schema (optional).
aliases
a JSON array of strings, providing alternate names for this enum (optional)
symbols
a JSON array, listing symbols, as JSON strings (required). All symbols in an enum must be
unique.
Arrays
type name
array
items
the schema of the array’s items.
Maps
type name
map
values
the schema of the map’s values.
Fixed
type name
fixed
name
a string naming this fixed (required).
namespace
a string that qualifies the name.
aliases
a JSON array of strings, providing alternate names for this enum (optional).
size
an integer, specifying the number of bytes per value (required).
Avro Schema
格式说明
2016
年
9
月
16
日
8:31
分区 第四天 的第 1 页


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论1