|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.tap.Tap<Config,Void,Output>
cascading.tap.SinkTap<Config,Output>
public abstract class SinkTap<Config,Output>
Class SinkTap is an optional base class for sink only Taps.
SomeTap
instances may only be sinks (as opposed
to being a source). These types may subclass SinkTap for convenience or
set isSource()
to false
in a custom Tap sub-class.
Constructor Summary | |
---|---|
protected |
SinkTap()
|
protected |
SinkTap(Scheme<Config,?,Output,?,?> scheme)
|
protected |
SinkTap(Scheme<Config,?,Output,?,?> scheme,
SinkMode sinkMode)
|
Method Summary | |
---|---|
Fields |
getSourceFields()
Method getSourceFields returns the sourceFields of this Tap object. |
boolean |
isSource()
Method isSource returns true if this Tap instance can be used as a source. |
TupleEntryIterator |
openForRead(FlowProcess<Config> flowProcess,
Void input)
Method openForRead opens the resource represented by this Tap instance for reading. |
void |
sourceConfInit(FlowProcess<Config> flowProcess,
Config conf)
Method sourceConfInit initializes this instance as a source. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected SinkTap()
protected SinkTap(Scheme<Config,?,Output,?,?> scheme)
protected SinkTap(Scheme<Config,?,Output,?,?> scheme, SinkMode sinkMode)
Method Detail |
---|
public Fields getSourceFields()
Tap
getSourceFields
in class Tap<Config,Void,Output>
public boolean isSource()
Tap
isSource
in class Tap<Config,Void,Output>
public void sourceConfInit(FlowProcess<Config> flowProcess, Config conf)
Tap
Flow
instance or if it participates in multiple times in a given Flow or across different Flows in
a Cascade
.
In the context of a Flow, it will be called after
FlowListener.onStarting(cascading.flow.Flow)
Note that no resources or services should be modified by this method.
sourceConfInit
in class Tap<Config,Void,Output>
flowProcess
- of type FlowProcessconf
- of type Configpublic TupleEntryIterator openForRead(FlowProcess<Config> flowProcess, Void input) throws IOException
Tap
input
value may be null, if so, sub-classes must inquire with the underlying Scheme
via Scheme.sourceConfInit(cascading.flow.FlowProcess, Tap, Object)
to get the proper
input type and instantiate it before calling super.openForRead()
.
Note the returned iterator will return the same instance of TupleEntry
on every call,
thus a copy must be made of either the TupleEntry or the underlying Tuple
instance if they are to be
stored in a Collection.
openForRead
in class Tap<Config,Void,Output>
flowProcess
- of type FlowProcessinput
- of type Input
IOException
- when the resource cannot be opened
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |