@InterfaceAudience.Public @InterfaceStability.Stable public interface GenericRecord extends GenericObject
| Modifier and Type | Method and Description |
|---|---|
default Object |
getField(Field field)
Retrieve the value of the provided field.
|
Object |
getField(String fieldName)
Retrieve the value of the provided fieldName.
|
List<Field> |
getFields()
Returns the list of fields associated with the record.
|
default Object |
getNativeObject()
Return the internal native representation of the Record,
like a AVRO GenericRecord.
|
default SchemaType |
getSchemaType()
Return the schema tyoe.
|
byte[] |
getSchemaVersion()
Return schema version.
|
byte[] getSchemaVersion()
List<Field> getFields()
default Object getField(Field field)
field - the field to retrieve the valueObject getField(String fieldName)
fieldName - the field namedefault SchemaType getSchemaType()
getSchemaType in interface GenericObjectUnsupportedOperationException - if this feature is not implementedSchemaType.AVRO,
SchemaType.PROTOBUF_NATIVE,
SchemaType.JSONdefault Object getNativeObject()
getNativeObject in interface GenericObjectUnsupportedOperationException - if the operation is not supportedCopyright © 2017–2021 Apache Software Foundation. All rights reserved.