接口 RecordSchemaBuilder
-
@Public @Stable public interface RecordSchemaBuilder
Building the schema for aGenericRecord.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 SchemaInfobuild(SchemaType schemaType)Build the schema info.RecordSchemaBuilderdoc(java.lang.String doc)Add doc to the record schema.FieldSchemaBuilderfield(java.lang.String fieldName)Add a field with the given name to the record.FieldSchemaBuilderfield(java.lang.String fieldName, GenericSchema genericSchema)Add a field with the given name and genericSchema to the record.RecordSchemaBuilderproperty(java.lang.String name, java.lang.String val)Attach val-name property pair to the record schema.
-
-
-
方法详细资料
-
property
RecordSchemaBuilder property(java.lang.String name, java.lang.String val)
Attach val-name property pair to the record schema.- 参数:
name- property nameval- property value- 返回:
- record schema builder
-
field
FieldSchemaBuilder field(java.lang.String fieldName)
Add a field with the given name to the record.- 参数:
fieldName- name of the field- 返回:
- field schema builder to build the field.
-
field
FieldSchemaBuilder field(java.lang.String fieldName, GenericSchema genericSchema)
Add a field with the given name and genericSchema to the record.- 参数:
fieldName- name of the fieldgenericSchema- schema of the field- 返回:
- field schema builder to build the field.
-
doc
RecordSchemaBuilder doc(java.lang.String doc)
Add doc to the record schema.- 参数:
doc- documentation- 返回:
- field schema builder
-
build
SchemaInfo build(SchemaType schemaType)
Build the schema info.- 返回:
- the schema info.
-
-