接口 GenericRecord

所有超级接口:
GenericObject

@Public @Stable public interface GenericRecord extends GenericObject
An interface represents a message with schema.
  • 方法详细资料

    • getSchemaVersion

      byte[] getSchemaVersion()
      Return schema version.
      返回:
      schema version, or null if the information is not available.
    • getFields

      List<Field> getFields()
      Returns the list of fields associated with the record.
      返回:
      the list of fields associated with the record.
    • getField

      default Object getField(Field field)
      Retrieve the value of the provided field.
      参数:
      field - the field to retrieve the value
      返回:
      the value object
    • getField

      Object getField(String fieldName)
      Retrieve the value of the provided fieldName.
      参数:
      fieldName - the field name
      返回:
      the value object, or null if field doesn't exist
    • getSchemaType

      default SchemaType getSchemaType()
      Return the schema tyoe.
      指定者:
      getSchemaType 在接口中 GenericObject
      返回:
      the schema type
      抛出:
      UnsupportedOperationException - if this feature is not implemented
      另请参阅:
    • getNativeObject

      default Object getNativeObject()
      Return the internal native representation of the Record, like a AVRO GenericRecord.
      指定者:
      getNativeObject 在接口中 GenericObject
      返回:
      the internal representation of the record
      抛出:
      UnsupportedOperationException - if the operation is not supported