Interface ScriptInterface
- All Superinterfaces:
HasLogChannelInterface,StepInterface,org.pentaho.di.core.variables.VariableSpace
Interface to make the real ScriptValueMod and ScriptValueModDummy similar.
- Author:
- Sven Boden
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRowListener(RowListener rowListener) Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.voidcleanup()Call this method typically, after ALL the slave transformations in a clustered run have finished.voiddispose(StepMetaInterface sii, StepDataInterface sdi) Dispose of this step: close files, empty logs, etc.longGet the number of errorsList<org.pentaho.di.core.RowSet>longlonglonglonglonglongList<org.pentaho.di.core.RowSet>Object[]getRow()Get the name of the step.booleaninit(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) Initialize and do work where other steps need to wait for...booleanisAlive()booleanbooleanvoidMark the start time of the step.voidmarkStop()Mark the end time of the step.voidPause a running stepbooleanprocessRow(StepMetaInterface smi, StepDataInterface sdi) Perform the equivalent of processing one row.voidPut a row on the destination rowsets.voidremoveRowListener(RowListener rowListener) Remove a rowlistener from this step.voidResume a running stepvoidrun()voidsetErrors(long errors) Sets the number of errorsvoidSignal output done to destination stepsvoidsetPartitionID(String partitionID) voidstart()voidstopAll()Flags all rowsets as stopped/completed/finished.voidstopRunning(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, subStatusesMethods 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 Details
-
processRow
boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws org.pentaho.di.core.exception.KettleException Description copied from interface:StepInterfacePerform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).- Specified by:
processRowin 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
Description copied from interface:StepInterfaceAdd a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.- Specified by:
addRowListenerin interfaceStepInterface- Parameters:
rowListener- the rowlistener to add
-
dispose
Description copied from interface:StepInterfaceDispose of this step: close files, empty logs, etc.- Specified by:
disposein interfaceStepInterface- Parameters:
sii- The metadata to work withsdi- The data to dispose of
-
getErrors
long getErrors()Description copied from interface:StepInterfaceGet the number of errors- Specified by:
getErrorsin interfaceStepInterface- Returns:
- the number of errors
-
getInputRowSets
List<org.pentaho.di.core.RowSet> getInputRowSets()- Specified by:
getInputRowSetsin interfaceStepInterface- Returns:
- The list of active input rowsets for the step
-
getLinesInput
long getLinesInput()- Specified by:
getLinesInputin interfaceStepInterface- Returns:
- Returns the linesInput.
-
getLinesOutput
long getLinesOutput()- Specified by:
getLinesOutputin interfaceStepInterface- Returns:
- Returns the linesOutput.
-
getLinesRead
long getLinesRead()- Specified by:
getLinesReadin interfaceStepInterface- Returns:
- Returns the linesRead.
-
getLinesUpdated
long getLinesUpdated()- Specified by:
getLinesUpdatedin interfaceStepInterface- Returns:
- Returns the linesUpdated.
-
getLinesWritten
long getLinesWritten()- Specified by:
getLinesWrittenin interfaceStepInterface- Returns:
- Returns the linesWritten.
-
getLinesRejected
long getLinesRejected()- Specified by:
getLinesRejectedin interfaceStepInterface- Returns:
- Returns the lines rejected by error handling.
-
getOutputRowSets
List<org.pentaho.di.core.RowSet> getOutputRowSets()- Specified by:
getOutputRowSetsin interfaceStepInterface- Returns:
- The list of active output rowsets for the step
-
getPartitionID
String getPartitionID()- Specified by:
getPartitionIDin interfaceStepInterface- Returns:
- the steps partition ID
-
getRow
- Specified by:
getRowin interfaceStepInterface- Returns:
- a row from the source step(s).
- Throws:
org.pentaho.di.core.exception.KettleException
-
getRowListeners
List<RowListener> getRowListeners()- Specified by:
getRowListenersin interfaceStepInterface- Returns:
- a list of the installed RowListeners
-
getStepID
String getStepID()- Specified by:
getStepIDin interfaceStepInterface- Returns:
- the type ID of the step...
-
getStepname
String getStepname()Description copied from interface:StepInterfaceGet the name of the step.- Specified by:
getStepnamein interfaceStepInterface- Returns:
- the name of the step
-
init
Description copied from interface:StepInterfaceInitialize and do work where other steps need to wait for...- Specified by:
initin interfaceStepInterface- Parameters:
stepMetaInterface- The metadata to work withstepDataInterface- The data to initialize
-
isAlive
boolean isAlive() -
isPartitioned
boolean isPartitioned()- Specified by:
isPartitionedin interfaceStepInterface- Returns:
- true if the step is running partitioned
-
isStopped
boolean isStopped()- Specified by:
isStoppedin interfaceStepInterface- Returns:
- True if the step is marked as stopped. Execution should stop immediate.
-
markStart
void markStart()Description copied from interface:StepInterfaceMark the start time of the step.- Specified by:
markStartin interfaceStepInterface
-
markStop
void markStop()Description copied from interface:StepInterfaceMark the end time of the step.- Specified by:
markStopin interfaceStepInterface
-
putRow
void putRow(org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] row) throws org.pentaho.di.core.exception.KettleException Description copied from interface:StepInterfacePut a row on the destination rowsets.- Specified by:
putRowin interfaceStepInterface- Parameters:
rowMeta- The row to send to the destinations steps- Throws:
org.pentaho.di.core.exception.KettleException
-
removeRowListener
Description copied from interface:StepInterfaceRemove a rowlistener from this step.- Specified by:
removeRowListenerin interfaceStepInterface- Parameters:
rowListener- the rowlistener to remove
-
run
void run() -
setErrors
void setErrors(long errors) Description copied from interface:StepInterfaceSets the number of errors- Specified by:
setErrorsin interfaceStepInterface- Parameters:
errors- the number of errors to set
-
setOutputDone
void setOutputDone()Description copied from interface:StepInterfaceSignal output done to destination steps- Specified by:
setOutputDonein interfaceStepInterface
-
setPartitionID
- Specified by:
setPartitionIDin interfaceStepInterface- Parameters:
partitionID- the partitionID to set
-
start
void start() -
stopAll
void stopAll()Description copied from interface:StepInterfaceFlags all rowsets as stopped/completed/finished.- Specified by:
stopAllin interfaceStepInterface
-
stopRunning
void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws org.pentaho.di.core.exception.KettleException Description copied from interface:StepInterfaceStop running operations...- Specified by:
stopRunningin 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:StepInterfaceCall this method typically, after ALL the slave transformations in a clustered run have finished.- Specified by:
cleanupin interfaceStepInterface
-
pauseRunning
void pauseRunning()Description copied from interface:StepInterfacePause a running step- Specified by:
pauseRunningin interfaceStepInterface
-
resumeRunning
void resumeRunning()Description copied from interface:StepInterfaceResume a running step- Specified by:
resumeRunningin interfaceStepInterface
-