Class ScriptDummy

    • Constructor Detail

      • ScriptDummy

        public ScriptDummy​(org.pentaho.di.core.row.RowMetaInterface inputRowMeta,
                           org.pentaho.di.core.row.RowMetaInterface outputRowMeta)
    • Method Detail

      • processRow

        public boolean processRow​(StepMetaInterface smi,
                                  StepDataInterface sdi)
                           throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).
        Specified by:
        processRow in interface StepInterface
        Parameters:
        smi - The steps metadata to work with
        sdi - The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)
        Returns:
        false if no more rows can be processed or an error occurred.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • addRowListener

        public void addRowListener​(RowListener rowListener)
        Description copied from interface: StepInterface
        Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.
        Specified by:
        addRowListener in interface StepInterface
        Parameters:
        rowListener - the rowlistener to add
      • getErrors

        public long getErrors()
        Description copied from interface: StepInterface
        Get the number of errors
        Specified by:
        getErrors in interface StepInterface
        Returns:
        the number of errors
      • getInputRowSets

        public List<org.pentaho.di.core.RowSet> getInputRowSets()
        Specified by:
        getInputRowSets in interface StepInterface
        Returns:
        The list of active input rowsets for the step
      • getLinesInput

        public long getLinesInput()
        Specified by:
        getLinesInput in interface StepInterface
        Returns:
        Returns the linesInput.
      • getLinesOutput

        public long getLinesOutput()
        Specified by:
        getLinesOutput in interface StepInterface
        Returns:
        Returns the linesOutput.
      • getLinesRead

        public long getLinesRead()
        Specified by:
        getLinesRead in interface StepInterface
        Returns:
        Returns the linesRead.
      • getLinesUpdated

        public long getLinesUpdated()
        Specified by:
        getLinesUpdated in interface StepInterface
        Returns:
        Returns the linesUpdated.
      • getLinesWritten

        public long getLinesWritten()
        Specified by:
        getLinesWritten in interface StepInterface
        Returns:
        Returns the linesWritten.
      • getLinesRejected

        public long getLinesRejected()
        Specified by:
        getLinesRejected in interface StepInterface
        Returns:
        Returns the lines rejected by error handling.
      • getOutputRowSets

        public List<org.pentaho.di.core.RowSet> getOutputRowSets()
        Specified by:
        getOutputRowSets in interface StepInterface
        Returns:
        The list of active output rowsets for the step
      • getRow

        public Object[] getRow()
                        throws org.pentaho.di.core.exception.KettleException
        Specified by:
        getRow in interface StepInterface
        Returns:
        a row from the source step(s).
        Throws:
        org.pentaho.di.core.exception.KettleException
      • init

        public boolean init​(StepMetaInterface stepMetaInterface,
                            StepDataInterface stepDataInterface)
        Description copied from interface: StepInterface
        Initialize and do work where other steps need to wait for...
        Specified by:
        init in interface StepInterface
        Parameters:
        stepMetaInterface - The metadata to work with
        stepDataInterface - The data to initialize
      • isAlive

        public boolean isAlive()
      • isPartitioned

        public boolean isPartitioned()
        Specified by:
        isPartitioned in interface StepInterface
        Returns:
        true if the step is running partitioned
      • isStopped

        public boolean isStopped()
        Specified by:
        isStopped in interface StepInterface
        Returns:
        True if the step is marked as stopped. Execution should stop immediate.
      • putRow

        public void putRow​(org.pentaho.di.core.row.RowMetaInterface rowMeta,
                           Object[] row)
                    throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Put a row on the destination rowsets.
        Specified by:
        putRow in interface StepInterface
        Parameters:
        rowMeta - The row to send to the destinations steps
        Throws:
        org.pentaho.di.core.exception.KettleException
      • removeRowListener

        public void removeRowListener​(RowListener rowListener)
        Description copied from interface: StepInterface
        Remove a rowlistener from this step.
        Specified by:
        removeRowListener in interface StepInterface
        Parameters:
        rowListener - the rowlistener to remove
      • run

        public void run()
      • setErrors

        public void setErrors​(long errors)
        Description copied from interface: StepInterface
        Sets the number of errors
        Specified by:
        setErrors in interface StepInterface
        Parameters:
        errors - the number of errors to set
      • setPartitionID

        public void setPartitionID​(String partitionID)
        Specified by:
        setPartitionID in interface StepInterface
        Parameters:
        partitionID - the partitionID to set
      • start

        public void start()
      • stopAll

        public void stopAll()
        Description copied from interface: StepInterface
        Flags all rowsets as stopped/completed/finished.
        Specified by:
        stopAll in interface StepInterface
      • stopRunning

        public void stopRunning​(StepMetaInterface stepMetaInterface,
                                StepDataInterface stepDataInterface)
                         throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Stop running operations...
        Specified by:
        stopRunning in interface StepInterface
        Parameters:
        stepMetaInterface - The metadata that might be needed by the step to stop running.
        stepDataInterface - The interface to the step data containing the connections, resultsets, open files, etc.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • cleanup

        public void cleanup()
        Description copied from interface: StepInterface
        Call this method typically, after ALL the slave transformations in a clustered run have finished.
        Specified by:
        cleanup in interface StepInterface
      • copyVariablesFrom

        public void copyVariablesFrom​(org.pentaho.di.core.variables.VariableSpace space)
        Specified by:
        copyVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace
      • environmentSubstitute

        public String environmentSubstitute​(String aString)
        Specified by:
        environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace
      • environmentSubstitute

        public String[] environmentSubstitute​(String[] string)
        Specified by:
        environmentSubstitute in interface org.pentaho.di.core.variables.VariableSpace
      • fieldSubstitute

        public String fieldSubstitute​(String aString,
                                      org.pentaho.di.core.row.RowMetaInterface rowMeta,
                                      Object[] rowData)
                               throws org.pentaho.di.core.exception.KettleValueException
        Specified by:
        fieldSubstitute in interface org.pentaho.di.core.variables.VariableSpace
        Throws:
        org.pentaho.di.core.exception.KettleValueException
      • getBooleanValueOfVariable

        public boolean getBooleanValueOfVariable​(String variableName,
                                                 boolean defaultValue)
        Specified by:
        getBooleanValueOfVariable in interface org.pentaho.di.core.variables.VariableSpace
      • getParentVariableSpace

        public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
        Specified by:
        getParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace
      • setParentVariableSpace

        public void setParentVariableSpace​(org.pentaho.di.core.variables.VariableSpace parent)
        Specified by:
        setParentVariableSpace in interface org.pentaho.di.core.variables.VariableSpace
      • getVariable

        public String getVariable​(String variableName,
                                  String defaultValue)
        Specified by:
        getVariable in interface org.pentaho.di.core.variables.VariableSpace
      • getVariable

        public String getVariable​(String variableName)
        Specified by:
        getVariable in interface org.pentaho.di.core.variables.VariableSpace
      • initializeVariablesFrom

        public void initializeVariablesFrom​(org.pentaho.di.core.variables.VariableSpace parent)
        Specified by:
        initializeVariablesFrom in interface org.pentaho.di.core.variables.VariableSpace
      • injectVariables

        public void injectVariables​(Map<String,​String> prop)
        Specified by:
        injectVariables in interface org.pentaho.di.core.variables.VariableSpace
      • listVariables

        public String[] listVariables()
        Specified by:
        listVariables in interface org.pentaho.di.core.variables.VariableSpace
      • setVariable

        public void setVariable​(String variableName,
                                String variableValue)
        Specified by:
        setVariable in interface org.pentaho.di.core.variables.VariableSpace
      • shareVariablesWith

        public void shareVariablesWith​(org.pentaho.di.core.variables.VariableSpace space)
        Specified by:
        shareVariablesWith in interface org.pentaho.di.core.variables.VariableSpace
      • getInputRowMeta

        public org.pentaho.di.core.row.RowMetaInterface getInputRowMeta()
      • getOutputRowMeta

        public org.pentaho.di.core.row.RowMetaInterface getOutputRowMeta()
      • initBeforeStart

        public void initBeforeStart()
                             throws org.pentaho.di.core.exception.KettleStepException
        Description copied from interface: StepInterface
        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(); !!!
        Specified by:
        initBeforeStart in interface StepInterface
        Throws:
        org.pentaho.di.core.exception.KettleStepException - In case there is an error
      • setLinesRejected

        public void setLinesRejected​(long linesRejected)
        Specified by:
        setLinesRejected in interface StepInterface
        Parameters:
        linesRejected - steps the lines rejected by error handling.
      • getCopy

        public int getCopy()
        Specified by:
        getCopy in interface StepInterface
        Returns:
        The steps copy number (default 0)
      • addStepListener

        public void addStepListener​(StepListener stepListener)
        Description copied from interface: StepInterface
        Attach a step listener to be notified when a step arrives in a certain state. (finished)
        Specified by:
        addStepListener in interface StepInterface
        Parameters:
        stepListener - The listener to add to the step
      • isMapping

        public boolean isMapping()
        Specified by:
        isMapping in interface StepInterface
        Returns:
        true if the thread is a special mapping step
      • getTrans

        public Trans getTrans()
        Specified by:
        getTrans in interface StepInterface
        Returns:
        the transformation that is executing this step
      • isUsingThreadPriorityManagment

        public boolean isUsingThreadPriorityManagment()
        Specified by:
        isUsingThreadPriorityManagment in interface StepInterface
        Returns:
        true if we are actively managing priorities of step threads
      • setUsingThreadPriorityManagment

        public void setUsingThreadPriorityManagment​(boolean usingThreadPriorityManagment)
        Specified by:
        setUsingThreadPriorityManagment in interface StepInterface
        Parameters:
        usingThreadPriorityManagment - set to true to actively manage priorities of step threads
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface StepInterface
        Returns:
        true if the step is running after having been initialized
      • setRunning

        public void setRunning​(boolean running)
        Description copied from interface: StepInterface
        Flag the step as running or not
        Specified by:
        setRunning in interface StepInterface
        Parameters:
        running - the running flag to set
      • setStopped

        public void setStopped​(boolean stopped)
        Specified by:
        setStopped in interface StepInterface
        Parameters:
        stopped - true if the step needs to be stopped
      • setSafeStopped

        public void setSafeStopped​(boolean stopped)
        Specified by:
        setSafeStopped in interface StepInterface
        Parameters:
        stopped - true if the step needs to be safe stopped
      • rowsetInputSize

        public int rowsetInputSize()
        Specified by:
        rowsetInputSize in interface StepInterface
        Returns:
        The total amount of rows in the input buffers
      • rowsetOutputSize

        public int rowsetOutputSize()
        Specified by:
        rowsetOutputSize in interface StepInterface
        Returns:
        The total amount of rows in the output buffers
      • getProcessed

        public long getProcessed()
        Specified by:
        getProcessed in interface StepInterface
        Returns:
        The number of "processed" lines of a step. Well, a representable metric for that anyway.
      • getResultFiles

        public Map<String,​org.pentaho.di.core.ResultFile> getResultFiles()
        Specified by:
        getResultFiles in interface StepInterface
        Returns:
        The result files for this step
      • getRuntime

        public long getRuntime()
        Specified by:
        getRuntime in interface StepInterface
        Returns:
        The number of ms that this step has been running
      • isPaused

        public boolean isPaused()
        Specified by:
        isPaused in interface StepInterface
        Returns:
        True if the step is paused
      • identifyErrorOutput

        public void identifyErrorOutput()
        Description copied from interface: StepInterface
        To be used to flag an error output channel of a step prior to execution for performance reasons.
        Specified by:
        identifyErrorOutput in interface StepInterface
      • setPartitioned

        public void setPartitioned​(boolean partitioned)
        Specified by:
        setPartitioned in interface StepInterface
        Parameters:
        partitioned - true if this step is partitioned
      • setRepartitioning

        public void setRepartitioning​(int partitioningMethod)
        Specified by:
        setRepartitioning in interface StepInterface
        Parameters:
        partitioningMethod - The repartitioning method
      • canProcessOneRow

        public boolean canProcessOneRow()
        Description copied from interface: StepInterface
        This method checks if the step is capable of processing at least one row.

        For example, if a step has no input records but needs at least one to function, it will return false.

        Specified by:
        canProcessOneRow in interface StepInterface
        Returns:
        true if the step can process a row.
      • isWaitingForData

        public boolean isWaitingForData()
      • setWaitingForData

        public void setWaitingForData​(boolean waitingForData)
      • isIdle

        public boolean isIdle()
      • isPassingData

        public boolean isPassingData()
      • setPassingData

        public void setPassingData​(boolean passingData)
      • batchComplete

        public void batchComplete()
                           throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Calling this method will alert the step that we finished passing a batch of records to the step. Specifically for steps like "Sort Rows" it means that the buffered rows can be sorted and passed on.
        Specified by:
        batchComplete in interface StepInterface
        Throws:
        org.pentaho.di.core.exception.KettleException - In case an error occurs during the processing of the batch of rows.
      • setMetaStore

        public void setMetaStore​(org.pentaho.metastore.api.IMetaStore metaStore)
        Description copied from interface: StepInterface
        Pass along the metastore to use when loading external elements at runtime.
        Specified by:
        setMetaStore in interface StepInterface
        Parameters:
        metaStore - The metastore to use
      • getMetaStore

        public org.pentaho.metastore.api.IMetaStore getMetaStore()
        Specified by:
        getMetaStore in interface StepInterface
        Returns:
        The metastore that the step uses to load external elements from.
      • setRepository

        public void setRepository​(Repository repository)
        Specified by:
        setRepository in interface StepInterface
        Parameters:
        repository - The repository used by the step to load and reference Kettle objects with at runtime
      • getRepository

        public Repository getRepository()
        Specified by:
        getRepository in interface StepInterface
        Returns:
        The repository used by the step to load and reference Kettle objects with at runtime
      • getCurrentInputRowSetNr

        public int getCurrentInputRowSetNr()
        Specified by:
        getCurrentInputRowSetNr in interface StepInterface
        Returns:
        the index of the active (current) input row set
      • setCurrentOutputRowSetNr

        public void setCurrentOutputRowSetNr​(int index)
        Specified by:
        setCurrentOutputRowSetNr in interface StepInterface
        Parameters:
        index - Sets the index of the active (current) output row set to use.
      • getCurrentOutputRowSetNr

        public int getCurrentOutputRowSetNr()
        Specified by:
        getCurrentOutputRowSetNr in interface StepInterface
        Returns:
        the index of the active (current) output row set
      • setCurrentInputRowSetNr

        public void setCurrentInputRowSetNr​(int index)
        Specified by:
        setCurrentInputRowSetNr in interface StepInterface
        Parameters:
        index - Sets the index of the active (current) input row set to use.