public class BaseStep extends Object implements org.pentaho.di.core.variables.VariableSpace, StepInterface, org.pentaho.di.core.logging.LoggingObjectInterface, org.pentaho.di.core.ExtensionDataInterface
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.
| 限定符和类型 | 字段和说明 |
|---|---|
protected long |
deadLockCounter
Keeps track of the number of rows read for input deadlock verification.
|
protected Map<String,Object> |
extensionDataMap |
boolean |
first
if true then the row being processed is the first row
|
long |
linesInput
已过时。
|
long |
linesOutput
已过时。
|
long |
linesRead
已过时。
|
long |
linesRejected
已过时。
|
long |
linesSkipped
已过时。
|
long |
linesUpdated
已过时。
|
long |
linesWritten
已过时。
|
protected org.pentaho.di.core.logging.LogChannelInterface |
log |
protected org.pentaho.metastore.api.IMetaStore |
metaStore
The metastore that the step uses to load external elements from
|
protected Repository |
repository
The repository used by the step to load and reference Kettle objects with at runtime
|
protected List<RowListener> |
rowListeners
The list of RowListener interfaces
|
protected AtomicBoolean |
safeStopped |
boolean |
terminator |
List<Object[]> |
terminator_rows |
protected org.pentaho.di.core.variables.VariableSpace |
variables |
| 构造器和说明 |
|---|
BaseStep(StepMeta stepMeta,
StepDataInterface stepDataInterface,
int copyNr,
TransMeta transMeta,
Trans trans)
This is the base step that forms that basis for all steps.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addResultFile(org.pentaho.di.core.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 |
addRowSetToInputRowSets(org.pentaho.di.core.RowSet rowSet) |
void |
addRowSetToOutputRowSets(org.pentaho.di.core.RowSet rowSet) |
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.
|
org.pentaho.di.core.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.
|
protected boolean |
checkFeedback(long lines)
Check feedback.
|
void |
cleanup()
Call this method typically, after ALL the slave transformations in a clustered run have finished.
|
protected void |
clearInputRowSets() |
protected void |
clearOutputRowSets() |
static void |
closeQuietly(Closeable cl)
Close quietly.
|
void |
copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space) |
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) |
String[] |
environmentSubstitute(String[] aString) |
String |
fieldSubstitute(String aString,
org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] rowData) |
org.pentaho.di.core.RowSet |
findInputRowSet(String sourceStep)
Find input row set.
|
org.pentaho.di.core.RowSet |
findInputRowSet(String from,
int fromcopy,
String to,
int tocopy)
Find input row set.
|
org.pentaho.di.core.RowSet |
findOutputRowSet(String targetStep)
Find output row set.
|
org.pentaho.di.core.RowSet |
findOutputRowSet(String from,
int fromcopy,
String to,
int tocopy)
Find an output rowset in a running transformation.
|
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue) |
int |
getClusterSize()
Returns the cluster size.
|
String |
getContainerObjectId()
Returns the container object ID.
|
int |
getCopy() |
int |
getCurrentInputRowSetNr() |
int |
getCurrentOutputRowSetNr() |
Trans |
getDispatcher()
Gets the dispatcher.
|
org.pentaho.di.core.row.RowMetaInterface |
getErrorRowMeta() |
long |
getErrors()
Get the number of errors
|
Map<String,Object> |
getExtensionDataMap() |
String |
getFilename() |
protected org.pentaho.di.core.RowSet |
getFirstInputRowSet() |
org.pentaho.di.core.row.RowMetaInterface |
getInputRowMeta() |
List<org.pentaho.di.core.RowSet> |
getInputRowSets() |
long |
getLinesInput() |
long |
getLinesOutput() |
long |
getLinesRead() |
long |
getLinesRejected() |
long |
getLinesSkipped() |
long |
getLinesUpdated() |
long |
getLinesWritten() |
org.pentaho.di.core.logging.LogChannelInterface |
getLogChannel() |
String |
getLogChannelId() |
static org.pentaho.di.core.row.RowMetaInterface |
getLogFields(String comm)
Gets the log fields.
|
org.pentaho.di.core.logging.LogLevel |
getLogLevel() |
org.pentaho.metastore.api.IMetaStore |
getMetaStore() |
int |
getNextClassNr()
Gets the next class nr.
|
String |
getObjectCopy() |
org.pentaho.di.repository.ObjectId |
getObjectId() |
String |
getObjectName() |
org.pentaho.di.repository.ObjectRevision |
getObjectRevision() |
org.pentaho.di.core.logging.LoggingObjectType |
getObjectType() |
List<org.pentaho.di.core.RowSet> |
getOutputRowSets() |
org.pentaho.di.core.logging.LoggingObjectInterface |
getParent() |
org.pentaho.di.core.variables.VariableSpace |
getParentVariableSpace() |
String |
getPartitionID() |
Map<String,org.pentaho.di.core.BlockingRowSet> |
getPartitionTargets() |
org.pentaho.di.core.row.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() |
Repository |
getRepository() |
org.pentaho.di.repository.RepositoryDirectory |
getRepositoryDirectory() |
Map<String,org.pentaho.di.core.ResultFile> |
getResultFiles() |
Object[] |
getRow()
In case of getRow, we receive data from previous steps through the input rowset.
|
Object[] |
getRowFrom(org.pentaho.di.core.RowSet rowSet)
Gets the row from.
|
RowHandler |
getRowHandler() |
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) |
String |
getVariable(String variableName,
String defaultValue) |
Object[] |
handleGetRowFrom(org.pentaho.di.core.RowSet rowSet) |
void |
handlePutRowTo(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
org.pentaho.di.core.RowSet rowSet) |
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(org.pentaho.di.core.variables.VariableSpace parent) |
void |
injectVariables(Map<String,String> prop) |
boolean |
isBasic()
Checks if is basic.
|
boolean |
isDebug()
Checks if is debug.
|
boolean |
isDetailed()
Checks if is detailed.
|
boolean |
isDistributed() |
boolean |
isForcingSeparateLogging() |
boolean |
isGatheringMetrics() |
boolean |
isInitialising()
Checks if is initialising.
|
boolean |
isMapping() |
boolean |
isPartitioned() |
boolean |
isPaused() |
boolean |
isRowLevel()
Checks if is row level.
|
boolean |
isRunning() |
boolean |
isSafeStopped() |
boolean |
isStopped() |
boolean |
isUsingThreadPriorityManagment()
Retusn true if we are actively managing priorities of step threads.
|
String[] |
listVariables() |
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.
|
protected void |
openRemoteInputStepSocketsOnce()
Opens socket connections to the remote input steps of this step.
|
protected void |
openRemoteOutputStepSocketsOnce()
Opens socket connections to the remote output steps of this 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(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
long nrErrors,
String errorDescriptions,
String fieldNames,
String errorCodes)
Put error.
|
void |
putRow(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row)
putRow is used to copy a row, to the alternate rowset(s) This should get priority over everything else!
|
void |
putRowTo(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
org.pentaho.di.core.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() |
protected void |
safeModeChecking(org.pentaho.di.core.row.RowMetaInterface row)
Safe mode checking.
|
static void |
safeModeChecking(org.pentaho.di.core.row.RowMetaInterface referenceRowMeta,
org.pentaho.di.core.row.RowMetaInterface rowMeta)
Safe mode checking.
|
void |
setCarteObjectId(String containerObjectId)
Sets the container object ID.
|
void |
setCopy(int cop)
Sets the copy.
|
void |
setCurrentInputRowSetNr(int index) |
void |
setCurrentOutputRowSetNr(int index) |
void |
setDistributed(boolean distributed) |
void |
setErrorRowMeta(org.pentaho.di.core.row.RowMetaInterface errorRowMeta) |
void |
setErrors(long e)
Sets the number of errors
|
void |
setForcingSeparateLogging(boolean forcingSeparateLogging) |
void |
setGatheringMetrics(boolean gatheringMetrics) |
void |
setInputRowMeta(org.pentaho.di.core.row.RowMetaInterface rowMeta) |
void |
setInputRowSets(List<org.pentaho.di.core.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(org.pentaho.di.core.logging.LogLevel logLevel)
Sets the log level.
|
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 |
setOutputRowSets(List<org.pentaho.di.core.RowSet> outputRowSets) |
void |
setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent) |
void |
setPartitioned(boolean partitioned) |
void |
setPartitionID(String partitionID) |
void |
setPartitionTargets(Map<String,org.pentaho.di.core.BlockingRowSet> partitionTargets) |
void |
setPaused(AtomicBoolean paused)
Sets the paused.
|
void |
setPaused(boolean paused)
Sets the paused.
|
void |
setPreviewRowMeta(org.pentaho.di.core.row.RowMetaInterface previewRowMeta) |
void |
setRepartitioning(int repartitioning) |
void |
setRepository(Repository repository) |
void |
setRowHandler(RowHandler rowHandler)
RowHandler controls how getRow/putRow are handled.
|
void |
setRunning(boolean running)
Flag the step as running or not
|
void |
setSafeStopped(boolean stopped) |
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) |
void |
shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space) |
void |
stopAll()
Flags all rowsets as stopped/completed/finished.
|
void |
stopRunning()
|
void |
stopRunning(StepMetaInterface stepMetaInterface,
StepDataInterface stepDataInterface)
Perform actions to stop a running step.
|
protected void |
swapFirstInputRowSetIfExists(String stepName) |
String |
toString() |
protected void |
verifyInputDeadLock()
- A step sees that it can't get a new row from input in the step. - Then it verifies that there is more than one
input row set and that at least one is full and at least one is empty. - Then it finds a step in the transformation
(situated before the reader step) which has at least one full and one empty output row set. - If this situation
presents itself and if it happens twice with the same rows read count (meaning: stalled reading step) we throw an
exception.
|
protected void |
waitUntilTransformationIsStarted()
Wait until the transformation is completely running and all threads have been started.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsubStatusesprotected org.pentaho.di.core.variables.VariableSpace variables
protected org.pentaho.di.core.logging.LogChannelInterface log
@Deprecated public long linesRead
getLinesRead(), incrementLinesRead(), or decrementLinesRead()@Deprecated public long linesWritten
getLinesWritten(), incrementLinesWritten(), or decrementLinesWritten()@Deprecated public long linesInput
getLinesInput() or incrementLinesInput()@Deprecated public long linesOutput
getLinesOutput() or incrementLinesOutput()@Deprecated public long linesUpdated
getLinesUpdated() or incrementLinesUpdated()@Deprecated public long linesSkipped
getLinesSkipped() or incrementLinesSkipped()@Deprecated public long linesRejected
getLinesRejected() or incrementLinesRejected()protected AtomicBoolean safeStopped
public boolean first
public boolean terminator
protected List<RowListener> rowListeners
protected long deadLockCounter
protected Repository repository
protected org.pentaho.metastore.api.IMetaStore metaStore
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.public boolean init(StepMetaInterface smi, StepDataInterface sdi)
StepInterfaceinit 在接口中 StepInterfacesmi - The metadata to work withsdi - The data to initializepublic void dispose(StepMetaInterface smi, StepDataInterface sdi)
StepInterfacedispose 在接口中 StepInterfacesmi - The metadata to work withsdi - The data to dispose ofpublic void cleanup()
StepInterfacecleanup 在接口中 StepInterfacepublic long getProcessed()
getProcessed 在接口中 StepInterfacepublic void setCopy(int cop)
cop - the new copypublic int getCopy()
getCopy 在接口中 StepInterfacepublic long getErrors()
StepInterfacegetErrors 在接口中 StepInterfacepublic void setErrors(long e)
StepInterfacesetErrors 在接口中 StepInterfacee - the number of errors to setpublic long getLinesRead()
getLinesRead 在接口中 StepInterfacepublic long incrementLinesRead()
public long decrementLinesRead()
public void setLinesRead(long newLinesReadValue)
newLinesReadValue - the new number of lines read from previous stepspublic long getLinesInput()
getLinesInput 在接口中 StepInterfacepublic 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 在接口中 StepInterfacepublic 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 在接口中 StepInterfacepublic long incrementLinesWritten()
public long decrementLinesWritten()
public void setLinesWritten(long newLinesWrittenValue)
newLinesWrittenValue - the new number of lines written to next stepspublic long getLinesUpdated()
getLinesUpdated 在接口中 StepInterfacepublic long incrementLinesUpdated()
public void setLinesUpdated(long newLinesUpdatedValue)
newLinesUpdatedValue - the new number of lines updated in an output target: database, file, socket, etc.public long getLinesRejected()
getLinesRejected 在接口中 StepInterfacepublic long incrementLinesRejected()
public void setLinesRejected(long newLinesRejectedValue)
setLinesRejected 在接口中 StepInterfacenewLinesRejectedValue - 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()
StepInterfacegetStepname 在接口中 StepInterfacepublic 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 在接口中 StepInterfacepublic 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 在接口中 StepInterfacepublic void putRow(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row)
throws org.pentaho.di.core.exception.KettleStepException
putRow 在接口中 StepInterfacerow - The row to put to the destination rowset(s).rowMeta - The row to send to the destinations stepsorg.pentaho.di.core.exception.KettleStepExceptionpublic void putRowTo(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
org.pentaho.di.core.RowSet rowSet)
throws org.pentaho.di.core.exception.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.org.pentaho.di.core.exception.KettleStepException - In case something unexpected goes wrongpublic void handlePutRowTo(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
org.pentaho.di.core.RowSet rowSet)
throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepExceptionpublic void putError(org.pentaho.di.core.row.RowMetaInterface rowMeta,
Object[] row,
long nrErrors,
String errorDescriptions,
String fieldNames,
String errorCodes)
throws org.pentaho.di.core.exception.KettleStepException
rowMeta - the row metarow - the rownrErrors - the nr errorserrorDescriptions - the error descriptionsfieldNames - the field nameserrorCodes - the error codesorg.pentaho.di.core.exception.KettleStepException - the kettle step exceptionprotected void waitUntilTransformationIsStarted()
public Object[] getRow() throws org.pentaho.di.core.exception.KettleException
getRow 在接口中 StepInterfaceorg.pentaho.di.core.exception.KettleExceptionpublic void setRowHandler(RowHandler rowHandler)
handleGetRow() and handlePutRow(RowMetaInterface, Object[])public RowHandler getRowHandler()
protected void openRemoteInputStepSocketsOnce()
throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepExceptionprotected void openRemoteOutputStepSocketsOnce()
throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepExceptionprotected void safeModeChecking(org.pentaho.di.core.row.RowMetaInterface row)
throws org.pentaho.di.core.exception.KettleRowException
row - the roworg.pentaho.di.core.exception.KettleRowException - the kettle row exceptionpublic void identifyErrorOutput()
StepInterfaceidentifyErrorOutput 在接口中 StepInterfacepublic static void safeModeChecking(org.pentaho.di.core.row.RowMetaInterface referenceRowMeta,
org.pentaho.di.core.row.RowMetaInterface rowMeta)
throws org.pentaho.di.core.exception.KettleRowException
referenceRowMeta - the reference row metarowMeta - the row metaorg.pentaho.di.core.exception.KettleRowException - the kettle row exceptionpublic Object[] getRowFrom(org.pentaho.di.core.RowSet rowSet) throws org.pentaho.di.core.exception.KettleStepException
rowSet - the row setorg.pentaho.di.core.exception.KettleStepException - the kettle step exceptionpublic Object[] handleGetRowFrom(org.pentaho.di.core.RowSet rowSet) throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepExceptionprotected void verifyInputDeadLock()
throws org.pentaho.di.core.exception.KettleStepException
org.pentaho.di.core.exception.KettleStepExceptionpublic org.pentaho.di.core.RowSet findInputRowSet(String sourceStep) throws org.pentaho.di.core.exception.KettleStepException
sourceStep - the source steporg.pentaho.di.core.exception.KettleStepException - the kettle step exceptionpublic org.pentaho.di.core.RowSet findInputRowSet(String from, int fromcopy, String to, int tocopy)
from - the fromfromcopy - the fromcopyto - the totocopy - the tocopypublic org.pentaho.di.core.RowSet findOutputRowSet(String targetStep) throws org.pentaho.di.core.exception.KettleStepException
targetStep - the target steporg.pentaho.di.core.exception.KettleStepException - the kettle step exceptionpublic org.pentaho.di.core.RowSet findOutputRowSet(String from, int fromcopy, String to, int tocopy)
from - fromcopy - to - tocopy - public void setOutputDone()
StepInterfacesetOutputDone 在接口中 StepInterfacepublic void dispatch()
Note that all rowsets input and output is already created by transformation itself. So in this place we will look and choose which rowsets will be used by this particular step.
We will collect all input rowsets and output rowsets so step will be able to read input data, and write to the output.
Steps can run in multiple copies, on in partitioned fashion. For this case we should take in account that in different cases we should take in account one to one, one to many and other cases properly.
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()
StepInterfacestopAll 在接口中 StepInterfacepublic boolean isStopped()
isStopped 在接口中 StepInterfacepublic boolean isRunning()
isRunning 在接口中 StepInterfacepublic boolean isPaused()
isPaused 在接口中 StepInterfacepublic void setStopped(boolean stopped)
setStopped 在接口中 StepInterfacestopped - true if the step needs to be stoppedpublic void setSafeStopped(boolean stopped)
setSafeStopped 在接口中 StepInterfacestopped - true if the step needs to be safe stoppedpublic boolean isSafeStopped()
isSafeStopped 在接口中 StepInterfacepublic void setRunning(boolean running)
StepInterfacesetRunning 在接口中 StepInterfacerunning - the running flag to setpublic void pauseRunning()
StepInterfacepauseRunning 在接口中 StepInterfacepublic void resumeRunning()
StepInterfaceresumeRunning 在接口中 StepInterfacepublic void setPaused(boolean paused)
paused - the new pausedpublic void setPaused(AtomicBoolean paused)
paused - the new pausedpublic boolean isInitialising()
public void markStart()
StepInterfacemarkStart 在接口中 StepInterfacepublic void setInternalVariables()
public void markStop()
StepInterfacemarkStop 在接口中 StepInterfacepublic long getRuntime()
getRuntime 在接口中 StepInterfacepublic org.pentaho.di.core.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_datepublic static final org.pentaho.di.core.row.RowMetaInterface getLogFields(String comm)
comm - the commpublic int rowsetOutputSize()
rowsetOutputSize 在接口中 StepInterfacepublic int rowsetInputSize()
rowsetInputSize 在接口中 StepInterfacepublic void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) throws org.pentaho.di.core.exception.KettleException
stopRunning 在接口中 StepInterfacestepDataInterface - 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.org.pentaho.di.core.exception.KettleException - in case something goes wrong@Deprecated public void stopRunning()
public void logSummary()
public String getStepID()
getStepID 在接口中 StepInterfacepublic List<org.pentaho.di.core.RowSet> getInputRowSets()
getInputRowSets 在接口中 StepInterfacepublic void addRowSetToInputRowSets(org.pentaho.di.core.RowSet rowSet)
addRowSetToInputRowSets 在接口中 StepInterfaceprotected org.pentaho.di.core.RowSet getFirstInputRowSet()
protected void clearInputRowSets()
protected void swapFirstInputRowSetIfExists(String stepName)
public void setInputRowSets(List<org.pentaho.di.core.RowSet> inputRowSets)
inputRowSets - The inputRowSets to set.public List<org.pentaho.di.core.RowSet> getOutputRowSets()
getOutputRowSets 在接口中 StepInterfacepublic void addRowSetToOutputRowSets(org.pentaho.di.core.RowSet rowSet)
addRowSetToOutputRowSets 在接口中 StepInterfaceprotected void clearOutputRowSets()
public void setOutputRowSets(List<org.pentaho.di.core.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)
StepInterfaceaddRowListener 在接口中 StepInterfacerowListener - the rowlistener to addpublic void removeRowListener(RowListener rowListener)
StepInterfaceremoveRowListener 在接口中 StepInterfacerowListener - the rowlistener to removepublic List<RowListener> getRowListeners()
getRowListeners 在接口中 StepInterfacepublic void addResultFile(org.pentaho.di.core.ResultFile resultFile)
resultFile - the result filepublic Map<String,org.pentaho.di.core.ResultFile> getResultFiles()
getResultFiles 在接口中 StepInterfacepublic BaseStepData.StepExecutionStatus getStatus()
getStatus 在接口中 StepInterfaceStepDataInterfacepublic String getPartitionID()
getPartitionID 在接口中 StepInterfacepublic void setPartitionID(String partitionID)
setPartitionID 在接口中 StepInterfacepartitionID - the partitionID to setpublic Map<String,org.pentaho.di.core.BlockingRowSet> getPartitionTargets()
public void setPartitionTargets(Map<String,org.pentaho.di.core.BlockingRowSet> partitionTargets)
partitionTargets - the partitionTargets to setpublic int getRepartitioning()
public void setRepartitioning(int repartitioning)
setRepartitioning 在接口中 StepInterfacerepartitioning - the repartitioning type to setpublic boolean isPartitioned()
isPartitioned 在接口中 StepInterfacepublic void setPartitioned(boolean partitioned)
setPartitioned 在接口中 StepInterfacepartitioned - the partitioned to setprotected boolean checkFeedback(long lines)
lines - the linespublic org.pentaho.di.core.row.RowMetaInterface getInputRowMeta()
public void setInputRowMeta(org.pentaho.di.core.row.RowMetaInterface rowMeta)
rowMeta - the rowMeta to setpublic org.pentaho.di.core.row.RowMetaInterface getErrorRowMeta()
public void setErrorRowMeta(org.pentaho.di.core.row.RowMetaInterface errorRowMeta)
errorRowMeta - the errorRowMeta to setpublic org.pentaho.di.core.row.RowMetaInterface getPreviewRowMeta()
public void setPreviewRowMeta(org.pentaho.di.core.row.RowMetaInterface previewRowMeta)
previewRowMeta - the previewRowMeta to setpublic void copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
copyVariablesFrom 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String environmentSubstitute(String aString)
environmentSubstitute 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String[] environmentSubstitute(String[] aString)
environmentSubstitute 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String fieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData) throws org.pentaho.di.core.exception.KettleValueException
fieldSubstitute 在接口中 org.pentaho.di.core.variables.VariableSpaceorg.pentaho.di.core.exception.KettleValueExceptionpublic org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
getParentVariableSpace 在接口中 org.pentaho.di.core.variables.VariableSpacepublic void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
setParentVariableSpace 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String getVariable(String variableName, String defaultValue)
getVariable 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String getVariable(String variableName)
getVariable 在接口中 org.pentaho.di.core.variables.VariableSpacepublic boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
getBooleanValueOfVariable 在接口中 org.pentaho.di.core.variables.VariableSpacepublic void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
initializeVariablesFrom 在接口中 org.pentaho.di.core.variables.VariableSpacepublic String[] listVariables()
listVariables 在接口中 org.pentaho.di.core.variables.VariableSpacepublic void setVariable(String variableName, String variableValue)
setVariable 在接口中 org.pentaho.di.core.variables.VariableSpacepublic void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
shareVariablesWith 在接口中 org.pentaho.di.core.variables.VariableSpacepublic void injectVariables(Map<String,String> prop)
injectVariables 在接口中 org.pentaho.di.core.variables.VariableSpacepublic 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 在接口中 StepInterfaceusingThreadPriorityManagment - set to true to actively manage priorities of step threadspublic boolean isUsingThreadPriorityManagment()
isUsingThreadPriorityManagment 在接口中 StepInterfacepublic void initBeforeStart()
throws org.pentaho.di.core.exception.KettleStepException
More to the point: here we open remote output step sockets.
initBeforeStart 在接口中 StepInterfaceorg.pentaho.di.core.exception.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 org.pentaho.di.core.exception.KettleException
StepInterfaceprocessRow 在接口中 StepInterfacesmi - The steps metadata to work withsdi - The steps temporary working data to work with (database connections, result sets, caches, temporary
variables, etc.)org.pentaho.di.core.exception.KettleExceptionpublic boolean canProcessOneRow()
StepInterfaceFor example, if a step has no input records but needs at least one to function, it will return false.
canProcessOneRow 在接口中 StepInterfacepublic void addStepListener(StepListener stepListener)
StepInterfaceaddStepListener 在接口中 StepInterfacestepListener - The listener to add to the steppublic boolean isMapping()
isMapping 在接口中 StepInterfacepublic SocketRepository getSocketRepository()
public void setSocketRepository(SocketRepository socketRepository)
socketRepository - the socketRepository to setpublic String getObjectName()
getObjectName 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
getLogChannel 在接口中 HasLogChannelInterfacegetLogChannel 在接口中 StepInterfacepublic String getFilename()
getFilename 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic String getLogChannelId()
getLogChannelId 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.repository.ObjectId getObjectId()
getObjectId 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.repository.ObjectRevision getObjectRevision()
getObjectRevision 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.core.logging.LoggingObjectType getObjectType()
getObjectType 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.core.logging.LoggingObjectInterface getParent()
getParent 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.repository.RepositoryDirectory getRepositoryDirectory()
getRepositoryDirectory 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic String getObjectCopy()
getObjectCopy 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic org.pentaho.di.core.logging.LogLevel getLogLevel()
getLogLevel 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic void setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)
logLevel - the new log levelpublic static void closeQuietly(Closeable cl)
cl - the object that can be closed.public String getContainerObjectId()
getContainerObjectId 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic void setCarteObjectId(String containerObjectId)
containerObjectId - the containerObjectId to setpublic void batchComplete()
throws org.pentaho.di.core.exception.KettleException
StepInterfacebatchComplete 在接口中 StepInterfaceorg.pentaho.di.core.exception.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 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic boolean isGatheringMetrics()
isGatheringMetrics 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic void setGatheringMetrics(boolean gatheringMetrics)
setGatheringMetrics 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic boolean isForcingSeparateLogging()
isForcingSeparateLogging 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic void setForcingSeparateLogging(boolean forcingSeparateLogging)
setForcingSeparateLogging 在接口中 org.pentaho.di.core.logging.LoggingObjectInterfacepublic Repository getRepository()
getRepository 在接口中 StepInterfacepublic void setRepository(Repository repository)
setRepository 在接口中 StepInterfacerepository - The repository used by the step to load and reference Kettle objects with at runtimepublic org.pentaho.metastore.api.IMetaStore getMetaStore()
getMetaStore 在接口中 StepInterfacepublic void setMetaStore(org.pentaho.metastore.api.IMetaStore metaStore)
StepInterfacesetMetaStore 在接口中 StepInterfacemetaStore - The metastore to usepublic int getCurrentOutputRowSetNr()
getCurrentOutputRowSetNr 在接口中 StepInterfacepublic void setCurrentOutputRowSetNr(int index)
setCurrentOutputRowSetNr 在接口中 StepInterfaceindex - Sets the index of the active (current) output row set to use.public int getCurrentInputRowSetNr()
getCurrentInputRowSetNr 在接口中 StepInterfacepublic void setCurrentInputRowSetNr(int index)
setCurrentInputRowSetNr 在接口中 StepInterfaceindex - Sets the index of the active (current) input row set to use.Copyright © 2024 Hitachi Vantara. All rights reserved.