public interface StepManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CON_AUX_DATA_BATCH_ASSOCIATION_RULES |
static java.lang.String |
CON_AUX_DATA_CHART_DATA_POINT |
static java.lang.String |
CON_AUX_DATA_CHART_LEGEND |
static java.lang.String |
CON_AUX_DATA_CHART_MAX |
static java.lang.String |
CON_AUX_DATA_CHART_MIN |
static java.lang.String |
CON_AUX_DATA_CLASS_ATTRIBUTE |
static java.lang.String |
CON_AUX_DATA_ENVIRONMENT_PROPERTIES |
static java.lang.String |
CON_AUX_DATA_ENVIRONMENT_RESULTS |
static java.lang.String |
CON_AUX_DATA_ENVIRONMENT_VARIABLES |
static java.lang.String |
CON_AUX_DATA_GRAPH_TITLE |
static java.lang.String |
CON_AUX_DATA_GRAPH_TYPE |
static java.lang.String |
CON_AUX_DATA_INCREMENTAL_STREAM_END |
static java.lang.String |
CON_AUX_DATA_INSTANCE |
static java.lang.String |
CON_AUX_DATA_IS_INCREMENTAL |
static java.lang.String |
CON_AUX_DATA_LABEL |
static java.lang.String |
CON_AUX_DATA_MAX_SET_NUM |
static java.lang.String |
CON_AUX_DATA_PRIMARY_PAYLOAD_NOT_THREAD_SAFE |
static java.lang.String |
CON_AUX_DATA_SET_NUM |
static java.lang.String |
CON_AUX_DATA_TEST_INSTANCE |
static java.lang.String |
CON_AUX_DATA_TESTSET |
static java.lang.String |
CON_AUX_DATA_TEXT_TITLE |
static java.lang.String |
CON_AUX_DATA_TRAININGSET |
static java.lang.String |
CON_BATCH_ASSOCIATOR |
static java.lang.String |
CON_BATCH_CLASSIFIER |
static java.lang.String |
CON_BATCH_CLUSTERER |
static java.lang.String |
CON_CHART |
static java.lang.String |
CON_DATASET |
static java.lang.String |
CON_ENVIRONMENT |
static java.lang.String |
CON_GRAPH |
static java.lang.String |
CON_IMAGE |
static java.lang.String |
CON_INCREMENTAL_CLASSIFIER |
static java.lang.String |
CON_INCREMENTAL_CLUSTERER |
static java.lang.String |
CON_INFO |
static java.lang.String |
CON_INSTANCE |
static java.lang.String |
CON_JOB_FAILURE |
static java.lang.String |
CON_JOB_SUCCESS |
static java.lang.String |
CON_TESTSET |
static java.lang.String |
CON_TEXT |
static java.lang.String |
CON_THRESHOLD_DATA |
static java.lang.String |
CON_TRAININGSET |
static java.lang.String |
CON_VISUALIZABLE_ERROR |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
environmentSubstitute(java.lang.String source)
Substitute all known environment variables in the given string
|
StepManager |
findStepInFlow(java.lang.String stepNameToFind)
Finds a named step in the current flow.
|
void |
finished()
Step implementations processing batch data should call this to indicate
that they have finished all processing.
|
ExecutionEnvironment |
getExecutionEnvironment()
Get the executing environment.
|
java.util.List<StepManager> |
getIncomingConnectedStepsOfConnectionType(java.lang.String connectionName)
Get a list of steps that are the source of incoming connections of the
given type
|
StepManager |
getIncomingConnectedStepWithName(java.lang.String stepName)
Get the named step that is connected with an incoming connection.
|
java.util.Map<java.lang.String,java.util.List<StepManager>> |
getIncomingConnections()
Get a Map of all incoming connections.
|
Instances |
getIncomingStructureForConnectionType(java.lang.String connectionName)
Attempt to retrieve the structure (as a header-only set of instances) for
the named incoming connection type.
|
Instances |
getIncomingStructureForConnectionType(java.lang.String connectionName,
Environment env)
Attempt to retrieve the structure (as a header-only set of instances) for
the named incoming connection type.
|
Instances |
getIncomingStructureFromStep(StepManager sourceStep,
java.lang.String connectionName)
Attempt to get the incoming structure (as a header-only set of instances)
from the given managed step for the given connection type.
|
Step |
getInfoStep()
Returns a reference to the step being managed if it has one or more
outgoing CON_INFO connections.
|
Step |
getInfoStep(java.lang.Class stepClass)
Returns a reference to the step being managed if it has one or more
outgoing CON_INFO connections and the managed step is of the supplied class
|
Logger |
getLog()
Get the log
|
LoggingLevel |
getLoggingLevel()
Get the currently set logging level
|
Step |
getManagedStep()
Get the actual step managed by this step manager
|
java.lang.String |
getName()
Get the name of the step managed by this StepManager
|
java.util.List<StepManager> |
getOutgoingConnectedStepsOfConnectionType(java.lang.String connectionName)
Get a list of downstream steps connected to this step with the given
connection type.
|
StepManager |
getOutgoingConnectedStepWithName(java.lang.String stepName)
Get a named step connected to this step with an outgoing connection
|
java.util.Map<java.lang.String,java.util.List<StepManager>> |
getOutgoingConnections()
Get a Map of all outgoing connections.
|
Settings |
getSettings()
Get the knowledge flow settings
|
boolean |
getStepMustRunSingleThreaded()
Returns true if the step managed by this step manager has been marked as
one that must run single-threaded.
|
void |
interrupted()
Step implementations processing batch data should call this as soon as they
have finished processing after a stop has been requested.
|
boolean |
isStepBusy()
Returns true if, at this time, the step managed by this step manager is
currently busy with processing
|
boolean |
isStepFinished()
Return true if the current step is finished.
|
boolean |
isStopRequested()
Return true if a stop has been requested by the runtime environment
|
boolean |
isStreamFinished(Data data)
Returns true if this data object marks the end of an incremental stream.
|
void |
log(java.lang.String message,
LoggingLevel level)
Write a message to the log at the given logging level
|
void |
logBasic(java.lang.String message)
Log a message at the "basic" level
|
void |
logDebug(java.lang.String message)
Log a message at the "debug" level
|
void |
logDetailed(java.lang.String message)
Log a message at the "detailed" level
|
void |
logError(java.lang.String message,
java.lang.Throwable cause)
Log an error message.
|
void |
logLow(java.lang.String message)
Log a message at the "low" level
|
void |
logWarning(java.lang.String message)
Log a warning message.
|
int |
numIncomingConnections()
Get the number of steps that are connected with incoming connections
|
int |
numIncomingConnectionsOfType(java.lang.String connectionName)
Get the number of steps that are connected with the given incoming
connection type
|
int |
numOutgoingConnections()
Get the number of steps that are connected with outgoing connections
|
int |
numOutgoingConnectionsOfType(java.lang.String connectionName)
Get the number of steps that are connected with the given outgoing
connection type
|
void |
outputData(Data... data)
Output one or more Data objects to all relevant steps.
|
void |
outputData(java.lang.String outgoingConnectionName,
Data data)
Output data to all steps connected with the supplied outgoing connection
type.
|
void |
outputData(java.lang.String outgoingConnectionName,
java.lang.String stepName,
Data data)
Output a single Data object to the named step with the supplied outgoing
connection type
|
void |
processing()
Step implementations processing batch data should call this to indicate
that they have started some processing.
|
void |
setStepIsResourceIntensive(boolean isResourceIntensive)
Mark the step managed by this step manager as resource intensive
|
void |
setStepMustRunSingleThreaded(boolean mustRunSingleThreaded)
Marked the step managed by this step manager as one that must run
single-threaded.
|
void |
statusMessage(java.lang.String message)
Write a status message
|
boolean |
stepIsResourceIntensive()
Returns true if the step managed by this step manager has been marked as
being resource (cpu/memory) intensive.
|
void |
throughputFinished(Data... data)
Signal that throughput measurement has finished.
|
void |
throughputUpdateEnd()
End a throughput measurement.
|
void |
throughputUpdateStart()
Start a throughput measurement.
|
static final java.lang.String CON_DATASET
static final java.lang.String CON_INSTANCE
static final java.lang.String CON_TRAININGSET
static final java.lang.String CON_TESTSET
static final java.lang.String CON_BATCH_CLASSIFIER
static final java.lang.String CON_INCREMENTAL_CLASSIFIER
static final java.lang.String CON_INCREMENTAL_CLUSTERER
static final java.lang.String CON_BATCH_CLUSTERER
static final java.lang.String CON_BATCH_ASSOCIATOR
static final java.lang.String CON_VISUALIZABLE_ERROR
static final java.lang.String CON_THRESHOLD_DATA
static final java.lang.String CON_TEXT
static final java.lang.String CON_IMAGE
static final java.lang.String CON_GRAPH
static final java.lang.String CON_CHART
static final java.lang.String CON_INFO
static final java.lang.String CON_ENVIRONMENT
static final java.lang.String CON_JOB_SUCCESS
static final java.lang.String CON_JOB_FAILURE
static final java.lang.String CON_AUX_DATA_SET_NUM
static final java.lang.String CON_AUX_DATA_MAX_SET_NUM
static final java.lang.String CON_AUX_DATA_TEST_INSTANCE
static final java.lang.String CON_AUX_DATA_TESTSET
static final java.lang.String CON_AUX_DATA_TRAININGSET
static final java.lang.String CON_AUX_DATA_INSTANCE
static final java.lang.String CON_AUX_DATA_TEXT_TITLE
static final java.lang.String CON_AUX_DATA_LABEL
static final java.lang.String CON_AUX_DATA_CLASS_ATTRIBUTE
static final java.lang.String CON_AUX_DATA_GRAPH_TITLE
static final java.lang.String CON_AUX_DATA_GRAPH_TYPE
static final java.lang.String CON_AUX_DATA_CHART_MAX
static final java.lang.String CON_AUX_DATA_CHART_MIN
static final java.lang.String CON_AUX_DATA_CHART_DATA_POINT
static final java.lang.String CON_AUX_DATA_CHART_LEGEND
static final java.lang.String CON_AUX_DATA_ENVIRONMENT_VARIABLES
static final java.lang.String CON_AUX_DATA_ENVIRONMENT_PROPERTIES
static final java.lang.String CON_AUX_DATA_ENVIRONMENT_RESULTS
static final java.lang.String CON_AUX_DATA_BATCH_ASSOCIATION_RULES
static final java.lang.String CON_AUX_DATA_INCREMENTAL_STREAM_END
static final java.lang.String CON_AUX_DATA_IS_INCREMENTAL
static final java.lang.String CON_AUX_DATA_PRIMARY_PAYLOAD_NOT_THREAD_SAFE
java.lang.String getName()
Step getManagedStep()
ExecutionEnvironment getExecutionEnvironment()
Settings getSettings()
int numIncomingConnections()
int numOutgoingConnections()
int numIncomingConnectionsOfType(java.lang.String connectionName)
connectionName
- the type of the incoming connectionint numOutgoingConnectionsOfType(java.lang.String connectionName)
connectionName
- the type of the outgoing connectionjava.util.List<StepManager> getIncomingConnectedStepsOfConnectionType(java.lang.String connectionName)
connectionName
- the name of the incoming connection to get a list of
steps forStepManager getIncomingConnectedStepWithName(java.lang.String stepName)
stepName
- the name of the step to getStepManager getOutgoingConnectedStepWithName(java.lang.String stepName)
stepName
- the name of the step to look forjava.util.List<StepManager> getOutgoingConnectedStepsOfConnectionType(java.lang.String connectionName)
connectionName
- the name of the outgoing connectionjava.util.Map<java.lang.String,java.util.List<StepManager>> getIncomingConnections()
java.util.Map<java.lang.String,java.util.List<StepManager>> getOutgoingConnections()
void outputData(java.lang.String outgoingConnectionName, Data data) throws WekaException
outgoingConnectionName
- the type of the outgoing connection to send
data todata
- a single Data object to sendWekaException
- if a problem occursvoid outputData(Data... data) throws WekaException
StepOutputListeners
. Note that the downstream
step(s)' processIncoming() method is called in a separate thread for batch
connections. Furthermore, if multiple Data objects are supplied via the
varargs argument, and a target step will receive more than one of the Data
objects, then they will be passed on to the step in question sequentially
within the same thread of execution.data
- one or more Data objects to be sentWekaException
- if a problem occursvoid outputData(java.lang.String outgoingConnectionName, java.lang.String stepName, Data data) throws WekaException
outgoingConnectionName
- the name of the outgoing connectionstepName
- the name of the step to send the data todata
- the data to sendWekaException
- if a problem occursInstances getIncomingStructureForConnectionType(java.lang.String connectionName) throws WekaException
connectionName
- the type of the incoming connection to get the
structure forWekaException
- if a problem occursInstances getIncomingStructureForConnectionType(java.lang.String connectionName, Environment env) throws WekaException
connectionName
- the type of the incoming connection to get the
structure forenv
- the Environment to useWekaException
- if a problem occursInstances getIncomingStructureFromStep(StepManager sourceStep, java.lang.String connectionName) throws WekaException
sourceStep
- the step manager managing the source stepconnectionName
- the name of the connection to attempt to get the
structure forWekaException
- if a problem occursboolean isStepBusy()
boolean isStopRequested()
boolean isStepFinished()
void processing()
void finished()
void interrupted()
boolean isStreamFinished(Data data)
data
- the data element to checkvoid throughputUpdateStart()
void throughputUpdateEnd()
void throughputFinished(Data... data) throws WekaException
data
- one or more Data events (with appropriate connection type set)
to pass on to downstream connected steps. These are used to carry
any final data and to inform the downstream step(s) that the
stream has endedWekaException
- if a problem occursvoid logLow(java.lang.String message)
message
- the message to logvoid logBasic(java.lang.String message)
message
- the message to logvoid logDetailed(java.lang.String message)
message
- the message to logvoid logDebug(java.lang.String message)
message
- the message to logvoid logWarning(java.lang.String message)
message
- the message to logvoid logError(java.lang.String message, java.lang.Throwable cause)
message
- the message to logcause
- the optional Throwable to logvoid log(java.lang.String message, LoggingLevel level)
message
- the message to writelevel
- the level for the messagevoid statusMessage(java.lang.String message)
message
- the messageLogger getLog()
LoggingLevel getLoggingLevel()
java.lang.String environmentSubstitute(java.lang.String source)
source
- the source stringStep getInfoStep(java.lang.Class stepClass) throws WekaException
stepClass
- the expected class of the stepWekaException
- if there are no outgoing CON_INFO connections or the
managed step is the wrong typeStep getInfoStep() throws WekaException
WekaException
- if there are no outgoing CON_INFO connectionsStepManager findStepInFlow(java.lang.String stepNameToFind)
stepNameToFind
- the name of the step to findboolean stepIsResourceIntensive()
void setStepIsResourceIntensive(boolean isResourceIntensive)
isResourceIntensive
- true if the step managed by this step manager is
resource intensivevoid setStepMustRunSingleThreaded(boolean mustRunSingleThreaded)
mustRunSingleThreaded
- true if the managed step must run
single-threadedboolean getStepMustRunSingleThreaded()
mustRunSingleThreaded
- true if the managed step must run
single-threaded