|
||||||||||
| 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(String name)
Create a RecordTypeInfo object representing a record with the given name |
|
| Method Summary | |
|---|---|
void |
addField(String fieldName,
TypeID tid)
Add a field. |
int |
compareTo(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,
String tag)
Deserialize the type information for a record |
Collection<FieldTypeInfo> |
getFieldTypeInfos()
Return a collection of field type infos |
String |
getName()
return the name of the record |
RecordTypeInfo |
getNestedStructTypeInfo(String name)
Return the type info of a nested record. |
void |
serialize(RecordOutput rout,
String tag)
Serialize the type information for a record |
void |
setName(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(String name)
name - Name of the record| Method Detail |
|---|
public String getName()
public void setName(String name)
public void addField(String fieldName,
TypeID tid)
fieldName - Name of the fieldtid - Type ID of the fieldpublic Collection<FieldTypeInfo> getFieldTypeInfos()
public RecordTypeInfo getNestedStructTypeInfo(String name)
name - Name of the nested record
public void serialize(RecordOutput rout,
String tag)
throws IOException
serialize in class Recordrout - Record output destinationtag - record tag (Used only in tagged serialization e.g. XML)
IOException
public void deserialize(RecordInput rin,
String tag)
throws IOException
deserialize in class Recordrin - Record input sourcetag - Record tag (Used only in tagged serialization e.g. XML)
IOException
public int compareTo(Object peer_)
throws ClassCastException
compareTo in interface ComparablecompareTo in class RecordClassCastException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||