Interface ScriptInterface
-
- All Superinterfaces:
HasLogChannelInterface
,StepInterface
,org.pentaho.di.core.variables.VariableSpace
public interface ScriptInterface extends StepInterface
Interface to make the real ScriptValueMod and ScriptValueModDummy similar.- Author:
- Sven Boden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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
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.long
getErrors()
Get the number of errorsList<org.pentaho.di.core.RowSet>
getInputRowSets()
long
getLinesInput()
long
getLinesOutput()
long
getLinesRead()
long
getLinesRejected()
long
getLinesUpdated()
long
getLinesWritten()
List<org.pentaho.di.core.RowSet>
getOutputRowSets()
String
getPartitionID()
Object[]
getRow()
List<RowListener>
getRowListeners()
String
getStepID()
String
getStepname()
Get the name of the step.boolean
init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
Initialize and do work where other steps need to wait for...boolean
isAlive()
boolean
isPartitioned()
boolean
isStopped()
void
markStart()
Mark the start time of the step.void
markStop()
Mark the end time of the step.void
pauseRunning()
Pause a running stepboolean
processRow(StepMetaInterface smi, StepDataInterface sdi)
Perform the equivalent of processing one row.void
putRow(org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] row)
Put a row on the destination rowsets.void
removeRowListener(RowListener rowListener)
Remove a rowlistener from this step.void
resumeRunning()
Resume a running stepvoid
run()
void
setErrors(long errors)
Sets the number of errorsvoid
setOutputDone()
Signal output done to destination stepsvoid
setPartitionID(String partitionID)
void
start()
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.trans.step.StepInterface
addRowSetToInputRowSets, addRowSetToOutputRowSets, addStepListener, afterFinishProcessing, batchComplete, beforeStartProcessing, canProcessOneRow, getCopy, getCurrentInputRowSetNr, getCurrentOutputRowSetNr, getLogChannel, getMetaStore, getProcessed, getRepository, getResultFiles, getRuntime, getStatus, getStepMeta, getTrans, identifyErrorOutput, initBeforeStart, isMapping, isPaused, isRunning, isSafeStopped, isUsingThreadPriorityManagment, rowsetInputSize, rowsetOutputSize, setCurrentInputRowSetNr, setCurrentOutputRowSetNr, setLinesRejected, setMetaStore, setPartitioned, setRepartitioning, setRepository, setRunning, setSafeStopped, setStopped, setUsingThreadPriorityManagment, subStatuses
-
Methods inherited from interface org.pentaho.di.core.variables.VariableSpace
copyVariablesFrom, environmentSubstitute, environmentSubstitute, environmentSubstitute, fieldSubstitute, getBooleanValueOfVariable, getParentVariableSpace, getVariable, getVariable, initializeVariablesFrom, injectVariables, listVariables, setParentVariableSpace, setVariable, shareVariablesWith
-
-
-
-
Method Detail
-
processRow
boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:StepInterface
Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).- Specified by:
processRow
in interfaceStepInterface
- Parameters:
smi
- The steps metadata to work withsdi
- The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)- Returns:
- false if no more rows can be processed or an error occurred.
- Throws:
org.pentaho.di.core.exception.KettleException
-
addRowListener
void addRowListener(RowListener rowListener)
Description copied from interface:StepInterface
Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.- Specified by:
addRowListener
in interfaceStepInterface
- Parameters:
rowListener
- the rowlistener to add
-
dispose
void dispose(StepMetaInterface sii, StepDataInterface sdi)
Description copied from interface:StepInterface
Dispose of this step: close files, empty logs, etc.- Specified by:
dispose
in interfaceStepInterface
- Parameters:
sii
- The metadata to work withsdi
- The data to dispose of
-
getErrors
long getErrors()
Description copied from interface:StepInterface
Get the number of errors- Specified by:
getErrors
in interfaceStepInterface
- Returns:
- the number of errors
-
getInputRowSets
List<org.pentaho.di.core.RowSet> getInputRowSets()
- Specified by:
getInputRowSets
in interfaceStepInterface
- Returns:
- The list of active input rowsets for the step
-
getLinesInput
long getLinesInput()
- Specified by:
getLinesInput
in interfaceStepInterface
- Returns:
- Returns the linesInput.
-
getLinesOutput
long getLinesOutput()
- Specified by:
getLinesOutput
in interfaceStepInterface
- Returns:
- Returns the linesOutput.
-
getLinesRead
long getLinesRead()
- Specified by:
getLinesRead
in interfaceStepInterface
- Returns:
- Returns the linesRead.
-
getLinesUpdated
long getLinesUpdated()
- Specified by:
getLinesUpdated
in interfaceStepInterface
- Returns:
- Returns the linesUpdated.
-
getLinesWritten
long getLinesWritten()
- Specified by:
getLinesWritten
in interfaceStepInterface
- Returns:
- Returns the linesWritten.
-
getLinesRejected
long getLinesRejected()
- Specified by:
getLinesRejected
in interfaceStepInterface
- Returns:
- Returns the lines rejected by error handling.
-
getOutputRowSets
List<org.pentaho.di.core.RowSet> getOutputRowSets()
- Specified by:
getOutputRowSets
in interfaceStepInterface
- Returns:
- The list of active output rowsets for the step
-
getPartitionID
String getPartitionID()
- Specified by:
getPartitionID
in interfaceStepInterface
- Returns:
- the steps partition ID
-
getRow
Object[] getRow() throws org.pentaho.di.core.exception.KettleException
- Specified by:
getRow
in interfaceStepInterface
- Returns:
- a row from the source step(s).
- Throws:
org.pentaho.di.core.exception.KettleException
-
getRowListeners
List<RowListener> getRowListeners()
- Specified by:
getRowListeners
in interfaceStepInterface
- Returns:
- a list of the installed RowListeners
-
getStepID
String getStepID()
- Specified by:
getStepID
in interfaceStepInterface
- Returns:
- the type ID of the step...
-
getStepname
String getStepname()
Description copied from interface:StepInterface
Get the name of the step.- Specified by:
getStepname
in interfaceStepInterface
- Returns:
- the name of the step
-
init
boolean init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
Description copied from interface:StepInterface
Initialize and do work where other steps need to wait for...- Specified by:
init
in interfaceStepInterface
- Parameters:
stepMetaInterface
- The metadata to work withstepDataInterface
- The data to initialize
-
isAlive
boolean isAlive()
-
isPartitioned
boolean isPartitioned()
- Specified by:
isPartitioned
in interfaceStepInterface
- Returns:
- true if the step is running partitioned
-
isStopped
boolean isStopped()
- Specified by:
isStopped
in interfaceStepInterface
- Returns:
- True if the step is marked as stopped. Execution should stop immediate.
-
markStart
void markStart()
Description copied from interface:StepInterface
Mark the start time of the step.- Specified by:
markStart
in interfaceStepInterface
-
markStop
void markStop()
Description copied from interface:StepInterface
Mark the end time of the step.- Specified by:
markStop
in interfaceStepInterface
-
putRow
void putRow(org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] row) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:StepInterface
Put a row on the destination rowsets.- Specified by:
putRow
in interfaceStepInterface
- Parameters:
rowMeta
- The row to send to the destinations steps- Throws:
org.pentaho.di.core.exception.KettleException
-
removeRowListener
void removeRowListener(RowListener rowListener)
Description copied from interface:StepInterface
Remove a rowlistener from this step.- Specified by:
removeRowListener
in interfaceStepInterface
- Parameters:
rowListener
- the rowlistener to remove
-
run
void run()
-
setErrors
void setErrors(long errors)
Description copied from interface:StepInterface
Sets the number of errors- Specified by:
setErrors
in interfaceStepInterface
- Parameters:
errors
- the number of errors to set
-
setOutputDone
void setOutputDone()
Description copied from interface:StepInterface
Signal output done to destination steps- Specified by:
setOutputDone
in interfaceStepInterface
-
setPartitionID
void setPartitionID(String partitionID)
- Specified by:
setPartitionID
in interfaceStepInterface
- Parameters:
partitionID
- the partitionID to set
-
start
void start()
-
stopAll
void stopAll()
Description copied from interface:StepInterface
Flags all rowsets as stopped/completed/finished.- Specified by:
stopAll
in interfaceStepInterface
-
stopRunning
void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:StepInterface
Stop running operations...- Specified by:
stopRunning
in interfaceStepInterface
- Parameters:
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.- Throws:
org.pentaho.di.core.exception.KettleException
-
cleanup
void cleanup()
Description copied from interface:StepInterface
Call this method typically, after ALL the slave transformations in a clustered run have finished.- Specified by:
cleanup
in interfaceStepInterface
-
pauseRunning
void pauseRunning()
Description copied from interface:StepInterface
Pause a running step- Specified by:
pauseRunning
in interfaceStepInterface
-
resumeRunning
void resumeRunning()
Description copied from interface:StepInterface
Resume a running step- Specified by:
resumeRunning
in interfaceStepInterface
-
-