|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.scheme.Scheme cascading.scheme.SequenceFile cascading.scheme.WritableSequenceFile
public class WritableSequenceFile
Class WritableSequenceFile is a sub-class of SequenceFile
that reads and writes values of the given
writableType
Class
, instead of Tuple
instances used by default in SequenceFile.
NullWritable
is used as the empty type for either a null keyType or valueType.
Field Summary | |
---|---|
protected Class<? extends Writable> |
keyType
|
protected Class<? extends Writable> |
valueType
|
Constructor Summary | |
---|---|
WritableSequenceFile(Fields fields,
Class<? extends Writable> valueType)
Constructor WritableSequenceFile creates a new WritableSequenceFile instance. |
|
WritableSequenceFile(Fields fields,
Class<? extends Writable> keyType,
Class<? extends Writable> valueType)
Constructor WritableSequenceFile creates a new WritableSequenceFile instance. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
int |
hashCode()
|
void |
sink(TupleEntry tupleEntry,
OutputCollector outputCollector)
Method sink writes out the given Tuple instance to the outputCollector. |
void |
sinkInit(Tap tap,
JobConf conf)
Method sinkInit initializes this instance as a sink. |
Tuple |
source(Object key,
Object value)
Method source takes the given Hadoop key and value and returns a new Tuple instance. |
Methods inherited from class cascading.scheme.SequenceFile |
---|
sourceInit |
Methods inherited from class cascading.scheme.Scheme |
---|
getNumSinkParts, getSinkFields, getSourceFields, getTrace, isSink, isSource, isSymmetrical, isWriteDirect, setNumSinkParts, setSinkFields, setSourceFields, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Class<? extends Writable> keyType
protected Class<? extends Writable> valueType
Constructor Detail |
---|
@ConstructorProperties(value={"fields","valueType"}) public WritableSequenceFile(Fields fields, Class<? extends Writable> valueType)
fields
- of type FieldsvalueType
- of type Class extends Writable>, may not be null@ConstructorProperties(value={"fields","keyType","valueType"}) public WritableSequenceFile(Fields fields, Class<? extends Writable> keyType, Class<? extends Writable> valueType)
fields
- of type FieldskeyType
- of type Class extends Writable>valueType
- of type Class extends Writable>Method Detail |
---|
public void sinkInit(Tap tap, JobConf conf)
Scheme
sinkInit
in class SequenceFile
tap
- of type Tapconf
- of type JobConfpublic Tuple source(Object key, Object value)
Scheme
Tuple
instance.
source
in class SequenceFile
key
- of type WritableComparablevalue
- of type Writable
public void sink(TupleEntry tupleEntry, OutputCollector outputCollector) throws IOException
Scheme
Tuple
instance to the outputCollector.
sink
in class SequenceFile
outputCollector
- of type OutputCollector @throws IOException when
IOException
public boolean equals(Object object)
equals
in class Scheme
public int hashCode()
hashCode
in class Scheme
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |