cascading.tuple
Class TupleEntrySchemeCollector<Config,Output>
java.lang.Object
cascading.tuple.TupleEntryCollector
cascading.tuple.TupleEntrySchemeCollector<Config,Output>
- Direct Known Subclasses:
- HadoopTupleEntrySchemeCollector
public class TupleEntrySchemeCollector<Config,Output>
- extends TupleEntryCollector
Class TupleEntrySchemeCollector is a helper class for wrapping a Scheme
instance, calling
Scheme.sink(cascading.flow.FlowProcess, cascading.scheme.SinkCall)
on every call to add(TupleEntry)
or add(Tuple)
.
Use this class inside a custom Tap
when overriding the
Tap.openForWrite(cascading.flow.FlowProcess)
method.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sinkCall
protected final ConcreteCall<java.lang.Object,Output> sinkCall
TupleEntrySchemeCollector
public TupleEntrySchemeCollector(FlowProcess<Config> flowProcess,
Scheme scheme)
TupleEntrySchemeCollector
public TupleEntrySchemeCollector(FlowProcess<Config> flowProcess,
Scheme scheme,
java.lang.String identifier)
TupleEntrySchemeCollector
public TupleEntrySchemeCollector(FlowProcess<Config> flowProcess,
Scheme scheme,
Output output)
TupleEntrySchemeCollector
public TupleEntrySchemeCollector(FlowProcess<Config> flowProcess,
Scheme scheme,
Output output,
java.lang.String identifier)
getFlowProcess
protected FlowProcess<Config> getFlowProcess()
setFields
public void setFields(Fields declared)
- Overrides:
setFields
in class TupleEntryCollector
getOutput
protected Output getOutput()
setOutput
protected void setOutput(Output output)
wrapOutput
protected Output wrapOutput(Output output)
prepare
protected void prepare()
- Need to defer preparing the scheme till after the fields have been resolved
add
public void add(TupleEntry tupleEntry)
- Description copied from class:
TupleEntryCollector
- Method add inserts the given
TupleEntry
into the outgoing stream. Note the method TupleEntryCollector.add(Tuple)
is
more efficient as it simply calls TupleEntry.getTuple()
;
- Overrides:
add
in class TupleEntryCollector
- Parameters:
tupleEntry
- of type TupleEntry
add
public void add(Tuple tuple)
- Description copied from class:
TupleEntryCollector
- Method add inserts the given
Tuple
into the outgoing stream.
- Overrides:
add
in class TupleEntryCollector
- Parameters:
tuple
- of type Tuple
collect
protected void collect(TupleEntry tupleEntry)
throws java.io.IOException
- Specified by:
collect
in class TupleEntryCollector
- Throws:
java.io.IOException
close
public void close()
- Description copied from class:
TupleEntryCollector
- Method close closes the underlying resource being written to. This method should be called when no more
Tuple
instances will be written out.
- Overrides:
close
in class TupleEntryCollector
Copyright © 2007-2011 Concurrent, Inc. All Rights Reserved.