org.apache.hadoop.record.meta
Class RecordTypeInfo

java.lang.Object
  extended by org.apache.hadoop.record.Record
      extended by org.apache.hadoop.record.meta.RecordTypeInfo
All Implemented Interfaces:
Cloneable, Comparable, Writable, WritableComparable

Deprecated. Replaced by Avro.

@Deprecated
@InterfaceAudience.Public
@InterfaceStability.Stable
public class RecordTypeInfo
extends Record

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()
          Deprecated. Create an empty RecordTypeInfo object.
RecordTypeInfo(String name)
          Deprecated. Create a RecordTypeInfo object representing a record with the given name
 
Method Summary
 void addField(String fieldName, TypeID tid)
          Deprecated. Add a field.
 int compareTo(Object peer_)
          Deprecated. 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)
          Deprecated. Deserialize the type information for a record
 Collection<FieldTypeInfo> getFieldTypeInfos()
          Deprecated. Return a collection of field type infos
 String getName()
          Deprecated. return the name of the record
 RecordTypeInfo getNestedStructTypeInfo(String name)
          Deprecated. Return the type info of a nested record.
 void serialize(RecordOutput rout, String tag)
          Deprecated. Serialize the type information for a record
 void setName(String name)
          Deprecated. 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

RecordTypeInfo

public RecordTypeInfo()
Deprecated. 
Create an empty RecordTypeInfo object.


RecordTypeInfo

public RecordTypeInfo(String name)
Deprecated. 
Create a RecordTypeInfo object representing a record with the given name

Parameters:
name - Name of the record
Method Detail

getName

public String getName()
Deprecated. 
return the name of the record


setName

public void setName(String name)
Deprecated. 
set the name of the record


addField

public void addField(String fieldName,
                     TypeID tid)
Deprecated. 
Add a field.

Parameters:
fieldName - Name of the field
tid - Type ID of the field

getFieldTypeInfos

public Collection<FieldTypeInfo> getFieldTypeInfos()
Deprecated. 
Return a collection of field type infos


getNestedStructTypeInfo

public RecordTypeInfo getNestedStructTypeInfo(String name)
Deprecated. 
Return the type info of a nested record. We only consider nesting to one level.

Parameters:
name - Name of the nested record

serialize

public void serialize(RecordOutput rout,
                      String tag)
               throws IOException
Deprecated. 
Serialize the type information for a record

Specified by:
serialize in class Record
Parameters:
rout - Record output destination
tag - record tag (Used only in tagged serialization e.g. XML)
Throws:
IOException

deserialize

public void deserialize(RecordInput rin,
                        String tag)
                 throws IOException
Deprecated. 
Deserialize the type information for a record

Specified by:
deserialize in class Record
Parameters:
rin - Record input source
tag - Record tag (Used only in tagged serialization e.g. XML)
Throws:
IOException

compareTo

public int compareTo(Object peer_)
              throws ClassCastException
Deprecated. 
This class doesn't implement Comparable as it's not meant to be used for anything besides de/serializing. So we always throw an exception. Not implemented. Always returns 0 if another RecordTypeInfo is passed in.

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in class Record
Throws:
ClassCastException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.