|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.scheme.Scheme<Config,Input,Output,Void,Void> cascading.tap.partition.BasePartitionTap.PartitionScheme<Config,Input,Output>
public static class BasePartitionTap.PartitionScheme<Config,Input,Output>
Constructor Summary | |
---|---|
BasePartitionTap.PartitionScheme(Scheme scheme)
|
|
BasePartitionTap.PartitionScheme(Scheme scheme,
Fields partitionFields)
|
Method Summary | |
---|---|
int |
getNumSinkParts()
Method getNumSinkParts returns the numSinkParts of this Scheme object. |
Fields |
getSinkFields()
Method getSinkFields returns the sinkFields of this Scheme object. |
Fields |
getSourceFields()
Method getSourceFields returns the sourceFields of this Scheme object. |
void |
setNumSinkParts(int numSinkParts)
Method setNumSinkParts sets the numSinkParts of this Scheme object. |
void |
setSinkFields(Fields sinkFields)
Method setSinkFields sets the sinkFields of this Scheme object. |
void |
setSourceFields(Fields sourceFields)
Method setSourceFields sets the sourceFields of this Scheme object. |
void |
sink(FlowProcess<Config> flowProcess,
SinkCall<Void,Output> sinkCall)
Method sink writes out the given Tuple found on SinkCall.getOutgoingEntry() to
the SinkCall.getOutput() . |
void |
sinkCleanup(FlowProcess<Config> flowProcess,
SinkCall<Void,Output> sinkCall)
Method sinkCleanup is used to destroy resources created by Scheme.sinkPrepare(cascading.flow.FlowProcess, SinkCall) . |
void |
sinkConfInit(FlowProcess<Config> flowProcess,
Tap<Config,Input,Output> tap,
Config conf)
Method sinkInit initializes this instance as a sink. |
void |
sinkPrepare(FlowProcess<Config> flowProcess,
SinkCall<Void,Output> sinkCall)
Method sinkPrepare is used to initialize resources needed during each call of Scheme.sink(cascading.flow.FlowProcess, SinkCall) . |
boolean |
source(FlowProcess<Config> flowProcess,
SourceCall<Void,Input> sourceCall)
Method source will read a new "record" or value from SourceCall.getInput() and populate
the available Tuple via SourceCall.getIncomingEntry() and return true
on success or false if no more values available. |
void |
sourceCleanup(FlowProcess<Config> flowProcess,
SourceCall<Void,Input> sourceCall)
Method sourceCleanup is used to destroy resources created by Scheme.sourcePrepare(cascading.flow.FlowProcess, SourceCall) . |
void |
sourceConfInit(FlowProcess<Config> flowProcess,
Tap<Config,Input,Output> tap,
Config conf)
Method sourceInit initializes this instance as a source. |
void |
sourcePrepare(FlowProcess<Config> flowProcess,
SourceCall<Void,Input> sourceCall)
Method sourcePrepare is used to initialize resources needed during each call of Scheme.source(cascading.flow.FlowProcess, SourceCall) . |
Methods inherited from class cascading.scheme.Scheme |
---|
equals, getTrace, hashCode, isSink, isSource, isSymmetrical, presentSinkFields, presentSinkFieldsInternal, presentSourceFields, presentSourceFieldsInternal, retrieveSinkFields, retrieveSourceFields, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasePartitionTap.PartitionScheme(Scheme scheme)
public BasePartitionTap.PartitionScheme(Scheme scheme, Fields partitionFields)
Method Detail |
---|
public Fields getSinkFields()
Scheme
getSinkFields
in class Scheme<Config,Input,Output,Void,Void>
public void setSinkFields(Fields sinkFields)
Scheme
setSinkFields
in class Scheme<Config,Input,Output,Void,Void>
sinkFields
- the sinkFields of this Scheme object.public Fields getSourceFields()
Scheme
getSourceFields
in class Scheme<Config,Input,Output,Void,Void>
public void setSourceFields(Fields sourceFields)
Scheme
setSourceFields
in class Scheme<Config,Input,Output,Void,Void>
sourceFields
- the sourceFields of this Scheme object.public int getNumSinkParts()
Scheme
getNumSinkParts
in class Scheme<Config,Input,Output,Void,Void>
public void setNumSinkParts(int numSinkParts)
Scheme
setNumSinkParts
in class Scheme<Config,Input,Output,Void,Void>
numSinkParts
- the numSinkParts of this Scheme object.public void sourceConfInit(FlowProcess<Config> flowProcess, Tap<Config,Input,Output> tap, Config conf)
Scheme
Scheme.sourcePrepare(cascading.flow.FlowProcess, SourceCall)
if resources much be initialized
before use. And Scheme.sourceCleanup(cascading.flow.FlowProcess, SourceCall)
if resources must be
destroyed after use.
sourceConfInit
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesstap
- of type Tapconf
- of type Configpublic void sourcePrepare(FlowProcess<Config> flowProcess, SourceCall<Void,Input> sourceCall) throws IOException
Scheme
Scheme.source(cascading.flow.FlowProcess, SourceCall)
.
Be sure to place any initialized objects in the SourceContext
so each instance
will remain threadsafe.
sourcePrepare
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesssourceCall
- of type SourceCallIOException
public boolean source(FlowProcess<Config> flowProcess, SourceCall<Void,Input> sourceCall) throws IOException
Scheme
SourceCall.getInput()
and populate
the available Tuple
via SourceCall.getIncomingEntry()
and return true
on success or false
if no more values available.
It's ok to set a new Tuple instance on the incomingEntry
TupleEntry
, or
to simply re-use the existing instance.
Note this is only time it is safe to modify a Tuple instance handed over via a method call.
This method may optionally throw a TapException
if it cannot process a particular
instance of data. If the payload Tuple is set on the TapException, that Tuple will be written to
any applicable failure trap Tap.
source
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesssourceCall
- of SourceCall
true
when a Tuple was successfully read
IOException
public void sourceCleanup(FlowProcess<Config> flowProcess, SourceCall<Void,Input> sourceCall) throws IOException
Scheme
Scheme.sourcePrepare(cascading.flow.FlowProcess, SourceCall)
.
sourceCleanup
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of ProcesssourceCall
- of type SourceCallIOException
public void sinkConfInit(FlowProcess<Config> flowProcess, Tap<Config,Input,Output> tap, Config conf)
Scheme
Scheme.sinkPrepare(cascading.flow.FlowProcess, SinkCall)
if resources much be initialized
before use. And Scheme.sinkCleanup(cascading.flow.FlowProcess, SinkCall)
if resources must be
destroyed after use.
sinkConfInit
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesstap
- of type Tapconf
- of type Configpublic void sinkPrepare(FlowProcess<Config> flowProcess, SinkCall<Void,Output> sinkCall) throws IOException
Scheme
Scheme.sink(cascading.flow.FlowProcess, SinkCall)
.
Be sure to place any initialized objects in the SinkContext
so each instance
will remain threadsafe.
sinkPrepare
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesssinkCall
- of type SinkCallIOException
public void sink(FlowProcess<Config> flowProcess, SinkCall<Void,Output> sinkCall) throws IOException
Scheme
Tuple
found on SinkCall.getOutgoingEntry()
to
the SinkCall.getOutput()
.
This method may optionally throw a TapException
if it cannot process a particular
instance of data. If the payload Tuple is set on the TapException, that Tuple will be written to
any applicable failure trap Tap. If not set, the incoming Tuple will be written instead.
sink
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of ProcesssinkCall
- of SinkCall
IOException
public void sinkCleanup(FlowProcess<Config> flowProcess, SinkCall<Void,Output> sinkCall) throws IOException
Scheme
Scheme.sinkPrepare(cascading.flow.FlowProcess, SinkCall)
.
sinkCleanup
in class Scheme<Config,Input,Output,Void,Void>
flowProcess
- of type FlowProcesssinkCall
- of type SinkCallIOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |