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 Comparable
public boolean nextRawKey() throws IOException
IOException
public int nextRawValue(SequenceFile.ValueBytes rawValue) throws IOException
rawValue
- IOException
public org.apache.hadoop.io.DataOutputBuffer getKey()
public void cleanup() throws IOException
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.