Class Record

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

@Deprecated @Public @Stable public abstract class Record extends Object implements WritableComparable, Cloneable
Deprecated.
Replaced by Avro.
Abstract class that is extended by generated classes.
  • Constructor Details

    • Record

      public Record()
      Deprecated.
  • Method Details

    • serialize

      public abstract void serialize(RecordOutput rout, String tag) throws IOException
      Deprecated.
      Serialize a record with tag (ususally field name)
      Parameters:
      rout - Record output destination
      tag - record tag (Used only in tagged serialization e.g. XML)
      Throws:
      IOException
    • deserialize

      public abstract void deserialize(RecordInput rin, String tag) throws IOException
      Deprecated.
      Deserialize a record with a tag (usually field name)
      Parameters:
      rin - Record input source
      tag - Record tag (Used only in tagged serialization e.g. XML)
      Throws:
      IOException
    • compareTo

      public abstract int compareTo(Object peer) throws ClassCastException
      Deprecated.
      Specified by:
      compareTo in interface Comparable
      Throws:
      ClassCastException
    • serialize

      public void serialize(RecordOutput rout) throws IOException
      Deprecated.
      Serialize a record without a tag
      Parameters:
      rout - Record output destination
      Throws:
      IOException
    • deserialize

      public void deserialize(RecordInput rin) throws IOException
      Deprecated.
      Deserialize a record without a tag
      Parameters:
      rin - Record input source
      Throws:
      IOException
    • write

      public void write(DataOutput out) throws IOException
      Deprecated.
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException - any other problem for write.
    • readFields

      public void readFields(DataInput din) throws IOException
      Deprecated.
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      Parameters:
      din - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object