Class DirEntry
java.lang.Object
org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.DirEntry
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DirEntryA directory entry.static DirEntrydirEntry(Path dest, org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatus type, int level) A directory entry.booleangetDir()intgetLevel()org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatusintgetType()inthashCode()voidreadFields(DataInput in) Deserialize the fields of this object fromin.voidvoidsetLevel(int level) voidsetStatus(org.apache.hadoop.mapreduce.lib.output.committer.manifest.files.EntryStatus status) voidsetType(int type) toString()voidvalidate()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
DirEntry
Construct an entry.- Parameters:
dir- destination path.type- type of dest entrylevel- Level in the treewalk.
-
DirEntry
Construct an entry.- Parameters:
dir- destination path.type- type of dest entrylevel- Level in the treewalk.
-
-
Method Details
-
setDir
-
getDir
-
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
- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode() -
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
dirEntry
A directory entry.- Parameters:
dest- destination path.type- typelevel- 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- typelevel- Level in the treewalk.- Returns:
- an entry
-