|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StepInterface
The interface that any transformation step or plugin needs to implement. Created on 12-AUG-2004
Method Summary | |
---|---|
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()
|
long |
getErrors()
Get the number of errors |
List<RowSet> |
getInputRowSets()
|
long |
getLinesInput()
|
long |
getLinesOutput()
|
long |
getLinesRead()
|
long |
getLinesRejected()
|
long |
getLinesUpdated()
|
long |
getLinesWritten()
|
LogChannelInterface |
getLogChannel()
|
List<RowSet> |
getOutputRowSets()
|
String |
getPartitionID()
|
long |
getProcessed()
|
Map<String,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(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 |
setErrors(long errors)
Sets the number of errors |
void |
setLinesRejected(long linesRejected)
|
void |
setOutputDone()
Signal output done to destination steps |
void |
setPartitioned(boolean partitioned)
|
void |
setPartitionID(String partitionID)
|
void |
setRepartitioning(int partitioningMethod)
|
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... |
Methods inherited from interface org.pentaho.di.core.variables.VariableSpace |
---|
copyVariablesFrom, environmentSubstitute, environmentSubstitute, getBooleanValueOfVariable, getParentVariableSpace, getVariable, getVariable, initializeVariablesFrom, injectVariables, listVariables, setParentVariableSpace, setVariable, shareVariablesWith |
Method Detail |
---|
Trans getTrans()
boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
smi
- The steps metadata to work withsdi
- The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)
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 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.
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(RowMetaInterface row, Object[] data) throws KettleException
row
- The row to send to the destinations steps
KettleException
Object[] getRow() throws KettleException
KettleException
void setOutputDone()
void addRowListener(RowListener rowListener)
rowListener
- the rowlistener to addvoid removeRowListener(RowListener rowListener)
rowListener
- the rowlistener to removeList<RowListener> getRowListeners()
List<RowSet> getInputRowSets()
List<RowSet> getOutputRowSets()
boolean isPartitioned()
void setPartitionID(String partitionID)
partitionID
- the partitionID to setString getPartitionID()
void cleanup()
void initBeforeStart() throws KettleStepException
KettleStepException
- In case there is an errorvoid addStepListener(StepListener stepListener)
stepListener
- The listener to add to the stepboolean isMapping()
StepMeta getStepMeta()
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,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 KettleException
KettleException
- In case an error occurs during the processing of the batch of rows.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |