|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.trans.step.BaseStep
public class BaseStep
This class can be extended for the actual row processing of the implemented step.
The implementing class can rely mostly on the base class, and has only three important methods it implements itself. The three methods implement the step lifecycle during transformation execution: initialization, row processing, and clean-up.
public boolean init(...)Every step is given the opportunity to do one-time initialization tasks like opening files or establishing database connections. For any steps derived from BaseStep it is mandatory that super.init() is called to ensure correct behavior. The method must return true in case the step initialized correctly, it must returned false if there was an initialization error. PDI will abort the execution of a transformation in case any step returns false upon initialization.
public boolean processRow(...)A typical implementation queries for incoming input rows by calling getRow(), which blocks and returns a row object or null in case there is no more input. If there was an input row, the step does the necessary row processing and calls putRow() to pass the row on to the next step. If there are no more rows, the step must call setOutputDone() and return false.
Formally the method must conform to the following rules:
public void dispose(...)Steps are required to deallocate resources allocated during init() or subsequent row processing. This typically means to clear all fields of the StepDataInterface object, and to ensure that all open files or connections are properly closed. For any steps derived from BaseStep it is mandatory that super.dispose() is called to ensure correct deallocation.
Field Summary | |
---|---|
boolean |
first
if true then the row being processed is the first row |
long |
linesInput
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesOutput
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesRead
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesRejected
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesSkipped
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesUpdated
Deprecated. please use the supplied getters, setters and increment/decrement methods |
long |
linesWritten
Deprecated. please use the supplied getters, setters and increment/decrement methods |
boolean |
terminator
|
List<Object[]> |
terminator_rows
|
Constructor Summary | |
---|---|
BaseStep(StepMeta stepMeta,
StepDataInterface stepDataInterface,
int copyNr,
TransMeta transMeta,
Trans trans)
This is the base step that forms that basis for all steps. |
Method Summary | |
---|---|
void |
addResultFile(ResultFile resultFile)
Adds the result file. |
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. |
RowMetaAndData |
buildLog(String sname,
int copynr,
long lines_read,
long lines_written,
long lines_updated,
long lines_skipped,
long errors,
Date start_date,
Date end_date)
Builds the log. |
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. |
static void |
closeQuietly(Closeable cl)
Close quietly. |
void |
copyVariablesFrom(VariableSpace space)
Copy the variables from another space, without initializing with the defaults. |
long |
decrementLinesRead()
Decrements the number of lines read from previous steps by one |
long |
decrementLinesWritten()
Decrements the number of lines written to next steps by one |
void |
dispatch()
This method finds the surrounding steps and rowsets for this base step. |
void |
dispose(StepMetaInterface smi,
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[] aString)
Replaces environment variables in an array of strings. |
RowSet |
findInputRowSet(String sourceStep)
Find input row set. |
RowSet |
findInputRowSet(String from,
int fromcopy,
String to,
int tocopy)
Find input row set. |
RowSet |
findOutputRowSet(String targetStep)
Find output row set. |
RowSet |
findOutputRowSet(String from,
int fromcopy,
String to,
int tocopy)
Find an output rowset in a running transformation. |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
This method returns a boolean for the new variable check boxes. |
int |
getClusterSize()
Returns the cluster size. |
String |
getContainerObjectId()
Returns the container object ID. |
int |
getCopy()
|
Trans |
getDispatcher()
Gets the dispatcher. |
RowMetaInterface |
getErrorRowMeta()
|
long |
getErrors()
Get the number of errors |
String |
getFilename()
Gets the filename. |
RowMetaInterface |
getInputRowMeta()
|
List<RowSet> |
getInputRowSets()
|
long |
getLinesInput()
|
long |
getLinesOutput()
|
long |
getLinesRead()
|
long |
getLinesRejected()
|
long |
getLinesSkipped()
|
long |
getLinesUpdated()
|
long |
getLinesWritten()
|
LogChannelInterface |
getLogChannel()
|
String |
getLogChannelId()
Gets the log channel id. |
static RowMetaInterface |
getLogFields(String comm)
Gets the log fields. |
LogLevel |
getLogLevel()
Gets the logging level of the log channel of this logging object. |
int |
getNextClassNr()
Gets the next class nr. |
String |
getObjectCopy()
Gets a string identifying a copy in a series of steps. |
ObjectId |
getObjectId()
Gets the object id in a repository. |
String |
getObjectName()
Gets the object name. |
ObjectRevision |
getObjectRevision()
Gets the objects revision in a repository. |
LoggingObjectType |
getObjectType()
Gets the object type. |
List<RowSet> |
getOutputRowSets()
|
LoggingObjectInterface |
getParent()
Gets the parent. |
VariableSpace |
getParentVariableSpace()
Get the parent of the variable space. |
String |
getPartitionID()
|
Map<String,BlockingRowSet> |
getPartitionTargets()
|
RowMetaInterface |
getPreviewRowMeta()
|
long |
getProcessed()
|
Date |
getRegistrationDate()
Returns the registration date |
List<RemoteStep> |
getRemoteInputSteps()
Gets the remote input steps. |
List<RemoteStep> |
getRemoteOutputSteps()
Gets the remote output steps. |
int |
getRepartitioning()
|
RepositoryDirectory |
getRepositoryDirectory()
Gets the repository directory. |
Map<String,ResultFile> |
getResultFiles()
|
Object[] |
getRow()
In case of getRow, we receive data from previous steps through the input rowset. |
Object[] |
getRowFrom(RowSet rowSet)
Gets the row from. |
List<RowListener> |
getRowListeners()
|
long |
getRuntime()
|
List<ServerSocket> |
getServerSockets()
Returns the serverSockets. |
int |
getSlaveNr()
Returns the unique slave number in the cluster. |
SocketRepository |
getSocketRepository()
Retutns the socket repository. |
BaseStepData.StepExecutionStatus |
getStatus()
|
String |
getStatusDescription()
Gets the status description. |
StepDataInterface |
getStepDataInterface()
|
String |
getStepID()
|
List<StepListener> |
getStepListeners()
Returns the step listeners. |
StepMeta |
getStepMeta()
|
StepMetaInterface |
getStepMetaInterface()
|
String |
getStepname()
Get the name of the step. |
Trans |
getTrans()
|
TransMeta |
getTransMeta()
|
String |
getTypeId()
Returns the step ID via the getStepID() method call. |
int |
getUniqueStepCountAcrossSlaves()
Returns the number of unique steps across all slave servers. |
int |
getUniqueStepNrAcrossSlaves()
Returns a unique step number across all slave servers: slaveNr * nrCopies + copyNr. |
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. |
long |
incrementLinesInput()
Increments the number of lines read from an input source: database, file, socket, etc. |
long |
incrementLinesOutput()
Increments the number of lines written to an output target: database, file, socket, etc. |
long |
incrementLinesRead()
Increments the number of lines read from previous steps by one |
long |
incrementLinesRejected()
Increments the number of lines rejected to an error handling step |
long |
incrementLinesSkipped()
Increments the number of lines skipped |
long |
incrementLinesUpdated()
Increments the number of lines updated in an output target: database, file, socket, etc. |
long |
incrementLinesWritten()
Increments the number of lines written to next steps by one |
boolean |
init(StepMetaInterface smi,
StepDataInterface sdi)
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. |
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 |
isBasic()
Checks if is basic. |
boolean |
isDebug()
Checks if is debug. |
boolean |
isDetailed()
Checks if is detailed. |
boolean |
isDistributed()
|
boolean |
isInitialising()
Checks if is initialising. |
boolean |
isMapping()
|
boolean |
isPartitioned()
|
boolean |
isPaused()
|
boolean |
isRowLevel()
Checks if is row level. |
boolean |
isRunning()
|
boolean |
isStopped()
|
boolean |
isUsingThreadPriorityManagment()
Retusn true if we are actively managing priorities of step threads. |
String[] |
listVariables()
List the variables (not the values) that are currently in the variable space. |
void |
logBasic(String message)
Log basic. |
void |
logBasic(String message,
Object... arguments)
Log basic. |
void |
logDebug(String message)
Log debug. |
void |
logDebug(String message,
Object... arguments)
Log debug. |
void |
logDetailed(String message)
Log detailed. |
void |
logDetailed(String message,
Object... arguments)
Log detailed. |
void |
logError(String message)
Log error. |
void |
logError(String message,
Object... arguments)
Log error. |
void |
logError(String message,
Throwable e)
Log error. |
void |
logMinimal(String message)
Log minimal. |
void |
logMinimal(String message,
Object... arguments)
Log minimal. |
void |
logRowlevel(String message)
Log rowlevel. |
void |
logRowlevel(String message,
Object... arguments)
Log rowlevel. |
void |
logSummary()
Log summary. |
void |
markStart()
Mark the start time of the step. |
void |
markStop()
Mark the end time of the step. |
boolean |
outputIsDone()
Output is done. |
void |
pauseRunning()
Pause a running step |
boolean |
processRow(StepMetaInterface smi,
StepDataInterface sdi)
Perform the equivalent of processing one row. |
void |
putError(RowMetaInterface rowMeta,
Object[] row,
long nrErrors,
String errorDescriptions,
String fieldNames,
String errorCodes)
Put error. |
void |
putRow(RowMetaInterface rowMeta,
Object[] row)
putRow is used to copy a row, to the alternate rowset(s) This should get priority over everything else! (synchronized) If distribute is true, a row is copied only once to the output rowsets, otherwise copies are sent to each rowset! |
void |
putRowTo(RowMetaInterface rowMeta,
Object[] row,
RowSet rowSet)
putRowTo is used to put a row in a certain specific RowSet. |
void |
removeRowListener(RowListener rowListener)
Remove a rowlistener from this step. |
void |
resumeRunning()
Resume a running step |
int |
rowsetInputSize()
|
int |
rowsetOutputSize()
|
static void |
safeModeChecking(RowMetaInterface referenceRowMeta,
RowMetaInterface rowMeta)
Safe mode checking. |
void |
setCarteObjectId(String containerObjectId)
Sets the container object ID. |
void |
setCopy(int cop)
Sets the copy. |
void |
setDistributed(boolean distributed)
|
void |
setErrorRowMeta(RowMetaInterface errorRowMeta)
|
void |
setErrors(long e)
Sets the number of errors |
void |
setInputRowMeta(RowMetaInterface rowMeta)
|
void |
setInputRowSets(List<RowSet> inputRowSets)
|
void |
setInternalVariables()
Sets the internal variables. |
void |
setLinesInput(long newLinesInputValue)
|
void |
setLinesOutput(long newLinesOutputValue)
|
void |
setLinesRead(long newLinesReadValue)
|
void |
setLinesRejected(long newLinesRejectedValue)
|
void |
setLinesSkipped(long newLinesSkippedValue)
|
void |
setLinesUpdated(long newLinesUpdatedValue)
|
void |
setLinesWritten(long newLinesWrittenValue)
|
void |
setLogLevel(LogLevel logLevel)
Sets the log level. |
void |
setOutputDone()
Signal output done to destination steps |
void |
setOutputRowSets(List<RowSet> outputRowSets)
|
void |
setParentVariableSpace(VariableSpace parent)
Set the parent variable space |
void |
setPartitioned(boolean partitioned)
|
void |
setPartitionID(String partitionID)
|
void |
setPartitionTargets(Map<String,BlockingRowSet> partitionTargets)
|
void |
setPaused(AtomicBoolean paused)
Sets the paused. |
void |
setPaused(boolean paused)
Sets the paused. |
void |
setPreviewRowMeta(RowMetaInterface previewRowMeta)
|
void |
setRepartitioning(int repartitioning)
|
void |
setRunning(boolean running)
Flag the step as running or not |
void |
setServerSockets(List<ServerSocket> serverSockets)
|
void |
setSocketRepository(SocketRepository socketRepository)
Sets the socket repository. |
void |
setStepDataInterface(StepDataInterface stepDataInterface)
|
void |
setStepListeners(List<StepListener> stepListeners)
Sets the step listeners. |
void |
setStepMeta(StepMeta stepMeta)
|
void |
setStepMetaInterface(StepMetaInterface stepMetaInterface)
|
void |
setStepname(String stepname)
Sets the stepname. |
void |
setStopped(boolean stopped)
|
void |
setTransMeta(TransMeta transMeta)
|
void |
setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
Set to true to actively manage priorities of step threads. |
void |
setVariable(String variableName,
String variableValue)
Sets a variable in the Kettle Variables list. |
void |
shareVariablesWith(VariableSpace space)
Share a variable space from another variable space. |
void |
stopAll()
Flags all rowsets as stopped/completed/finished. |
void |
stopRunning()
Deprecated. |
void |
stopRunning(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Perform actions to stop a running step. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public long linesRead
public long linesWritten
public long linesInput
public long linesOutput
public long linesUpdated
public long linesSkipped
public long linesRejected
public boolean first
public boolean terminator
public List<Object[]> terminator_rows
Constructor Detail |
---|
public BaseStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)
stepMeta
- The StepMeta object to run.stepDataInterface
- the data object to store temporary data, database connections, caches, result sets,
hashtables etc.copyNr
- The copynumber for this step.transMeta
- The TransInfo of which the step stepMeta is part of.trans
- The (running) transformation to obtain information shared among the steps.Method Detail |
---|
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
StepInterface
init
in interface StepInterface
smi
- The metadata to work withsdi
- The data to initializepublic void dispose(StepMetaInterface smi, StepDataInterface sdi)
StepInterface
dispose
in interface StepInterface
smi
- The metadata to work withsdi
- The data to dispose ofpublic void cleanup()
StepInterface
cleanup
in interface StepInterface
public long getProcessed()
getProcessed
in interface StepInterface
public void setCopy(int cop)
cop
- the new copypublic int getCopy()
getCopy
in interface StepInterface
public long getErrors()
StepInterface
getErrors
in interface StepInterface
public void setErrors(long e)
StepInterface
setErrors
in interface StepInterface
e
- the number of errors to setpublic long getLinesRead()
getLinesRead
in interface StepInterface
public long incrementLinesRead()
public long decrementLinesRead()
public void setLinesRead(long newLinesReadValue)
newLinesReadValue
- the new number of lines read from previous stepspublic long getLinesInput()
getLinesInput
in interface StepInterface
public long incrementLinesInput()
public void setLinesInput(long newLinesInputValue)
newLinesInputValue
- the new number of lines read from an input source: database, file, socket, etc.public long getLinesOutput()
getLinesOutput
in interface StepInterface
public long incrementLinesOutput()
public void setLinesOutput(long newLinesOutputValue)
newLinesOutputValue
- the new number of lines written to an output target: database, file, socket, etc.public long getLinesWritten()
getLinesWritten
in interface StepInterface
public long incrementLinesWritten()
public long decrementLinesWritten()
public void setLinesWritten(long newLinesWrittenValue)
newLinesWrittenValue
- the new number of lines written to next stepspublic long getLinesUpdated()
getLinesUpdated
in interface StepInterface
public long incrementLinesUpdated()
public void setLinesUpdated(long newLinesUpdatedValue)
newLinesOutputValue
- the new number of lines updated in an output target: database, file, socket, etc.public long getLinesRejected()
getLinesRejected
in interface StepInterface
public long incrementLinesRejected()
public void setLinesRejected(long newLinesRejectedValue)
setLinesRejected
in interface StepInterface
newLinesRejectedValue
- lines number of lines rejected to an error handling steppublic long getLinesSkipped()
public long incrementLinesSkipped()
public void setLinesSkipped(long newLinesSkippedValue)
newLinesSkippedValue
- lines number of lines skippedpublic String getStepname()
StepInterface
getStepname
in interface StepInterface
public void setStepname(String stepname)
stepname
- the new stepnamepublic Trans getDispatcher()
public String getStatusDescription()
public StepMetaInterface getStepMetaInterface()
public void setStepMetaInterface(StepMetaInterface stepMetaInterface)
stepMetaInterface
- The stepMetaInterface to set.public StepDataInterface getStepDataInterface()
public void setStepDataInterface(StepDataInterface stepDataInterface)
stepDataInterface
- The stepDataInterface to set.public StepMeta getStepMeta()
getStepMeta
in interface StepInterface
public void setStepMeta(StepMeta stepMeta)
stepMeta
- The stepMeta to set.public TransMeta getTransMeta()
public void setTransMeta(TransMeta transMeta)
transMeta
- The transMeta to set.public Trans getTrans()
getTrans
in interface StepInterface
public void putRow(RowMetaInterface rowMeta, Object[] row) throws KettleStepException
putRow
in interface StepInterface
row
- The row to put to the destination rowset(s).rowMeta
- The row to send to the destinations steps
KettleStepException
public void putRowTo(RowMetaInterface rowMeta, Object[] row, RowSet rowSet) throws KettleStepException
rowMeta
- The row meta-data to put to the destination RowSet.row
- the data to put in the RowSetrowSet
- the RoWset to put the row into.
KettleStepException
- In case something unexpected goes wrongpublic void putError(RowMetaInterface rowMeta, Object[] row, long nrErrors, String errorDescriptions, String fieldNames, String errorCodes) throws KettleStepException
rowMeta
- the row metarow
- the rownrErrors
- the nr errorserrorDescriptions
- the error descriptionsfieldNames
- the field nameserrorCodes
- the error codes
KettleStepException
- the kettle step exceptionpublic Object[] getRow() throws KettleException
getRow
in interface StepInterface
KettleException
public void identifyErrorOutput()
StepInterface
identifyErrorOutput
in interface StepInterface
public static void safeModeChecking(RowMetaInterface referenceRowMeta, RowMetaInterface rowMeta) throws KettleRowException
referenceRowMeta
- the reference row metarowMeta
- the row meta
KettleRowException
- the kettle row exceptionpublic Object[] getRowFrom(RowSet rowSet) throws KettleStepException
rowSet
- the row set
KettleStepException
- the kettle step exceptionpublic RowSet findInputRowSet(String sourceStep) throws KettleStepException
sourceStep
- the source step
KettleStepException
- the kettle step exceptionpublic RowSet findInputRowSet(String from, int fromcopy, String to, int tocopy)
from
- the fromfromcopy
- the fromcopyto
- the totocopy
- the tocopy
public RowSet findOutputRowSet(String targetStep) throws KettleStepException
targetStep
- the target step
KettleStepException
- the kettle step exceptionpublic RowSet findOutputRowSet(String from, int fromcopy, String to, int tocopy)
from
- fromcopy
- to
- tocopy
-
public void setOutputDone()
StepInterface
setOutputDone
in interface StepInterface
public void dispatch()
public boolean isBasic()
public boolean isDetailed()
public boolean isDebug()
public boolean isRowLevel()
public void logMinimal(String message)
message
- the messagepublic void logMinimal(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logBasic(String message)
message
- the messagepublic void logBasic(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDetailed(String message)
message
- the messagepublic void logDetailed(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDebug(String message)
message
- the messagepublic void logDebug(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logRowlevel(String message)
message
- the messagepublic void logRowlevel(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logError(String message)
message
- the messagepublic void logError(String message, Throwable e)
message
- the messagee
- the epublic void logError(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic int getNextClassNr()
public boolean outputIsDone()
public void stopAll()
StepInterface
stopAll
in interface StepInterface
public boolean isStopped()
isStopped
in interface StepInterface
public boolean isRunning()
isRunning
in interface StepInterface
public boolean isPaused()
isPaused
in interface StepInterface
public void setStopped(boolean stopped)
setStopped
in interface StepInterface
stopped
- true if the step needs to be stoppedpublic void setRunning(boolean running)
StepInterface
setRunning
in interface StepInterface
running
- the running flag to setpublic void pauseRunning()
StepInterface
pauseRunning
in interface StepInterface
public void resumeRunning()
StepInterface
resumeRunning
in interface StepInterface
public void setPaused(boolean paused)
paused
- the new pausedpublic void setPaused(AtomicBoolean paused)
paused
- the new pausedpublic boolean isInitialising()
public void markStart()
StepInterface
markStart
in interface StepInterface
public void setInternalVariables()
public void markStop()
StepInterface
markStop
in interface StepInterface
public long getRuntime()
getRuntime
in interface StepInterface
public RowMetaAndData buildLog(String sname, int copynr, long lines_read, long lines_written, long lines_updated, long lines_skipped, long errors, Date start_date, Date end_date)
sname
- the snamecopynr
- the copynrlines_read
- the lines_readlines_written
- the lines_writtenlines_updated
- the lines_updatedlines_skipped
- the lines_skippederrors
- the errorsstart_date
- the start_dateend_date
- the end_date
public static final RowMetaInterface getLogFields(String comm)
comm
- the comm
public String toString()
toString
in class Object
public int rowsetOutputSize()
rowsetOutputSize
in interface StepInterface
public int rowsetInputSize()
rowsetInputSize
in interface StepInterface
public void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws KettleException
stopRunning
in interface StepInterface
stepDataInterface
- The interface to the step data containing the connections, resultsets, open files, etc.stepMetaInterface
- The metadata that might be needed by the step to stop running.
KettleException
- in case something goes wrongpublic void stopRunning()
public void logSummary()
public String getStepID()
getStepID
in interface StepInterface
public List<RowSet> getInputRowSets()
getInputRowSets
in interface StepInterface
public void setInputRowSets(List<RowSet> inputRowSets)
inputRowSets
- The inputRowSets to set.public List<RowSet> getOutputRowSets()
getOutputRowSets
in interface StepInterface
public void setOutputRowSets(List<RowSet> outputRowSets)
outputRowSets
- The outputRowSets to set.public boolean isDistributed()
public void setDistributed(boolean distributed)
distributed
- The distributed to set.public void addRowListener(RowListener rowListener)
StepInterface
addRowListener
in interface StepInterface
rowListener
- the rowlistener to addpublic void removeRowListener(RowListener rowListener)
StepInterface
removeRowListener
in interface StepInterface
rowListener
- the rowlistener to removepublic List<RowListener> getRowListeners()
getRowListeners
in interface StepInterface
public void addResultFile(ResultFile resultFile)
resultFile
- the result filepublic Map<String,ResultFile> getResultFiles()
getResultFiles
in interface StepInterface
public BaseStepData.StepExecutionStatus getStatus()
getStatus
in interface StepInterface
StepDataInterface
public String getPartitionID()
getPartitionID
in interface StepInterface
public void setPartitionID(String partitionID)
setPartitionID
in interface StepInterface
partitionID
- the partitionID to setpublic Map<String,BlockingRowSet> getPartitionTargets()
public void setPartitionTargets(Map<String,BlockingRowSet> partitionTargets)
partitionTargets
- the partitionTargets to setpublic int getRepartitioning()
public void setRepartitioning(int repartitioning)
setRepartitioning
in interface StepInterface
repartitioning
- the repartitioning type to setpublic boolean isPartitioned()
isPartitioned
in interface StepInterface
public void setPartitioned(boolean partitioned)
setPartitioned
in interface StepInterface
partitioned
- the partitioned to setpublic RowMetaInterface getInputRowMeta()
public void setInputRowMeta(RowMetaInterface rowMeta)
rowMeta
- the rowMeta to setpublic RowMetaInterface getErrorRowMeta()
public void setErrorRowMeta(RowMetaInterface errorRowMeta)
errorRowMeta
- the errorRowMeta to setpublic RowMetaInterface getPreviewRowMeta()
public void setPreviewRowMeta(RowMetaInterface previewRowMeta)
previewRowMeta
- the previewRowMeta to setpublic 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[] aString)
VariableSpace
environmentSubstitute
in interface VariableSpace
aString
- The array of strings that wants its variables to be replaced.
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 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 void initializeVariablesFrom(VariableSpace parent)
VariableSpace
initializeVariablesFrom
in interface VariableSpace
parent
- the parent to start from, or null if root.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 void injectVariables(Map<String,String> prop)
VariableSpace
injectVariables
in interface VariableSpace
prop
- Properties object containing key-value pairs.public String getTypeId()
public int getSlaveNr()
public int getClusterSize()
public int getUniqueStepNrAcrossSlaves()
public int getUniqueStepCountAcrossSlaves()
public List<ServerSocket> getServerSockets()
public void setServerSockets(List<ServerSocket> serverSockets)
serverSockets
- the serverSockets to setpublic void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
setUsingThreadPriorityManagment
in interface StepInterface
usingThreadPriorityManagment
- set to true to actively manage priorities of step threadspublic boolean isUsingThreadPriorityManagment()
isUsingThreadPriorityManagment
in interface StepInterface
public void initBeforeStart() throws KettleStepException
initBeforeStart
in interface StepInterface
KettleStepException
- In case there is an errorpublic List<StepListener> getStepListeners()
public void setStepListeners(List<StepListener> stepListeners)
stepListeners
- the stepListeners to setpublic 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 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 void addStepListener(StepListener stepListener)
StepInterface
addStepListener
in interface StepInterface
stepListener
- The listener to add to the steppublic boolean isMapping()
isMapping
in interface StepInterface
public SocketRepository getSocketRepository()
public void setSocketRepository(SocketRepository socketRepository)
socketRepository
- the socketRepository to setpublic String getObjectName()
LoggingObjectInterface
getObjectName
in interface LoggingObjectInterface
public LogChannelInterface getLogChannel()
getLogChannel
in interface HasLogChannelInterface
getLogChannel
in interface StepInterface
public String getFilename()
LoggingObjectInterface
getFilename
in interface LoggingObjectInterface
public String getLogChannelId()
LoggingObjectInterface
getLogChannelId
in interface LoggingObjectInterface
public ObjectId getObjectId()
LoggingObjectInterface
getObjectId
in interface LoggingObjectInterface
public ObjectRevision getObjectRevision()
LoggingObjectInterface
getObjectRevision
in interface LoggingObjectInterface
public LoggingObjectType getObjectType()
LoggingObjectInterface
getObjectType
in interface LoggingObjectInterface
public LoggingObjectInterface getParent()
LoggingObjectInterface
getParent
in interface LoggingObjectInterface
public RepositoryDirectory getRepositoryDirectory()
LoggingObjectInterface
getRepositoryDirectory
in interface LoggingObjectInterface
public String getObjectCopy()
LoggingObjectInterface
getObjectCopy
in interface LoggingObjectInterface
public LogLevel getLogLevel()
LoggingObjectInterface
getLogLevel
in interface LoggingObjectInterface
public void setLogLevel(LogLevel logLevel)
logLevel
- the new log levelpublic static void closeQuietly(Closeable cl)
cl
- the object that can be closed.public String getContainerObjectId()
getContainerObjectId
in interface LoggingObjectInterface
public void setCarteObjectId(String containerObjectId)
containerObjectId
- the containerObjectId to setpublic void batchComplete() throws KettleException
StepInterface
batchComplete
in interface StepInterface
KettleException
- In case an error occurs during the processing of the batch of rows.public List<RemoteStep> getRemoteInputSteps()
public List<RemoteStep> getRemoteOutputSteps()
public Date getRegistrationDate()
getRegistrationDate
in interface LoggingObjectInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |