|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesModDummy
public class ScriptValuesModDummy
Dummy class used for test().
Constructor Summary | |
---|---|
ScriptValuesModDummy(RowMetaInterface inputRowMeta,
RowMetaInterface outputRowMeta)
|
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 |
copyVariablesFrom(VariableSpace space)
Copy the variables from another space, without initializing with the defaults. |
void |
dispose(StepMetaInterface sii,
StepDataInterface sdi)
Dispose of this step: close files, empty logs, etc. |
String |
environmentSubstitute(String aString)
Substitute the string using the current variable space. |
String[] |
environmentSubstitute(String[] string)
Replaces environment variables in an array of strings. |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
This method returns a boolean for the new variable check boxes. |
int |
getCopy()
|
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()
|
RowMetaInterface |
getOutputRowMeta()
|
List<RowSet> |
getOutputRowSets()
|
VariableSpace |
getParentVariableSpace()
Get the parent of the variable space. |
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()
|
TransMeta |
getTransMeta()
|
String |
getVariable(String variableName)
Get the value of a variable. |
String |
getVariable(String variableName,
String defaultValue)
Get the value of a variable with a default in case the variable is not found. |
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)
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()). |
void |
injectVariables(Map<String,String> prop)
Inject variables. |
boolean |
isAlive()
|
boolean |
isIdle()
|
boolean |
isMapping()
|
boolean |
isPartitioned()
|
boolean |
isPassingData()
|
boolean |
isPaused()
|
boolean |
isRunning()
|
boolean |
isStopped()
|
boolean |
isUsingThreadPriorityManagment()
|
boolean |
isWaitingForData()
|
String[] |
listVariables()
List the variables (not the values) that are currently in the variable space. |
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 |
setErrors(long errors)
Sets the number of errors |
void |
setLinesRejected(long linesRejected)
|
void |
setOutputDone()
Signal output done to destination steps |
void |
setParentVariableSpace(VariableSpace parent)
Set the parent variable space |
void |
setPartitioned(boolean partitioned)
|
void |
setPartitionID(String partitionID)
|
void |
setPassingData(boolean passingData)
|
void |
setRepartitioning(int partitioningMethod)
|
void |
setRunning(boolean running)
Flag the step as running or not |
void |
setStopped(boolean stopped)
|
void |
setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
|
void |
setVariable(String variableName,
String variableValue)
Sets a variable in the Kettle Variables list. |
void |
setWaitingForData(boolean waitingForData)
|
void |
shareVariablesWith(VariableSpace space)
Share a variable space from another variable space. |
void |
start()
|
void |
stopAll()
Flags all rowsets as stopped/completed/finished. |
void |
stopRunning(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Stop running operations... |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptValuesModDummy(RowMetaInterface inputRowMeta, RowMetaInterface outputRowMeta)
Method Detail |
---|
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 steps
KettleException
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)
VariableSpace
copyVariablesFrom
in interface VariableSpace
space
- the space to copy the variables from.public String environmentSubstitute(String aString)
VariableSpace
environmentSubstitute
in interface VariableSpace
aString
- The string to substitute.
public String[] environmentSubstitute(String[] string)
VariableSpace
environmentSubstitute
in interface VariableSpace
string
- The array of strings that wants its variables to be replaced.
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
VariableSpace
getBooleanValueOfVariable
in interface VariableSpace
variableName
- The variable to look up.defaultValue
- The default value to return.
static method ValueMeta.convertStringToBoolean()
public VariableSpace getParentVariableSpace()
VariableSpace
getParentVariableSpace
in interface VariableSpace
public void setParentVariableSpace(VariableSpace parent)
VariableSpace
setParentVariableSpace
in interface VariableSpace
parent
- The parent variable space to setpublic String getVariable(String variableName, String defaultValue)
VariableSpace
getVariable
in interface VariableSpace
variableName
- The name of the variabledefaultValue
- The default value in case the variable could not be
found
public String getVariable(String variableName)
VariableSpace
getVariable
in interface VariableSpace
variableName
- The name of the variable
public void initializeVariablesFrom(VariableSpace parent)
VariableSpace
initializeVariablesFrom
in interface VariableSpace
parent
- the parent to start from, or null if root.public void injectVariables(Map<String,String> prop)
VariableSpace
injectVariables
in interface VariableSpace
prop
- Properties object containing key-value pairs.public String[] listVariables()
VariableSpace
listVariables
in interface VariableSpace
public void setVariable(String variableName, String variableValue)
VariableSpace
setVariable
in interface VariableSpace
variableName
- The name of the variable to setvariableValue
- The value of the variable to set. If the
variableValue is null, the variable is cleared
from the list.public void shareVariablesWith(VariableSpace space)
VariableSpace
shareVariablesWith
in interface VariableSpace
space
- Variable space to be shared.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 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
public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |