public interface StepInterface extends org.pentaho.di.core.variables.VariableSpace, HasLogChannelInterface
Modifier and Type | Method and Description |
---|---|
void |
addRowListener(RowListener rowListener)
Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.
|
void |
addStepListener(StepListener stepListener)
Attach a step listener to be notified when a step arrives in a certain state.
|
void |
batchComplete()
Calling this method will alert the step that we finished passing a batch of records to the step.
|
boolean |
canProcessOneRow()
This method checks if the step is capable of processing at least one row.
|
void |
cleanup()
Call this method typically, after ALL the slave transformations in a clustered run have finished.
|
void |
dispose(StepMetaInterface sii,
StepDataInterface sdi)
Dispose of this step: close files, empty logs, etc.
|
int |
getCopy() |
int |
getCurrentInputRowSetNr() |
int |
getCurrentOutputRowSetNr() |
long |
getErrors()
Get the number of errors
|
List<org.pentaho.di.core.RowSet> |
getInputRowSets() |
long |
getLinesInput() |
long |
getLinesOutput() |
long |
getLinesRead() |
long |
getLinesRejected() |
long |
getLinesUpdated() |
long |
getLinesWritten() |
org.pentaho.di.core.logging.LogChannelInterface |
getLogChannel() |
org.pentaho.metastore.api.IMetaStore |
getMetaStore() |
List<org.pentaho.di.core.RowSet> |
getOutputRowSets() |
String |
getPartitionID() |
long |
getProcessed() |
Repository |
getRepository() |
Map<String,org.pentaho.di.core.ResultFile> |
getResultFiles() |
Object[] |
getRow() |
List<RowListener> |
getRowListeners() |
long |
getRuntime() |
BaseStepData.StepExecutionStatus |
getStatus() |
String |
getStepID() |
StepMeta |
getStepMeta() |
String |
getStepname()
Get the name of the step.
|
Trans |
getTrans() |
void |
identifyErrorOutput()
To be used to flag an error output channel of a step prior to execution for performance reasons.
|
boolean |
init(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Initialize and do work where other steps need to wait for...
|
void |
initBeforeStart()
This method is executed by Trans right before the threads start and right after initialization.
!!! A plugin implementing this method should make sure to also call super.initBeforeStart(); !!! |
boolean |
isMapping() |
boolean |
isPartitioned() |
boolean |
isPaused() |
boolean |
isRunning() |
boolean |
isStopped() |
boolean |
isUsingThreadPriorityManagment() |
void |
markStart()
Mark the start time of the step.
|
void |
markStop()
Mark the end time of the step.
|
void |
pauseRunning()
Pause a running step
|
boolean |
processRow(StepMetaInterface smi,
StepDataInterface sdi)
Perform the equivalent of processing one row.
|
void |
putRow(org.pentaho.di.core.row.RowMetaInterface row,
Object[] data)
Put a row on the destination rowsets.
|
void |
removeRowListener(RowListener rowListener)
Remove a rowlistener from this step.
|
void |
resumeRunning()
Resume a running step
|
int |
rowsetInputSize() |
int |
rowsetOutputSize() |
void |
setCurrentInputRowSetNr(int index) |
void |
setCurrentOutputRowSetNr(int index) |
void |
setErrors(long errors)
Sets the number of errors
|
void |
setLinesRejected(long linesRejected) |
void |
setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)
Pass along the metastore to use when loading external elements at runtime.
|
void |
setOutputDone()
Signal output done to destination steps
|
void |
setPartitioned(boolean partitioned) |
void |
setPartitionID(String partitionID) |
void |
setRepartitioning(int partitioningMethod) |
void |
setRepository(Repository repository) |
void |
setRunning(boolean running)
Flag the step as running or not
|
void |
setStopped(boolean stopped) |
void |
setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment) |
void |
stopAll()
Flags all rowsets as stopped/completed/finished.
|
void |
stopRunning(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Stop running operations...
|
copyVariablesFrom, environmentSubstitute, environmentSubstitute, fieldSubstitute, getBooleanValueOfVariable, getParentVariableSpace, getVariable, getVariable, initializeVariablesFrom, injectVariables, listVariables, setParentVariableSpace, setVariable, shareVariablesWith
Trans getTrans()
boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws org.pentaho.di.core.exception.KettleException
smi
- The steps metadata to work withsdi
- The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)org.pentaho.di.core.exception.KettleException
boolean canProcessOneRow()
For example, if a step has no input records but needs at least one to function, it will return false.
boolean init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
stepMetaInterface
- The metadata to work withstepDataInterface
- The data to initializevoid dispose(StepMetaInterface sii, StepDataInterface sdi)
sii
- The metadata to work withsdi
- The data to dispose ofvoid markStart()
void markStop()
void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws org.pentaho.di.core.exception.KettleException
stepMetaInterface
- The metadata that might be needed by the step to stop running.stepDataInterface
- The interface to the step data containing the connections, resultsets, open files, etc.org.pentaho.di.core.exception.KettleException
boolean isRunning()
void setRunning(boolean running)
running
- the running flag to setboolean isStopped()
void setStopped(boolean stopped)
stopped
- true if the step needs to be stoppedboolean isPaused()
void stopAll()
void pauseRunning()
void resumeRunning()
String getStepname()
int getCopy()
String getStepID()
long getErrors()
void setErrors(long errors)
errors
- the number of errors to setlong getLinesInput()
long getLinesOutput()
long getLinesRead()
long getLinesWritten()
long getLinesUpdated()
void setLinesRejected(long linesRejected)
linesRejected
- steps the lines rejected by error handling.long getLinesRejected()
void putRow(org.pentaho.di.core.row.RowMetaInterface row, Object[] data) throws org.pentaho.di.core.exception.KettleException
row
- The row to send to the destinations stepsorg.pentaho.di.core.exception.KettleException
Object[] getRow() throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleException
void setOutputDone()
void addRowListener(RowListener rowListener)
rowListener
- the rowlistener to addvoid removeRowListener(RowListener rowListener)
rowListener
- the rowlistener to removeList<RowListener> getRowListeners()
List<org.pentaho.di.core.RowSet> getInputRowSets()
List<org.pentaho.di.core.RowSet> getOutputRowSets()
boolean isPartitioned()
void setPartitionID(String partitionID)
partitionID
- the partitionID to setString getPartitionID()
void cleanup()
void initBeforeStart() throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepException
- In case there is an errorvoid addStepListener(StepListener stepListener)
stepListener
- The listener to add to the stepboolean isMapping()
StepMeta getStepMeta()
org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
getLogChannel
in interface HasLogChannelInterface
void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
usingThreadPriorityManagment
- set to true to actively manage priorities of step threadsboolean isUsingThreadPriorityManagment()
int rowsetInputSize()
int rowsetOutputSize()
long getProcessed()
Map<String,org.pentaho.di.core.ResultFile> getResultFiles()
BaseStepData.StepExecutionStatus getStatus()
StepDataInterface
long getRuntime()
void identifyErrorOutput()
void setPartitioned(boolean partitioned)
partitioned
- true if this step is partitionedvoid setRepartitioning(int partitioningMethod)
partitioningMethodNone
- The repartitioning methodvoid batchComplete() throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleException
- In case an error occurs during the processing of the batch of rows.void setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)
metaStore
- The metastore to useorg.pentaho.metastore.api.IMetaStore getMetaStore()
void setRepository(Repository repository)
repository
- The repository used by the step to load and reference Kettle objects with at runtimeRepository getRepository()
int getCurrentOutputRowSetNr()
void setCurrentOutputRowSetNr(int index)
index
- Sets the index of the active (current) output row set to use.int getCurrentInputRowSetNr()
void setCurrentInputRowSetNr(int index)
index
- Sets the index of the active (current) input row set to use.