public class SequenceFile.Sorter.SegmentDescriptor extends Object implements Comparable
| Constructor and Description |
|---|
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() |
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 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)
preserve - input boolean preserve.public boolean shouldPreserveInput()
public int compareTo(Object o)
compareTo in interface Comparablepublic boolean nextRawKey()
throws IOException
IOException - raised on errors performing I/O.public int nextRawValue(SequenceFile.ValueBytes rawValue) throws IOException
rawValue - input ValueBytes rawValue.IOException - raised on errors performing I/O.public org.apache.hadoop.io.DataOutputBuffer getKey()
public void cleanup()
throws IOException
IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.