@KFStep(name="Appender", category="Flow", toolTipText="Append multiple sets of instances", iconPath="weka/gui/knowledgeflow/icons/Appender.png") public class Appender extends BaseStep
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<Step,Instances> |
m_completed
Used to keep track of how many upstream steps have sent us complete data
sets (batch) or headers (incremental) so far.
|
protected Instances |
m_completeHeader
Used to hold the final header in the case of incremental operation
|
protected java.util.Map<Step,java.io.File> |
m_incrementalFiles
Holds a files in play for incremental incoming connections
|
protected java.util.Map<Step,java.io.ObjectOutputStream> |
m_incrementalSavers
Holds savers used for incrementally saving incoming instance streams.
|
protected boolean |
m_isReset
True if this step has been reset
|
protected java.util.concurrent.atomic.AtomicInteger |
m_streamingCountDown
Gets decremented for each incoming instance stream that has finished
|
protected Data |
m_streamingData
Re-usable data object for streaming mode
|
protected java.util.Map<Step,java.io.File> |
m_tempBatchFiles
Handles on temp files used to store batches of instances in batch mode
|
m_stepIsResourceIntensive, m_stepManager, m_stepName| Constructor and Description |
|---|
Appender() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get the incoming connection types accepted by this step at this time
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce at this
time
|
protected Instances |
makeOutputHeader()
Create the structure of the output
|
protected Instances |
makeOutputHeader(java.util.Collection<Instances> headers)
Create the structure of the output given a collection of input structures
|
Instances |
outputStructureForConnectionType(java.lang.String connectionName)
If possible, get the output structure for the named connection type as a
header-only set of instances.
|
protected void |
processBatch(Data data)
Process batch data
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
protected void |
processStreaming(Data data)
Process streaming data
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stopprotected java.util.Map<Step,Instances> m_completed
protected java.util.Map<Step,java.io.File> m_tempBatchFiles
protected Instances m_completeHeader
protected java.util.concurrent.atomic.AtomicInteger m_streamingCountDown
protected transient java.util.Map<Step,java.io.ObjectOutputStream> m_incrementalSavers
protected transient java.util.Map<Step,java.io.File> m_incrementalFiles
protected Data m_streamingData
protected boolean m_isReset
public void stepInit()
throws WekaException
WekaException - if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the data to processWekaException - if a problem occursprotected void processBatch(Data data) throws WekaException
data - the data to processWekaException - if a problem occursprotected void processStreaming(Data data) throws WekaException
data - the data to processWekaException - if a problem occursprotected Instances makeOutputHeader() throws WekaException
WekaException - if a problem occursprotected Instances makeOutputHeader(java.util.Collection<Instances> headers) throws WekaException
headers - a collection of incoming instance structuresWekaException - if a problem occurspublic Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType in interface StepoutputStructureForConnectionType in class BaseStepconnectionName - the name of the connection to get the output structure forWekaException - if a problem occurs