Package org.pentaho.di.job
Class Job
- java.lang.Object
-
- java.lang.Thread
-
- org.pentaho.di.job.Job
-
- All Implemented Interfaces:
Runnable,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 Job extends Thread implements org.pentaho.di.core.variables.VariableSpace, org.pentaho.di.core.parameters.NamedParams, HasLogChannelInterface, org.pentaho.di.core.logging.LoggingObjectInterface, ExecutorInterface, org.pentaho.di.core.ExtensionDataInterface
This class executes a job as defined by a JobMeta object.The definition of a PDI job is represented by a JobMeta object. It is typically loaded from a .kjb file, a PDI repository, or it is generated dynamically. The declared parameters of the job definition are then queried using listParameters() and assigned values using calls to setParameterValue(..).
- Since:
- 07-apr-2003
- Author:
- Matt Casters
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]argumentsThe command line arguments for the job.static StringCONFIGURATION_IN_EXPORT_FILENAMEprotected JobparentJobThe job that's launching this (sub-) job.protected TransparentTransThe parent transformation-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateParameters()voidaddDelegationListener(DelegationListener delegationListener)voidaddErrors(int nrToAdd)Add a number of errors to the total number of erros that occured during execution.voidaddJobEntryListener(JobEntryListener jobEntryListener)voidaddJobListener(JobListener jobListener)voidaddParameterDefinition(String key, String defValue, String description)booleanbeginProcessing()Handle logging at startvoidcallAfterLog()voidcallBeforeLog()voidclearParameters()voidcopyParametersFrom(org.pentaho.di.core.parameters.NamedParams params)voidcopyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)protected org.pentaho.di.core.database.DatabasecreateDataBase(org.pentaho.di.core.database.DatabaseMeta databaseMeta)static JobcreateJobWithNewClassLoader()StringenvironmentSubstitute(String aString)String[]environmentSubstitute(String[] aString)voideraseParameters()org.pentaho.di.core.Resultexecute(int nr, org.pentaho.di.core.Result result)Execute a job with previous results passed in.
Execute called by JobEntryJob: don't clear the jobEntryResults.StringfieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData)voidfireJobFinishListeners()Sets the finished flag. Then launch all the job listeners and call the jobFinished method for each.voidfireJobStartListeners()Call all the jobStarted method for each listener.Map<JobEntryCopy,JobEntryJob>getActiveJobEntryJobs()Gets the activeJobEntryJobs.Map<JobEntryCopy,JobEntryTrans>getActiveJobEntryTransformations()Gets the activeJobEntryTransformations.String[]getArguments()longgetBatchId()booleangetBooleanValueOfVariable(String variableName, boolean defaultValue)StringgetContainerObjectId()Gets the carteObjectId.DategetCurrentDate()List<DelegationListener>getDelegationListeners()DategetDepDate()Gets the dep date.DategetEndDate()intgetErrors()Get the number of errors that happened in the job.StringgetExecutingServer()Gets the executing server.StringgetExecutingUser()Gets the executing user.Map<String,Object>getExtensionDataMap()StringgetFilename()Gets the file name.List<JobEntryListener>getJobEntryListeners()List<JobEntryResult>getJobEntryResults()Gets a flat list of results in THIS job, in the order of execution of job entries.List<JobListener>getJobListeners()JobMetagetJobMeta()StringgetJobname()JobTrackergetJobTracker()intgetLogBufferStartLine()Gets the logBufferStartLine.org.pentaho.di.core.logging.LogChannelInterfacegetLogChannel()Gets the log channel interface.StringgetLogChannelId()Gets the log channel id.DategetLogDate()List<org.pentaho.di.core.logging.LoggingHierarchy>getLoggingHierarchy()Gets the logging hierarchy.org.pentaho.di.core.logging.LogLevelgetLogLevel()Gets the logLevel.StringgetObjectCopy()Always returns null for Job.org.pentaho.di.repository.ObjectIdgetObjectId()Gets the jobMeta's object id.StringgetObjectName()Gets the job name.org.pentaho.di.repository.ObjectRevisiongetObjectRevision()Gets the job meta's object revision.org.pentaho.di.core.logging.LoggingObjectTypegetObjectType()Gets LoggingObjectType.JOB, which is always the value for Job.StringgetParameterDefault(String key)StringgetParameterDescription(String key)StringgetParameterValue(String key)org.pentaho.di.core.logging.LoggingObjectInterfacegetParent()Gets parent logging object.JobgetParentJob()Gets the parent job.org.pentaho.di.core.logging.LoggingObjectInterfacegetParentLoggingObject()Gets the parent logging object.TransgetParentTrans()org.pentaho.di.core.variables.VariableSpacegetParentVariableSpace()longgetPassedBatchId()DategetRegistrationDate()Gets the registration date.RepositorygetRep()org.pentaho.di.repository.RepositoryDirectoryInterfacegetRepositoryDirectory()Gets the job meta's repository directory interface.org.pentaho.di.core.ResultgetResult()SocketRepositorygetSocketRepository()Gets the socket repository.List<org.pentaho.di.core.RowMetaAndData>getSourceRows()Gets the source rows.DategetStartDate()JobEntryCopygetStartJobEntryCopy()Gets the start job entry copy.org.pentaho.di.core.ResultgetStartJobEntryResult()StringgetStatus()ThreadgetThread()StringgetTransactionId()Gets the transaction id.StringgetVariable(String variableName)StringgetVariable(String variableName, String defaultValue)voidinit()voidinitializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)voidinjectVariables(Map<String,String> prop)booleanisActive()booleanisFinished()booleanisForcingSeparateLogging()booleanisGatheringMetrics()booleanisInitialized()booleanisInteractive()Gets the boolean value of interactive.booleanisStopped()String[]listParameters()String[]listVariables()voidmergeParametersWith(org.pentaho.di.core.parameters.NamedParams params, boolean replace)voidremoveJobEntryListener(JobEntryListener jobEntryListener)voidremoveJobListener(JobListener jobListener)voidresetErrors()Set the number of occured errors to 0.voidrun()Threads main loop: called by Thread.start();static StringsendToSlaveServer(JobMeta jobMeta, JobExecutionConfiguration executionConfiguration, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)Send to slave server.protected voidsetActive(boolean active)voidsetArguments(String[] arguments)voidsetBatchId(long batchId)voidsetContainerObjectId(String containerObjectId)Sets the execution container object id (containerObjectId).voidsetDelegationListeners(List<DelegationListener> delegationListeners)voidsetExecutingServer(String executingServer)Sets the executing server.voidsetExecutingUser(String executingUser)Sets the executing user.voidsetFinished(boolean finished)voidsetForcingSeparateLogging(boolean forcingSeparateLogging)voidsetGatheringMetrics(boolean gatheringMetrics)protected voidsetInitialized(boolean initialized)voidsetInitialLogBufferStartLine()Sets logBufferStartLine based on LoggingBuffer last line numbervoidsetInteractive(boolean interactive)Sets the value of interactive.protected voidsetInternalEntryCurrentDirectory(boolean hasFilename, boolean hasRepoDir)voidsetInternalKettleVariables(org.pentaho.di.core.variables.VariableSpace var)Sets the internal kettle variables.voidsetJobTracker(JobTracker jobTracker)voidsetLogBufferStartLine(int lineNr)Sets the logBufferStartLine.voidsetLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)Sets the log level.voidsetParameterValue(String key, String value)voidsetParentJob(Job parentJob)Sets the parent job.voidsetParentTrans(Trans parentTrans)voidsetParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)voidsetPassedBatchId(long jobBatchId)voidsetRepository(Repository rep)voidsetResult(org.pentaho.di.core.Result result)voidsetSocketRepository(SocketRepository socketRepository)Sets the socket repository.voidsetSourceRows(List<org.pentaho.di.core.RowMetaAndData> sourceRows)voidsetStartJobEntryCopy(JobEntryCopy startJobEntryCopy)Sets the start job entry copy.voidsetStartJobEntryResult(org.pentaho.di.core.Result startJobEntryResult)voidsetStopped(boolean stopped)Sets the stopped.voidsetTransactionId(String transactionId)Sets the transaction id.voidsetVariable(String variableName, String variableValue)voidshareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)protected voidshutdownHeartbeat(ExecutorService heartbeat)protected ExecutorServicestartHeartbeat(long intervalInSeconds)voidstopAll()Stop all activity by setting the stopped property to true.StringtoString()Gets the name property of the JobMeta property.voidwaitUntilFinished()Wait until this job has finished.voidwaitUntilFinished(long maxMiliseconds)Wait until this job has finished.protected voidwriteJobEntryLogInformation()Write job entry log information.protected voidwriteLogChannelInformation()Write log channel information.protected voidwriteLogTableInformation(JobLogTable jobLogTable, org.pentaho.di.core.logging.LogStatus status)Writes information to Job Log table.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
-
-
-
-
Field Detail
-
CONFIGURATION_IN_EXPORT_FILENAME
public static final String CONFIGURATION_IN_EXPORT_FILENAME
- See Also:
- Constant Field Values
-
parentJob
protected Job parentJob
The job that's launching this (sub-) job. This gives us access to the whole chain, including the parent variables, etc.
-
parentTrans
protected Trans parentTrans
The parent transformation
-
arguments
protected String[] arguments
The command line arguments for the job.
-
-
Constructor Detail
-
Job
public Job(Repository repository, JobMeta jobMeta)
-
Job
public Job(Repository repository, JobMeta jobMeta, org.pentaho.di.core.logging.LoggingObjectInterface parentLogging)
-
Job
public Job()
-
-
Method Detail
-
init
public void init()
-
toString
public String toString()
Gets the name property of the JobMeta property.
-
createJobWithNewClassLoader
public static final Job createJobWithNewClassLoader() throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getJobname
public String getJobname()
-
setRepository
public void setRepository(Repository rep)
-
run
public void run()
Threads main loop: called by Thread.start();
-
execute
public org.pentaho.di.core.Result execute(int nr, org.pentaho.di.core.Result result) throws org.pentaho.di.core.exception.KettleExceptionExecute a job with previous results passed in.
Execute called by JobEntryJob: don't clear the jobEntryResults.- Parameters:
nr- The job entry numberresult- the result of the previous execution- Returns:
- Result of the job execution
- Throws:
org.pentaho.di.core.exception.KettleJobExceptionorg.pentaho.di.core.exception.KettleException
-
fireJobFinishListeners
public void fireJobFinishListeners() throws org.pentaho.di.core.exception.KettleExceptionSets the finished flag. Then launch all the job listeners and call the jobFinished method for each.- Throws:
org.pentaho.di.core.exception.KettleException- See Also:
JobListener.jobFinished(Job)
-
fireJobStartListeners
public void fireJobStartListeners() throws org.pentaho.di.core.exception.KettleExceptionCall all the jobStarted method for each listener.- Throws:
org.pentaho.di.core.exception.KettleException- See Also:
JobListener.jobStarted(Job)
-
waitUntilFinished
public void waitUntilFinished()
Wait until this job has finished.
-
waitUntilFinished
public void waitUntilFinished(long maxMiliseconds)
Wait until this job has finished.- Parameters:
maxMiliseconds- the maximum number of ms to wait
-
getErrors
public int getErrors()
Get the number of errors that happened in the job.- Returns:
- nr of error that have occurred during execution. During execution of a job the number can change.
-
resetErrors
public void resetErrors()
Set the number of occured errors to 0.
-
addErrors
public void addErrors(int nrToAdd)
Add a number of errors to the total number of erros that occured during execution.- Parameters:
nrToAdd- nr of errors to add.
-
beginProcessing
public boolean beginProcessing() throws org.pentaho.di.core.exception.KettleExceptionHandle logging at start- Returns:
- true if it went OK.
- Throws:
org.pentaho.di.core.exception.KettleException
-
writeLogTableInformation
protected void writeLogTableInformation(JobLogTable jobLogTable, org.pentaho.di.core.logging.LogStatus status) throws org.pentaho.di.core.exception.KettleJobException, org.pentaho.di.core.exception.KettleDatabaseException
Writes information to Job Log table. Cleans old records, in case job is finished.- Throws:
org.pentaho.di.core.exception.KettleJobExceptionorg.pentaho.di.core.exception.KettleDatabaseException
-
writeLogChannelInformation
protected void writeLogChannelInformation() throws org.pentaho.di.core.exception.KettleExceptionWrite log channel information.- Throws:
org.pentaho.di.core.exception.KettleException- the kettle exception
-
writeJobEntryLogInformation
protected void writeJobEntryLogInformation() throws org.pentaho.di.core.exception.KettleExceptionWrite job entry log information.- Throws:
org.pentaho.di.core.exception.KettleException- the kettle exception
-
createDataBase
protected org.pentaho.di.core.database.Database createDataBase(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
-
isInitialized
public boolean isInitialized()
-
setInitialized
protected void setInitialized(boolean initialized)
-
isActive
public boolean isActive()
-
setActive
protected void setActive(boolean active)
-
isStopped
public boolean isStopped()
-
stopAll
public void stopAll()
Stop all activity by setting the stopped property to true.
-
setStopped
public void setStopped(boolean stopped)
Sets the stopped.
-
isFinished
public boolean isFinished()
-
setFinished
public void setFinished(boolean finished)
-
getStartDate
public Date getStartDate()
-
getEndDate
public Date getEndDate()
-
getCurrentDate
public Date getCurrentDate()
-
getDepDate
public Date getDepDate()
Gets the dep date.- Returns:
- Returns the depDate
-
getLogDate
public Date getLogDate()
-
getJobMeta
public JobMeta getJobMeta()
-
getRep
public Repository getRep()
-
getThread
public Thread getThread()
-
getJobTracker
public JobTracker getJobTracker()
-
setJobTracker
public void setJobTracker(JobTracker jobTracker)
-
setSourceRows
public void setSourceRows(List<org.pentaho.di.core.RowMetaAndData> sourceRows)
-
getSourceRows
public List<org.pentaho.di.core.RowMetaAndData> getSourceRows()
Gets the source rows.- Returns:
- the source rows
-
getParentJob
public Job getParentJob()
Gets the parent job.- Returns:
- Returns the parentJob
-
setParentJob
public void setParentJob(Job parentJob)
Sets the parent job.- Parameters:
parentJob- The parentJob to set.
-
getResult
public org.pentaho.di.core.Result getResult()
-
setResult
public void setResult(org.pentaho.di.core.Result result)
-
getBatchId
public long getBatchId()
-
setBatchId
public void setBatchId(long batchId)
-
getPassedBatchId
public long getPassedBatchId()
-
setPassedBatchId
public void setPassedBatchId(long jobBatchId)
-
setInternalKettleVariables
public void setInternalKettleVariables(org.pentaho.di.core.variables.VariableSpace var)
Sets the internal kettle variables.- Parameters:
var- the new internal kettle variables.
-
setInternalEntryCurrentDirectory
protected void setInternalEntryCurrentDirectory(boolean hasFilename, boolean hasRepoDir)
-
copyVariablesFrom
public void copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
- Specified by:
copyVariablesFromin interfaceorg.pentaho.di.core.variables.VariableSpace
-
environmentSubstitute
public String environmentSubstitute(String aString)
- Specified by:
environmentSubstitutein interfaceorg.pentaho.di.core.variables.VariableSpace
-
environmentSubstitute
public String[] environmentSubstitute(String[] aString)
- Specified by:
environmentSubstitutein interfaceorg.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:
fieldSubstitutein interfaceorg.pentaho.di.core.variables.VariableSpace- Throws:
org.pentaho.di.core.exception.KettleValueException
-
getParentVariableSpace
public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
- Specified by:
getParentVariableSpacein interfaceorg.pentaho.di.core.variables.VariableSpace
-
setParentVariableSpace
public void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
- Specified by:
setParentVariableSpacein interfaceorg.pentaho.di.core.variables.VariableSpace
-
getVariable
public String getVariable(String variableName, String defaultValue)
- Specified by:
getVariablein interfaceorg.pentaho.di.core.variables.VariableSpace
-
getVariable
public String getVariable(String variableName)
- Specified by:
getVariablein interfaceorg.pentaho.di.core.variables.VariableSpace
-
getBooleanValueOfVariable
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
- Specified by:
getBooleanValueOfVariablein interfaceorg.pentaho.di.core.variables.VariableSpace
-
initializeVariablesFrom
public void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
- Specified by:
initializeVariablesFromin interfaceorg.pentaho.di.core.variables.VariableSpace
-
listVariables
public String[] listVariables()
- Specified by:
listVariablesin interfaceorg.pentaho.di.core.variables.VariableSpace
-
setVariable
public void setVariable(String variableName, String variableValue)
- Specified by:
setVariablein interfaceorg.pentaho.di.core.variables.VariableSpace
-
shareVariablesWith
public void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
- Specified by:
shareVariablesWithin interfaceorg.pentaho.di.core.variables.VariableSpace
-
injectVariables
public void injectVariables(Map<String,String> prop)
- Specified by:
injectVariablesin interfaceorg.pentaho.di.core.variables.VariableSpace
-
getStatus
public String getStatus()
-
sendToSlaveServer
public static String sendToSlaveServer(JobMeta jobMeta, JobExecutionConfiguration executionConfiguration, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws org.pentaho.di.core.exception.KettleException
Send to slave server.- Parameters:
jobMeta- the job metaexecutionConfiguration- the execution configurationrepository- the repositorymetaStore- the metaStore- Returns:
- the string
- Throws:
org.pentaho.di.core.exception.KettleException- the kettle exception
-
addJobListener
public void addJobListener(JobListener jobListener)
-
addJobEntryListener
public void addJobEntryListener(JobEntryListener jobEntryListener)
-
removeJobListener
public void removeJobListener(JobListener jobListener)
-
removeJobEntryListener
public void removeJobEntryListener(JobEntryListener jobEntryListener)
-
getJobEntryListeners
public List<JobEntryListener> getJobEntryListeners()
-
getJobListeners
public List<JobListener> getJobListeners()
-
addParameterDefinition
public void addParameterDefinition(String key, String defValue, String description) throws org.pentaho.di.core.parameters.DuplicateParamException
- Specified by:
addParameterDefinitionin interfaceorg.pentaho.di.core.parameters.NamedParams- Throws:
org.pentaho.di.core.parameters.DuplicateParamException
-
getParameterDescription
public String getParameterDescription(String key) throws org.pentaho.di.core.parameters.UnknownParamException
- Specified by:
getParameterDescriptionin interfaceorg.pentaho.di.core.parameters.NamedParams- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
getParameterDefault
public String getParameterDefault(String key) throws org.pentaho.di.core.parameters.UnknownParamException
- Specified by:
getParameterDefaultin interfaceorg.pentaho.di.core.parameters.NamedParams- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
getParameterValue
public String getParameterValue(String key) throws org.pentaho.di.core.parameters.UnknownParamException
- Specified by:
getParameterValuein interfaceorg.pentaho.di.core.parameters.NamedParams- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
listParameters
public String[] listParameters()
- Specified by:
listParametersin interfaceorg.pentaho.di.core.parameters.NamedParams
-
setParameterValue
public void setParameterValue(String key, String value) throws org.pentaho.di.core.parameters.UnknownParamException
- Specified by:
setParameterValuein interfaceorg.pentaho.di.core.parameters.NamedParams- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
eraseParameters
public void eraseParameters()
- Specified by:
eraseParametersin interfaceorg.pentaho.di.core.parameters.NamedParams
-
clearParameters
public void clearParameters()
- Specified by:
clearParametersin interfaceorg.pentaho.di.core.parameters.NamedParams
-
activateParameters
public void activateParameters()
- Specified by:
activateParametersin interfaceorg.pentaho.di.core.parameters.NamedParams
-
copyParametersFrom
public void copyParametersFrom(org.pentaho.di.core.parameters.NamedParams params)
- Specified by:
copyParametersFromin interfaceorg.pentaho.di.core.parameters.NamedParams
-
mergeParametersWith
public void mergeParametersWith(org.pentaho.di.core.parameters.NamedParams params, boolean replace)- Specified by:
mergeParametersWithin interfaceorg.pentaho.di.core.parameters.NamedParams
-
setSocketRepository
public void setSocketRepository(SocketRepository socketRepository)
Sets the socket repository.- Parameters:
socketRepository- the new socket repository
-
getSocketRepository
public SocketRepository getSocketRepository()
Gets the socket repository.- Returns:
- the socket repository
-
getLogChannel
public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
Gets the log channel interface.- Specified by:
getLogChannelin interfaceHasLogChannelInterface- Returns:
- LogChannelInterface
-
getObjectName
public String getObjectName()
Gets the job name.- Specified by:
getObjectNamein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- jobName
-
getObjectCopy
public String getObjectCopy()
Always returns null for Job.- Specified by:
getObjectCopyin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- null
-
getFilename
public String getFilename()
Gets the file name.- Specified by:
getFilenamein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the filename
-
getLogChannelId
public String getLogChannelId()
Gets the log channel id.- Specified by:
getLogChannelIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the logChannelId
-
getObjectId
public org.pentaho.di.repository.ObjectId getObjectId()
Gets the jobMeta's object id.- Specified by:
getObjectIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- ObjectId
-
getObjectRevision
public org.pentaho.di.repository.ObjectRevision getObjectRevision()
Gets the job meta's object revision.- Specified by:
getObjectRevisionin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- ObjectRevision
-
getObjectType
public org.pentaho.di.core.logging.LoggingObjectType getObjectType()
Gets LoggingObjectType.JOB, which is always the value for Job.- Specified by:
getObjectTypein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- LoggingObjectType LoggingObjectType.JOB
-
getParent
public org.pentaho.di.core.logging.LoggingObjectInterface getParent()
Gets parent logging object.- Specified by:
getParentin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- parentLoggingObject
-
getRepositoryDirectory
public org.pentaho.di.repository.RepositoryDirectoryInterface getRepositoryDirectory()
Gets the job meta's repository directory interface.- Specified by:
getRepositoryDirectoryin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- RepositoryDirectoryInterface
-
getLogLevel
public org.pentaho.di.core.logging.LogLevel getLogLevel()
Gets the logLevel.- Specified by:
getLogLevelin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- logLevel
-
setLogLevel
public void setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)
Sets the log level.- Parameters:
logLevel- the new log level
-
getLogBufferStartLine
public int getLogBufferStartLine()
Gets the logBufferStartLine.- Returns:
- logBufferStartLine
-
setLogBufferStartLine
public void setLogBufferStartLine(int lineNr)
Sets the logBufferStartLine.- Parameters:
lineNr- the log buffer starting line for this job
-
setInitialLogBufferStartLine
public void setInitialLogBufferStartLine()
Sets logBufferStartLine based on LoggingBuffer last line number
-
getLoggingHierarchy
public List<org.pentaho.di.core.logging.LoggingHierarchy> getLoggingHierarchy()
Gets the logging hierarchy.- Returns:
- the logging hierarchy
-
isInteractive
public boolean isInteractive()
Gets the boolean value of interactive.- Returns:
- the interactive
-
setInteractive
public void setInteractive(boolean interactive)
Sets the value of interactive.- Parameters:
interactive- the interactive to set
-
getActiveJobEntryTransformations
public Map<JobEntryCopy,JobEntryTrans> getActiveJobEntryTransformations()
Gets the activeJobEntryTransformations.- Returns:
- the activeJobEntryTransformations
-
getActiveJobEntryJobs
public Map<JobEntryCopy,JobEntryJob> getActiveJobEntryJobs()
Gets the activeJobEntryJobs.- Returns:
- the activeJobEntryJobs
-
getJobEntryResults
public List<JobEntryResult> getJobEntryResults()
Gets a flat list of results in THIS job, in the order of execution of job entries.- Returns:
- A flat list of results in THIS job, in the order of execution of job entries
-
getContainerObjectId
public String getContainerObjectId()
Gets the carteObjectId.- Specified by:
getContainerObjectIdin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- the carteObjectId
-
setContainerObjectId
public void setContainerObjectId(String containerObjectId)
Sets the execution container object id (containerObjectId).- Parameters:
containerObjectId- the execution container object id to set
-
getParentLoggingObject
public org.pentaho.di.core.logging.LoggingObjectInterface getParentLoggingObject()
Gets the parent logging object.- Returns:
- the parent logging object
-
getRegistrationDate
public Date getRegistrationDate()
Gets the registration date. For job, this always returns null- Specified by:
getRegistrationDatein interfaceorg.pentaho.di.core.logging.LoggingObjectInterface- Returns:
- null
-
getStartJobEntryCopy
public JobEntryCopy getStartJobEntryCopy()
Gets the start job entry copy.- Returns:
- the startJobEntryCopy
-
setStartJobEntryCopy
public void setStartJobEntryCopy(JobEntryCopy startJobEntryCopy)
Sets the start job entry copy.- Parameters:
startJobEntryCopy- the startJobEntryCopy to set
-
getExecutingServer
public String getExecutingServer()
Gets the executing server.- Specified by:
getExecutingServerin interfaceExecutorInterface- Returns:
- the executingServer
-
setExecutingServer
public void setExecutingServer(String executingServer)
Sets the executing server.- Specified by:
setExecutingServerin interfaceExecutorInterface- Parameters:
executingServer- the executingServer to set
-
getExecutingUser
public String getExecutingUser()
Gets the executing user.- Specified by:
getExecutingUserin interfaceExecutorInterface- Returns:
- the executingUser
-
setExecutingUser
public void setExecutingUser(String executingUser)
Sets the executing user.- Specified by:
setExecutingUserin interfaceExecutorInterface- Parameters:
executingUser- the executingUser to set
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetricsin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetricsin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLoggingin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
- Specified by:
setForcingSeparateLoggingin interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
getTransactionId
public String getTransactionId()
Gets the transaction id.- Returns:
- the transactionId
-
setTransactionId
public void setTransactionId(String transactionId)
Sets the transaction id.- Parameters:
transactionId- the transactionId to set
-
getDelegationListeners
public List<DelegationListener> getDelegationListeners()
-
setDelegationListeners
public void setDelegationListeners(List<DelegationListener> delegationListeners)
-
addDelegationListener
public void addDelegationListener(DelegationListener delegationListener)
-
getArguments
public String[] getArguments()
-
setArguments
public void setArguments(String[] arguments)
-
getParentTrans
public Trans getParentTrans()
-
setParentTrans
public void setParentTrans(Trans parentTrans)
-
getExtensionDataMap
public Map<String,Object> getExtensionDataMap()
- Specified by:
getExtensionDataMapin interfaceorg.pentaho.di.core.ExtensionDataInterface
-
getStartJobEntryResult
public org.pentaho.di.core.Result getStartJobEntryResult()
-
setStartJobEntryResult
public void setStartJobEntryResult(org.pentaho.di.core.Result startJobEntryResult)
-
startHeartbeat
protected ExecutorService startHeartbeat(long intervalInSeconds)
-
shutdownHeartbeat
protected void shutdownHeartbeat(ExecutorService heartbeat)
-
callBeforeLog
public void callBeforeLog()
- Specified by:
callBeforeLogin interfaceorg.pentaho.di.core.logging.LoggingObjectLifecycleInterface
-
callAfterLog
public void callAfterLog()
- Specified by:
callAfterLogin interfaceorg.pentaho.di.core.logging.LoggingObjectLifecycleInterface
-
-