public class ScriptValuesModDummy extends Object implements StepInterface
Constructor and Description |
---|
ScriptValuesModDummy(RowMetaInterface inputRowMeta,
RowMetaInterface outputRowMeta) |
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 |
copyVariablesFrom(VariableSpace space) |
void |
dispose(StepMetaInterface sii,
StepDataInterface sdi)
Dispose of this step: close files, empty logs, etc.
|
String |
environmentSubstitute(String aString) |
String[] |
environmentSubstitute(String[] string) |
String |
fieldSubstitute(String aString,
RowMetaInterface rowMeta,
Object[] rowData) |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue) |
int |
getCopy() |
int |
getCurrentInputRowSetNr() |
int |
getCurrentOutputRowSetNr() |
long |
getErrors()
Get the number of errors
|
RowMetaInterface |
getInputRowMeta() |
List<RowSet> |
getInputRowSets() |
long |
getLinesInput() |
long |
getLinesOutput() |
long |
getLinesRead() |
long |
getLinesRejected() |
long |
getLinesUpdated() |
long |
getLinesWritten() |
LogChannelInterface |
getLogChannel() |
org.pentaho.metastore.api.IMetaStore |
getMetaStore() |
RowMetaInterface |
getOutputRowMeta() |
List<RowSet> |
getOutputRowSets() |
VariableSpace |
getParentVariableSpace() |
String |
getPartitionID() |
long |
getProcessed() |
Repository |
getRepository() |
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() |
TransMeta |
getTransMeta() |
String |
getVariable(String variableName) |
String |
getVariable(String variableName,
String defaultValue) |
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(); !!! |
void |
initializeVariablesFrom(VariableSpace parent) |
void |
injectVariables(Map<String,String> prop) |
boolean |
isAlive() |
boolean |
isIdle() |
boolean |
isMapping() |
boolean |
isPartitioned() |
boolean |
isPassingData() |
boolean |
isPaused() |
boolean |
isRunning() |
boolean |
isStopped() |
boolean |
isUsingThreadPriorityManagment() |
boolean |
isWaitingForData() |
String[] |
listVariables() |
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 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 step
|
int |
rowsetInputSize() |
int |
rowsetOutputSize() |
void |
run() |
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 |
setParentVariableSpace(VariableSpace parent) |
void |
setPartitioned(boolean partitioned) |
void |
setPartitionID(String partitionID) |
void |
setPassingData(boolean passingData) |
void |
setRepartitioning(int partitioningMethod) |
void |
setRepository(Repository repository) |
void |
setRunning(boolean running)
Flag the step as running or not
|
void |
setSafeStopped(boolean stopped) |
void |
setStopped(boolean stopped) |
void |
setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment) |
void |
setVariable(String variableName,
String variableValue) |
void |
setWaitingForData(boolean waitingForData) |
void |
shareVariablesWith(VariableSpace space) |
void |
start() |
void |
stopAll()
Flags all rowsets as stopped/completed/finished.
|
void |
stopRunning(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Stop running operations...
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRowSetToInputRowSets, addRowSetToOutputRowSets, isSafeStopped, subStatuses
public ScriptValuesModDummy(RowMetaInterface inputRowMeta, RowMetaInterface outputRowMeta)
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
StepInterface
processRow
in interface StepInterface
smi
- The steps metadata to work withsdi
- The steps temporary working data to work with (database connections, result sets, caches, temporary
variables, etc.)KettleException
public void addRowListener(RowListener rowListener)
StepInterface
addRowListener
in interface StepInterface
rowListener
- the rowlistener to addpublic void dispose(StepMetaInterface sii, StepDataInterface sdi)
StepInterface
dispose
in interface StepInterface
sii
- The metadata to work withsdi
- The data to dispose ofpublic long getErrors()
StepInterface
getErrors
in interface StepInterface
public List<RowSet> getInputRowSets()
getInputRowSets
in interface StepInterface
public long getLinesInput()
getLinesInput
in interface StepInterface
public long getLinesOutput()
getLinesOutput
in interface StepInterface
public long getLinesRead()
getLinesRead
in interface StepInterface
public long getLinesUpdated()
getLinesUpdated
in interface StepInterface
public long getLinesWritten()
getLinesWritten
in interface StepInterface
public long getLinesRejected()
getLinesRejected
in interface StepInterface
public List<RowSet> getOutputRowSets()
getOutputRowSets
in interface StepInterface
public String getPartitionID()
getPartitionID
in interface StepInterface
public Object[] getRow() throws KettleException
getRow
in interface StepInterface
KettleException
public List<RowListener> getRowListeners()
getRowListeners
in interface StepInterface
public String getStepID()
getStepID
in interface StepInterface
public String getStepname()
StepInterface
getStepname
in interface StepInterface
public boolean init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
StepInterface
init
in interface StepInterface
stepMetaInterface
- The metadata to work withstepDataInterface
- The data to initializepublic boolean isAlive()
public boolean isPartitioned()
isPartitioned
in interface StepInterface
public boolean isStopped()
isStopped
in interface StepInterface
public void markStart()
StepInterface
markStart
in interface StepInterface
public void markStop()
StepInterface
markStop
in interface StepInterface
public void putRow(RowMetaInterface rowMeta, Object[] row) throws KettleException
StepInterface
putRow
in interface StepInterface
rowMeta
- The row to send to the destinations stepsKettleException
public void removeRowListener(RowListener rowListener)
StepInterface
removeRowListener
in interface StepInterface
rowListener
- the rowlistener to removepublic void run()
public void setErrors(long errors)
StepInterface
setErrors
in interface StepInterface
errors
- the number of errors to setpublic void setOutputDone()
StepInterface
setOutputDone
in interface StepInterface
public void setPartitionID(String partitionID)
setPartitionID
in interface StepInterface
partitionID
- the partitionID to setpublic void start()
public void stopAll()
StepInterface
stopAll
in interface StepInterface
public void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws KettleException
StepInterface
stopRunning
in interface StepInterface
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
public void cleanup()
StepInterface
cleanup
in interface StepInterface
public void pauseRunning()
StepInterface
pauseRunning
in interface StepInterface
public void resumeRunning()
StepInterface
resumeRunning
in interface StepInterface
public void copyVariablesFrom(VariableSpace space)
copyVariablesFrom
in interface VariableSpace
public String environmentSubstitute(String aString)
environmentSubstitute
in interface VariableSpace
public String[] environmentSubstitute(String[] string)
environmentSubstitute
in interface VariableSpace
public String fieldSubstitute(String aString, RowMetaInterface rowMeta, Object[] rowData) throws KettleValueException
fieldSubstitute
in interface VariableSpace
KettleValueException
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
getBooleanValueOfVariable
in interface VariableSpace
public VariableSpace getParentVariableSpace()
getParentVariableSpace
in interface VariableSpace
public void setParentVariableSpace(VariableSpace parent)
setParentVariableSpace
in interface VariableSpace
public String getVariable(String variableName, String defaultValue)
getVariable
in interface VariableSpace
public String getVariable(String variableName)
getVariable
in interface VariableSpace
public void initializeVariablesFrom(VariableSpace parent)
initializeVariablesFrom
in interface VariableSpace
public void injectVariables(Map<String,String> prop)
injectVariables
in interface VariableSpace
public String[] listVariables()
listVariables
in interface VariableSpace
public void setVariable(String variableName, String variableValue)
setVariable
in interface VariableSpace
public void shareVariablesWith(VariableSpace space)
shareVariablesWith
in interface VariableSpace
public RowMetaInterface getInputRowMeta()
public RowMetaInterface getOutputRowMeta()
public void initBeforeStart() throws KettleStepException
StepInterface
initBeforeStart
in interface StepInterface
KettleStepException
- In case there is an errorpublic void setLinesRejected(long linesRejected)
setLinesRejected
in interface StepInterface
linesRejected
- steps the lines rejected by error handling.public int getCopy()
getCopy
in interface StepInterface
public void addStepListener(StepListener stepListener)
StepInterface
addStepListener
in interface StepInterface
stepListener
- The listener to add to the steppublic boolean isMapping()
isMapping
in interface StepInterface
public StepMeta getStepMeta()
getStepMeta
in interface StepInterface
public Trans getTrans()
getTrans
in interface StepInterface
public TransMeta getTransMeta()
public LogChannelInterface getLogChannel()
getLogChannel
in interface HasLogChannelInterface
getLogChannel
in interface StepInterface
public boolean isRunning()
isRunning
in interface StepInterface
public boolean isUsingThreadPriorityManagment()
isUsingThreadPriorityManagment
in interface StepInterface
public void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
setUsingThreadPriorityManagment
in interface StepInterface
usingThreadPriorityManagment
- set to true to actively manage priorities of step threadspublic void setRunning(boolean running)
StepInterface
setRunning
in interface StepInterface
running
- the running flag to setpublic void setStopped(boolean stopped)
setStopped
in interface StepInterface
stopped
- true if the step needs to be stoppedpublic void setSafeStopped(boolean stopped)
setSafeStopped
in interface StepInterface
stopped
- true if the step needs to be safe stoppedpublic int rowsetInputSize()
rowsetInputSize
in interface StepInterface
public int rowsetOutputSize()
rowsetOutputSize
in interface StepInterface
public long getProcessed()
getProcessed
in interface StepInterface
public Map<String,ResultFile> getResultFiles()
getResultFiles
in interface StepInterface
public long getRuntime()
getRuntime
in interface StepInterface
public BaseStepData.StepExecutionStatus getStatus()
getStatus
in interface StepInterface
StepDataInterface
public boolean isPaused()
isPaused
in interface StepInterface
public void identifyErrorOutput()
StepInterface
identifyErrorOutput
in interface StepInterface
public void setPartitioned(boolean partitioned)
setPartitioned
in interface StepInterface
partitioned
- true if this step is partitionedpublic void setRepartitioning(int partitioningMethod)
setRepartitioning
in interface StepInterface
partitioningMethod
- The repartitioning methodpublic boolean canProcessOneRow()
StepInterface
For example, if a step has no input records but needs at least one to function, it will return false.
canProcessOneRow
in interface StepInterface
public boolean isWaitingForData()
public void setWaitingForData(boolean waitingForData)
public boolean isIdle()
public boolean isPassingData()
public void setPassingData(boolean passingData)
public void batchComplete() throws KettleException
StepInterface
batchComplete
in interface StepInterface
KettleException
- In case an error occurs during the processing of the batch of rows.public void setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)
StepInterface
setMetaStore
in interface StepInterface
metaStore
- The metastore to usepublic org.pentaho.metastore.api.IMetaStore getMetaStore()
getMetaStore
in interface StepInterface
public void setRepository(Repository repository)
setRepository
in interface StepInterface
repository
- The repository used by the step to load and reference Kettle objects with at runtimepublic Repository getRepository()
getRepository
in interface StepInterface
public int getCurrentInputRowSetNr()
getCurrentInputRowSetNr
in interface StepInterface
public void setCurrentOutputRowSetNr(int index)
setCurrentOutputRowSetNr
in interface StepInterface
index
- Sets the index of the active (current) output row set to use.public int getCurrentOutputRowSetNr()
getCurrentOutputRowSetNr
in interface StepInterface
public void setCurrentInputRowSetNr(int index)
setCurrentInputRowSetNr
in interface StepInterface
index
- Sets the index of the active (current) input row set to use.Copyright © 2018 Hitachi Vantara. All rights reserved.