Class SequenceFile.Metadata

java.lang.Object
org.apache.hadoop.io.SequenceFile.Metadata
All Implemented Interfaces:
Writable
Enclosing class:
SequenceFile

public static class SequenceFile.Metadata extends Object implements Writable
The class encapsulating with the metadata of a file. The metadata of a file is a list of attribute name/value pairs of Text type.
  • Constructor Details

    • Metadata

      public Metadata()
    • Metadata

      public Metadata(TreeMap<Text,Text> arg)
  • Method Details

    • get

      public Text get(Text name)
    • set

      public void set(Text name, Text value)
    • getMetadata

      public TreeMap<Text,Text> getMetadata()
    • write

      public void write(DataOutput out) throws IOException
      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 in) throws IOException
      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:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(SequenceFile.Metadata other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object