public interface Record
extends org.apache.avro.generic.IndexedRecord
| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index)
Returns the value of the specified field.
|
Object |
get(String name)
Returns the value of the specified field.
|
ByteBuffer |
getBytes(int index)
Returns the value of the specified field cast to a
ByteBuffer. |
ByteBuffer |
getBytes(String name)
Returns the value of the specified field cast to a
ByteBuffer. |
Map<String,Object> |
getDataMap()
Returns a
Map of field names to values that is bound to the
record (updates made to the map are reflected in the record and vice
versa). |
Double |
getDouble(int index)
Returns the value of the specified field cast to a
Double. |
Double |
getDouble(String name)
Returns the value of the specified field cast to a
Double. |
Float |
getFloat(int index)
Returns the value of the specified field cast to a
Float. |
Float |
getFloat(String name)
Returns the value of the specified field cast to a
Float. |
Integer |
getInt(int index)
Returns the value of the specified field cast to a
Integer. |
Integer |
getInt(String name)
Returns the value of the specified field cast to a
Integer. |
Long |
getLong(int index)
Returns the value of the specified field cast to a
Long. |
Long |
getLong(String name)
Returns the value of the specified field cast to a
Long. |
org.apache.avro.Schema |
getSchema()
Returns the Avro record schema of the record.
|
String |
getString(int index)
Returns the value of the specified field cast to a
String. |
String |
getString(String name)
Returns the value of the specified field cast to a
String. |
Type |
getType()
Returns the GPUdb
Type of the record. |
void |
put(int index,
Object value)
Sets the value of the specified field.
|
void |
put(String name,
Object value)
Sets the value of the specified field.
|
org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainerObject get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the index of the fieldIndexOutOfBoundsException - if the specified index is not validObject get(String name)
name - the name of the fieldnull if no field with the
specified name existsByteBuffer getBytes(int index)
ByteBuffer.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validByteBuffer getBytes(String name)
ByteBuffer.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typeDouble getDouble(int index)
Double.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validDouble getDouble(String name)
Double.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typeFloat getFloat(int index)
Float.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validFloat getFloat(String name)
Float.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typeInteger getInt(int index)
Integer.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validInteger getInt(String name)
Integer.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typeLong getLong(int index)
Long.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validLong getLong(String name)
Long.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typeString getString(int index)
String.
If the field is not of the correct type an exception will be thrown.index - the index of the fieldClassCastException - if the field is not of the correct typeIndexOutOfBoundsException - if the specified index is not validString getString(String name)
String.
If the field is not of the correct type an exception will be thrown.name - the name of the fieldClassCastException - if the field is not of the correct typevoid put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the index of the fieldvalue - the new valueIllegalArgumentException - if the field cannot be set to the
specified valueIndexOutOfBoundsException - if the specified index is not validvoid put(String name, Object value)
name - the name of the fieldvalue - the new valueIllegalArgumentException - if no field exists with the specified
name or the field cannot be set to the specified valueCopyright © 2017. All rights reserved.