|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.SequenceFile.Sorter.SegmentDescriptor
public class SequenceFile.Sorter.SegmentDescriptor
This class defines a merge segment. This class can be subclassed to provide a customized cleanup method implementation. In this implementation, cleanup closes the file handle and deletes the file
Constructor Summary | |
---|---|
SequenceFile.Sorter.SegmentDescriptor(long segmentOffset,
long segmentLength,
Path segmentPathName)
Constructs a segment |
Method Summary | |
---|---|
void |
cleanup()
The default cleanup. |
int |
compareTo(Object o)
|
void |
doSync()
Do the sync checks |
boolean |
equals(Object o)
|
DataOutputBuffer |
getKey()
Returns the stored rawKey |
int |
hashCode()
|
boolean |
nextRawKey()
Fills up the rawKey object with the key returned by the Reader |
int |
nextRawValue(SequenceFile.ValueBytes rawValue)
Fills up the passed rawValue with the value corresponding to the key read earlier |
void |
preserveInput(boolean preserve)
Whether to delete the files when no longer needed |
boolean |
shouldPreserveInput()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceFile.Sorter.SegmentDescriptor(long segmentOffset, long segmentLength, Path segmentPathName)
segmentOffset
- the offset of the segment in the filesegmentLength
- the length of the segmentsegmentPathName
- the path name of the file containing the segmentMethod Detail |
---|
public void doSync()
public void preserveInput(boolean preserve)
public boolean shouldPreserveInput()
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean nextRawKey() throws IOException
IOException
public int nextRawValue(SequenceFile.ValueBytes rawValue) throws IOException
rawValue
-
IOException
public DataOutputBuffer getKey()
public void cleanup() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |