Class TransWebSocketEngineAdapter
- java.lang.Object
-
- org.pentaho.di.trans.Trans
-
- org.pentaho.di.trans.ael.websocket.TransWebSocketEngineAdapter
-
- All Implemented Interfaces:
ExecutorInterface
,org.pentaho.di.core.ExtensionDataInterface
,HasLogChannelInterface
,org.pentaho.di.core.logging.LoggingObjectInterface
,org.pentaho.di.core.logging.LoggingObjectLifecycleInterface
,org.pentaho.di.core.parameters.NamedParams
,org.pentaho.di.core.variables.VariableSpace
public class TransWebSocketEngineAdapter extends Trans
Created by fcamara on 8/17/17.
-
-
Field Summary
Fields Modifier and Type Field Description protected MessageEventService
messageEventService
-
Fields inherited from class org.pentaho.di.trans.Trans
arguments, class_nr, CONFIGURATION_IN_EXPORT_FILENAME, containerObjectId, counters, log, logCommitSize, metaStore, REPLAY_DATE_FORMAT, repository, resultFiles, resultRows, rowsets, STRING_FINISHED, STRING_FINISHED_WITH_ERRORS, STRING_HALTING, STRING_INITIALIZING, STRING_PAUSED, STRING_PREPARING, STRING_RUNNING, STRING_STOPPED, STRING_STOPPED_WITH_ERRORS, STRING_WAITING, transMeta, TYPE_DISP_1_1, TYPE_DISP_1_N, TYPE_DISP_N_1, TYPE_DISP_N_M, TYPE_DISP_N_N
-
-
Constructor Summary
Constructors Constructor Description TransWebSocketEngineAdapter(TransMeta transMeta, String host, int port, boolean ssl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowProducer
addRowProducer(String stepname, int copynr)
This adds a row producer to the transformation that just got set up.void
closeSessionMonitor()
void
finishProcess(boolean emitToAllSteps)
DaemonMessagesClientEndpoint
getDaemonEndpoint()
int
getErrors()
Gets the number of errors that have occurred during execution of the transformation.org.pentaho.di.core.Result
getResult()
Gets the result of the transformation.void
killAll()
Attempts to stops all running steps and subtransformations.void
prepareExecution(String[] arguments)
Prepares the transformation for execution.void
safeStop()
Stops only input steps so that all downstream steps can finish processing rows that have already been inputvoid
setLogLevel(org.pentaho.di.core.logging.LogLevel logLogLevel)
Sets the log level.void
startThreads()
Starts the threads prepared by prepareThreads().void
stopAll()
Stops all steps from running, and alerts any registered listeners.void
waitUntilFinished()
Waits until all RunThreads have finished.-
Methods inherited from class org.pentaho.di.trans.Trans
activateParameters, addActiveSubTransformation, addDelegationListener, addParameterDefinition, addStepPerformanceSnapShot, addTransListener, addTransStoppedListener, beginProcessing, calculateBatchIdAndDateRange, calculateTransactionId, callAfterLog, callBeforeLog, cleanup, cleanupCluster, cleanupSlaveServer, clearError, clearParameters, copyParametersFrom, copyVariablesFrom, createDataBase, doTopologySortOfSteps, environmentSubstitute, environmentSubstitute, eraseParameters, execute, executeClustered, executeClustered, fieldSubstitute, findBaseSteps, findDataInterface, findMappingInput, findMappingOutput, findRowSet, findRowSet, findRunThread, findStepInterface, findStepInterfaces, fireTransFinishedListeners, fireTransStartedListeners, getActiveSubjobs, getActiveSubTransformation, getActiveSubtransformations, getArguments, getBatchId, getBooleanValueOfVariable, getClusteredTransformationResult, getClusteredTransformationResult, getContainerObjectId, getCounters, getCurrentDate, getDelegationListeners, getDepDate, getEndDate, getEnded, getExecutingServer, getExecutingUser, getExtensionDataMap, getFilename, getJobEndDate, getJobStartDate, getLastProcessed, getLogChannel, getLogChannelId, getLogDate, getLoggingHierarchy, getLogLevel, getMappingStepName, getMetaStore, getName, getObjectCopy, getObjectId, getObjectName, getObjectRevision, getObjectType, getParameterDefault, getParameterDescription, getParameterValue, getParent, getParentJob, getParentTrans, getParentVariableSpace, getPassedBatchId, getPreviousResult, getRegistrationDate, getReplayDate, getRepository, getRepositoryDirectory, getResultFiles, getResultRows, getRowsets, getRunThread, getRunThread, getServletPrintWriter, getServletRequest, getServletResponse, getSocketRepository, getStartDate, getStatus, getStepDataInterface, getStepInterface, getStepPerformanceSnapShots, getSteps, getThreadName, getTransactionId, getTransListeners, getTransMeta, getTransStepExecutionStatusLookup, getTransStepIsRunningLookup, getTransStoppedListeners, getVariable, getVariable, hasHaltedSteps, hasStepStarted, initializeVariablesFrom, injectVariables, isExecutingClustered, isFinished, isFinishedOrStopped, isForcingSeparateLogging, isGatheringMetrics, isInitializing, isMonitored, isPaused, isPreparing, isPreview, isReadyToStart, isResultRowsSet, isRunning, isSafeModeEnabled, isStopped, listParameters, listVariables, logSummary, mergeParametersWith, monitorClusteredTransformation, monitorClusteredTransformation, monitorRemoteTransformation, monitorRemoteTransformation, notifyStoppedListeners, nrActiveSteps, nrSteps, pauseRunning, printStats, removeActiveSubTransformation, resumeRunning, sendToSlaveServer, setArguments, setBatchId, setContainerObjectId, setCounters, setDelegationListeners, setExecutingClustered, setExecutingServer, setExecutingUser, setFinished, setForcingSeparateLogging, setGatheringMetrics, setInitializing, setInternalEntryCurrentDirectory, setInternalKettleVariables, setJobEndDate, setJobStartDate, setLog, setMappingStepName, setMetaStore, setMonitored, setParameterValue, setParent, setParentJob, setParentTrans, setParentVariableSpace, setPassedBatchId, setPaused, setPreparing, setPreview, setPreviousResult, setReadyToStart, setReplayDate, setRepository, setResultFiles, setResultRows, setResultRowSet, setRunning, setSafeModeEnabled, setServletPrintWriter, setServletReponse, setServletRequest, setSocketRepository, setStepPerformanceSnapShots, setSteps, setStopped, setThreadName, setTransactionId, setTransListeners, setTransMeta, setTransStoppedListeners, setVariable, shareVariablesWith, shutdownHeartbeat, startHeartbeat, stopStep, toString, writeLogChannelInformation, writeMetricsInformation, writeStepLogInformation
-
-
-
-
Field Detail
-
messageEventService
protected final MessageEventService messageEventService
-
-
Method Detail
-
getDaemonEndpoint
public DaemonMessagesClientEndpoint getDaemonEndpoint() throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
setLogLevel
public void setLogLevel(org.pentaho.di.core.logging.LogLevel logLogLevel)
Description copied from class:Trans
Sets the log level.- Overrides:
setLogLevel
in classTrans
- Parameters:
logLogLevel
- the new log level
-
killAll
public void killAll()
Description copied from class:Trans
Attempts to stops all running steps and subtransformations. If all steps have finished, the transformation is marked as Finished.
-
stopAll
public void stopAll()
Description copied from class:Trans
Stops all steps from running, and alerts any registered listeners.
-
safeStop
public void safeStop()
Description copied from class:Trans
Stops only input steps so that all downstream steps can finish processing rows that have already been input
-
prepareExecution
public void prepareExecution(String[] arguments) throws org.pentaho.di.core.exception.KettleException
Description copied from class:Trans
Prepares the transformation for execution. This includes setting the arguments and parameters as well as preparing and tracking the steps and hops in the transformation.- Overrides:
prepareExecution
in classTrans
- Parameters:
arguments
- the arguments to use for this transformation- Throws:
org.pentaho.di.core.exception.KettleException
- in case the transformation could not be prepared (initialized)
-
startThreads
public void startThreads() throws org.pentaho.di.core.exception.KettleException
Description copied from class:Trans
Starts the threads prepared by prepareThreads(). Before you start the threads, you can add RowListeners to them.- Overrides:
startThreads
in classTrans
- Throws:
org.pentaho.di.core.exception.KettleException
- if there is a communication error with a remote output socket.
-
closeSessionMonitor
public void closeSessionMonitor()
-
waitUntilFinished
public void waitUntilFinished()
Description copied from class:Trans
Waits until all RunThreads have finished.- Overrides:
waitUntilFinished
in classTrans
-
getErrors
public int getErrors()
Description copied from class:Trans
Gets the number of errors that have occurred during execution of the transformation.
-
getResult
public org.pentaho.di.core.Result getResult()
Description copied from class:Trans
Gets the result of the transformation. The Result object contains such measures as the number of errors, number of lines read/written/input/output/updated/rejected, etc.
-
finishProcess
public void finishProcess(boolean emitToAllSteps)
-
addRowProducer
public RowProducer addRowProducer(String stepname, int copynr) throws org.pentaho.di.core.exception.KettleException
Description copied from class:Trans
This adds a row producer to the transformation that just got set up. It is preferable to run this BEFORE execute() but after prepareExecution()- Overrides:
addRowProducer
in classTrans
- Parameters:
stepname
- The step to produce rows forcopynr
- The copynr of the step to produce row for (normally 0 unless you have multiple copies running)- Returns:
- the row producer
- Throws:
org.pentaho.di.core.exception.KettleException
- in case the thread/step to produce rows for could not be found.- See Also:
Trans.execute(String[])
,Trans.prepareExecution(String[])
-
-