java.lang.Object
org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.DirEntry
All Implemented Interfaces:
Serializable, Writable

@Public @Unstable public final class DirEntry extends Object implements Serializable, Writable
A directory entry in the task manifest. Uses shorter field names for smaller files. Hash and equals are on dir name only. Can be serialized as a java object, json object or hadoop writable.
See Also:
  • Constructor Details

    • DirEntry

      public DirEntry(String dir, int type, int level)
      Construct an entry.
      Parameters:
      dir - destination path.
      type - type of dest entry
      level - Level in the treewalk.
    • DirEntry

      public DirEntry(Path dir, int type, int level)
      Construct an entry.
      Parameters:
      dir - destination path.
      type - type of dest entry
      level - Level in the treewalk.
  • Method Details

    • setDir

      public void setDir(String dir)
    • getDir

      public String getDir()
    • getDestPath

      public Path getDestPath()
    • getType

      public int getType()
    • setType

      public void setType(int type)
    • setLevel

      public void setLevel(int level)
    • getLevel

      public int getLevel()
    • getStatus

      public org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatus getStatus()
    • setStatus

      public void setStatus(org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatus status)
    • validate

      public void validate() throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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.
    • dirEntry

      public static DirEntry dirEntry(Path dest, int type, int level)
      A directory entry.
      Parameters:
      dest - destination path.
      type - type
      level - Level in the treewalk.
      Returns:
      an entry
    • dirEntry

      public static DirEntry dirEntry(Path dest, org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatus type, int level)
      A directory entry.
      Parameters:
      dest - destination path.
      type - type
      level - Level in the treewalk.
      Returns:
      an entry