public class SequenceFile.Sorter.SegmentDescriptor extends Object implements Comparable
| Constructor and Description |
|---|
SequenceFile.Sorter.SegmentDescriptor(long segmentOffset,
long segmentLength,
Path segmentPathName)
Constructs a segment
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
The default cleanup.
|
int |
compareTo(Object o) |
void |
doSync()
Do the sync checks
|
boolean |
equals(Object o) |
org.apache.hadoop.io.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() |
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 segmentpublic void doSync()
public void preserveInput(boolean preserve)
public boolean shouldPreserveInput()
public int compareTo(Object o)
compareTo in interface Comparablepublic boolean nextRawKey()
throws IOException
IOExceptionpublic int nextRawValue(SequenceFile.ValueBytes rawValue) throws IOException
rawValue - IOExceptionpublic org.apache.hadoop.io.DataOutputBuffer getKey()
public void cleanup()
throws IOException
IOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.