|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.record.Record
org.apache.hadoop.record.meta.RecordTypeInfo
public class RecordTypeInfo
A record's Type Information object which can read/write itself. Type information for a record comprises metadata about the record, as well as a collection of type information for each field in the record.
Constructor Summary | |
---|---|
RecordTypeInfo()
Create an empty RecordTypeInfo object. |
|
RecordTypeInfo(java.lang.String name)
Create a RecordTypeInfo object representing a record with the given name |
Method Summary | |
---|---|
void |
addField(java.lang.String fieldName,
TypeID tid)
Add a field. |
int |
compareTo(java.lang.Object peer_)
This class doesn't implement Comparable as it's not meant to be used for anything besides de/serializing. |
void |
deserialize(RecordInput rin,
java.lang.String tag)
Deserialize the type information for a record |
java.util.Collection<FieldTypeInfo> |
getFieldTypeInfos()
Return a collection of field type infos |
java.lang.String |
getName()
return the name of the record |
RecordTypeInfo |
getNestedStructTypeInfo(java.lang.String name)
Return the type info of a nested record. |
void |
serialize(RecordOutput rout,
java.lang.String tag)
Serialize the type information for a record |
void |
setName(java.lang.String name)
set the name of the record |
Methods inherited from class org.apache.hadoop.record.Record |
---|
deserialize, readFields, serialize, toString, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RecordTypeInfo()
public RecordTypeInfo(java.lang.String name)
name
- Name of the recordMethod Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public void addField(java.lang.String fieldName, TypeID tid)
fieldName
- Name of the fieldtid
- Type ID of the fieldpublic java.util.Collection<FieldTypeInfo> getFieldTypeInfos()
public RecordTypeInfo getNestedStructTypeInfo(java.lang.String name)
name
- Name of the nested recordpublic void serialize(RecordOutput rout, java.lang.String tag) throws java.io.IOException
serialize
in class Record
rout
- Record output destinationtag
- record tag (Used only in tagged serialization e.g. XML)
java.io.IOException
public void deserialize(RecordInput rin, java.lang.String tag) throws java.io.IOException
deserialize
in class Record
rin
- Record input sourcetag
- Record tag (Used only in tagged serialization e.g. XML)
java.io.IOException
public int compareTo(java.lang.Object peer_) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
compareTo
in class Record
java.lang.ClassCastException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |