public class WritableSequenceFile extends SequenceFile
SequenceFile that reads and writes values of the given
writableType Class, instead of Tuple instances used by default in SequenceFile.
This Class is a convenience for those who need to read/write specific types from existing sequence files without them being wrapped in a Tuple instance.
Note due to the nature of sequence files, only one type can be stored in the key and value positions, they they can be uniquely different types (LongWritable, Text).
If keyType is null, valueType must not be null, and vice versa, assuming you only wish to store a single value.
NullWritable is used as the empty type for either a null keyType or valueType.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<? extends Writable> |
keyType |
protected java.lang.Class<? extends Writable> |
valueType |
| Constructor and Description |
|---|
WritableSequenceFile(cascading.tuple.Fields fields,
java.lang.Class<? extends Writable> valueType)
Constructor WritableSequenceFile creates a new WritableSequenceFile instance.
|
WritableSequenceFile(cascading.tuple.Fields fields,
java.lang.Class<? extends Writable> keyType,
java.lang.Class<? extends Writable> valueType)
Constructor WritableSequenceFile creates a new WritableSequenceFile instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
int |
hashCode() |
void |
sink(cascading.flow.FlowProcess<? extends Configuration> flowProcess,
cascading.scheme.SinkCall<java.lang.Void,OutputCollector> sinkCall) |
void |
sinkConfInit(cascading.flow.FlowProcess<? extends Configuration> flowProcess,
cascading.tap.Tap<Configuration,RecordReader,OutputCollector> tap,
Configuration conf) |
boolean |
source(cascading.flow.FlowProcess<? extends Configuration> flowProcess,
cascading.scheme.SourceCall<java.lang.Object[],RecordReader> sourceCall) |
getExtension, sourceCleanup, sourceConfInit, sourcePreparegetNumSinkParts, getSinkFields, getSourceFields, getTrace, isSink, isSource, isSymmetrical, presentSinkFields, presentSinkFieldsInternal, presentSourceFields, presentSourceFieldsInternal, retrieveSinkFields, retrieveSourceFields, setNumSinkParts, setSinkFields, setSourceFields, sinkCleanup, sinkPrepare, sinkWrap, sourceRePrepare, sourceWrap, toStringprotected final java.lang.Class<? extends Writable> keyType
protected final java.lang.Class<? extends Writable> valueType
@ConstructorProperties(value={"fields","valueType"})
public WritableSequenceFile(cascading.tuple.Fields fields,
java.lang.Class<? extends Writable> valueType)
fields - of type FieldsvalueType - of type Class, may not be null@ConstructorProperties(value={"fields","keyType","valueType"})
public WritableSequenceFile(cascading.tuple.Fields fields,
java.lang.Class<? extends Writable> keyType,
java.lang.Class<? extends Writable> valueType)
fields - of type FieldskeyType - of type ClassvalueType - of type Classpublic void sinkConfInit(cascading.flow.FlowProcess<? extends Configuration> flowProcess, cascading.tap.Tap<Configuration,RecordReader,OutputCollector> tap, Configuration conf)
sinkConfInit in class SequenceFilepublic boolean source(cascading.flow.FlowProcess<? extends Configuration> flowProcess, cascading.scheme.SourceCall<java.lang.Object[],RecordReader> sourceCall) throws java.io.IOException
source in class SequenceFilejava.io.IOExceptionpublic void sink(cascading.flow.FlowProcess<? extends Configuration> flowProcess, cascading.scheme.SinkCall<java.lang.Void,OutputCollector> sinkCall) throws java.io.IOException
sink in class SequenceFilejava.io.IOExceptionpublic boolean equals(java.lang.Object object)
equals in class cascading.scheme.Scheme<Configuration,RecordReader,OutputCollector,java.lang.Object[],java.lang.Void>public int hashCode()
hashCode in class cascading.scheme.Scheme<Configuration,RecordReader,OutputCollector,java.lang.Object[],java.lang.Void>Copyright © 2007-2021 Cascading Maintainers. All Rights Reserved.