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[]
arguments
The command line arguments for the job.static String
CONFIGURATION_IN_EXPORT_FILENAME
protected Job
parentJob
The job that's launching this (sub-) job.protected Trans
parentTrans
The 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 void
activateParameters()
void
addDelegationListener(DelegationListener delegationListener)
void
addErrors(int nrToAdd)
Add a number of errors to the total number of erros that occured during execution.void
addJobEntryListener(JobEntryListener jobEntryListener)
void
addJobListener(JobListener jobListener)
void
addParameterDefinition(String key, String defValue, String description)
boolean
beginProcessing()
Handle logging at startvoid
callAfterLog()
void
callBeforeLog()
void
clearParameters()
void
copyParametersFrom(org.pentaho.di.core.parameters.NamedParams params)
void
copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace space)
protected org.pentaho.di.core.database.Database
createDataBase(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
static Job
createJobWithNewClassLoader()
String
environmentSubstitute(String aString)
String[]
environmentSubstitute(String[] aString)
void
eraseParameters()
org.pentaho.di.core.Result
execute(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.String
fieldSubstitute(String aString, org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] rowData)
void
fireJobFinishListeners()
Sets the finished flag. Then launch all the job listeners and call the jobFinished method for each.void
fireJobStartListeners()
Call all the jobStarted method for each listener.Map<JobEntryCopy,JobEntryJob>
getActiveJobEntryJobs()
Gets the activeJobEntryJobs.Map<JobEntryCopy,JobEntryTrans>
getActiveJobEntryTransformations()
Gets the activeJobEntryTransformations.String[]
getArguments()
long
getBatchId()
boolean
getBooleanValueOfVariable(String variableName, boolean defaultValue)
String
getContainerObjectId()
Gets the carteObjectId.Date
getCurrentDate()
List<DelegationListener>
getDelegationListeners()
Date
getDepDate()
Gets the dep date.Date
getEndDate()
int
getErrors()
Get the number of errors that happened in the job.String
getExecutingServer()
Gets the executing server.String
getExecutingUser()
Gets the executing user.Map<String,Object>
getExtensionDataMap()
String
getFilename()
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()
JobMeta
getJobMeta()
String
getJobname()
JobTracker
getJobTracker()
int
getLogBufferStartLine()
Gets the logBufferStartLine.org.pentaho.di.core.logging.LogChannelInterface
getLogChannel()
Gets the log channel interface.String
getLogChannelId()
Gets the log channel id.Date
getLogDate()
List<org.pentaho.di.core.logging.LoggingHierarchy>
getLoggingHierarchy()
Gets the logging hierarchy.org.pentaho.di.core.logging.LogLevel
getLogLevel()
Gets the logLevel.String
getObjectCopy()
Always returns null for Job.org.pentaho.di.repository.ObjectId
getObjectId()
Gets the jobMeta's object id.String
getObjectName()
Gets the job name.org.pentaho.di.repository.ObjectRevision
getObjectRevision()
Gets the job meta's object revision.org.pentaho.di.core.logging.LoggingObjectType
getObjectType()
Gets LoggingObjectType.JOB, which is always the value for Job.String
getParameterDefault(String key)
String
getParameterDescription(String key)
String
getParameterValue(String key)
org.pentaho.di.core.logging.LoggingObjectInterface
getParent()
Gets parent logging object.Job
getParentJob()
Gets the parent job.org.pentaho.di.core.logging.LoggingObjectInterface
getParentLoggingObject()
Gets the parent logging object.Trans
getParentTrans()
org.pentaho.di.core.variables.VariableSpace
getParentVariableSpace()
long
getPassedBatchId()
Date
getRegistrationDate()
Gets the registration date.Repository
getRep()
org.pentaho.di.repository.RepositoryDirectoryInterface
getRepositoryDirectory()
Gets the job meta's repository directory interface.org.pentaho.di.core.Result
getResult()
SocketRepository
getSocketRepository()
Gets the socket repository.List<org.pentaho.di.core.RowMetaAndData>
getSourceRows()
Gets the source rows.Date
getStartDate()
JobEntryCopy
getStartJobEntryCopy()
Gets the start job entry copy.org.pentaho.di.core.Result
getStartJobEntryResult()
String
getStatus()
Thread
getThread()
String
getTransactionId()
Gets the transaction id.String
getVariable(String variableName)
String
getVariable(String variableName, String defaultValue)
void
init()
void
initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
void
injectVariables(Map<String,String> prop)
boolean
isActive()
boolean
isFinished()
boolean
isForcingSeparateLogging()
boolean
isGatheringMetrics()
boolean
isInitialized()
boolean
isInteractive()
Gets the boolean value of interactive.boolean
isLoggingObjectInUse()
boolean
isStopped()
String[]
listParameters()
String[]
listVariables()
void
mergeParametersWith(org.pentaho.di.core.parameters.NamedParams params, boolean replace)
void
removeJobEntryListener(JobEntryListener jobEntryListener)
void
removeJobListener(JobListener jobListener)
void
resetErrors()
Set the number of occured errors to 0.void
run()
Threads main loop: called by Thread.start();static String
sendToSlaveServer(JobMeta jobMeta, JobExecutionConfiguration executionConfiguration, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
Send to slave server.protected void
setActive(boolean active)
void
setArguments(String[] arguments)
void
setBatchId(long batchId)
void
setContainerObjectId(String containerObjectId)
Sets the execution container object id (containerObjectId).void
setDelegationListeners(List<DelegationListener> delegationListeners)
void
setExecutingServer(String executingServer)
Sets the executing server.void
setExecutingUser(String executingUser)
Sets the executing user.void
setFinished(boolean finished)
void
setForcingSeparateLogging(boolean forcingSeparateLogging)
void
setGatheringMetrics(boolean gatheringMetrics)
protected void
setInitialized(boolean initialized)
void
setInitialLogBufferStartLine()
Sets logBufferStartLine based on LoggingBuffer last line numbervoid
setInteractive(boolean interactive)
Sets the value of interactive.protected void
setInternalEntryCurrentDirectory(boolean hasFilename, boolean hasRepoDir)
void
setInternalKettleVariables(org.pentaho.di.core.variables.VariableSpace var)
Sets the internal kettle variables.void
setJobTracker(JobTracker jobTracker)
void
setLogBufferStartLine(int lineNr)
Sets the logBufferStartLine.void
setLoggingObjectInUse(boolean inUse)
void
setLogLevel(org.pentaho.di.core.logging.LogLevel logLevel)
Sets the log level.void
setParameterValue(String key, String value)
void
setParentJob(Job parentJob)
Sets the parent job.void
setParentTrans(Trans parentTrans)
void
setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
void
setPassedBatchId(long jobBatchId)
void
setRepository(Repository rep)
void
setResult(org.pentaho.di.core.Result result)
void
setSocketRepository(SocketRepository socketRepository)
Sets the socket repository.void
setSourceRows(List<org.pentaho.di.core.RowMetaAndData> sourceRows)
void
setStartJobEntryCopy(JobEntryCopy startJobEntryCopy)
Sets the start job entry copy.void
setStartJobEntryResult(org.pentaho.di.core.Result startJobEntryResult)
void
setStopped(boolean stopped)
Sets the stopped.void
setTransactionId(String transactionId)
Sets the transaction id.void
setVariable(String variableName, String variableValue)
void
shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
protected void
shutdownHeartbeat(ExecutorService heartbeat)
protected ExecutorService
startHeartbeat(long intervalInSeconds)
void
stopAll()
Stop all activity by setting the stopped property to true.String
toString()
Gets the name property of the JobMeta property.void
waitUntilFinished()
Wait until this job has finished.void
waitUntilFinished(long maxMiliseconds)
Wait until this job has finished.protected void
writeJobEntryLogInformation()
Write job entry log information.protected void
writeLogChannelInformation()
Write log channel information.protected void
writeLogTableInformation(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
-
isLoggingObjectInUse
public boolean isLoggingObjectInUse()
- Specified by:
isLoggingObjectInUse
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setLoggingObjectInUse
public void setLoggingObjectInUse(boolean inUse)
-
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.KettleException
Execute 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.KettleJobException
org.pentaho.di.core.exception.KettleException
-
fireJobFinishListeners
public void fireJobFinishListeners() throws org.pentaho.di.core.exception.KettleException
Sets 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.KettleException
Call 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.KettleException
Handle 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.KettleJobException
org.pentaho.di.core.exception.KettleDatabaseException
-
writeLogChannelInformation
protected void writeLogChannelInformation() throws org.pentaho.di.core.exception.KettleException
Write log channel information.- Throws:
org.pentaho.di.core.exception.KettleException
- the kettle exception
-
writeJobEntryLogInformation
protected void writeJobEntryLogInformation() throws org.pentaho.di.core.exception.KettleException
Write 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:
copyVariablesFrom
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
environmentSubstitute
public String environmentSubstitute(String aString)
- Specified by:
environmentSubstitute
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
environmentSubstitute
public String[] environmentSubstitute(String[] aString)
- Specified by:
environmentSubstitute
in 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:
fieldSubstitute
in interfaceorg.pentaho.di.core.variables.VariableSpace
- Throws:
org.pentaho.di.core.exception.KettleValueException
-
getParentVariableSpace
public org.pentaho.di.core.variables.VariableSpace getParentVariableSpace()
- Specified by:
getParentVariableSpace
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
setParentVariableSpace
public void setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace parent)
- Specified by:
setParentVariableSpace
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
getVariable
public String getVariable(String variableName, String defaultValue)
- Specified by:
getVariable
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
getVariable
public String getVariable(String variableName)
- Specified by:
getVariable
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
getBooleanValueOfVariable
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
- Specified by:
getBooleanValueOfVariable
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
initializeVariablesFrom
public void initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace parent)
- Specified by:
initializeVariablesFrom
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
listVariables
public String[] listVariables()
- Specified by:
listVariables
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
setVariable
public void setVariable(String variableName, String variableValue)
- Specified by:
setVariable
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
shareVariablesWith
public void shareVariablesWith(org.pentaho.di.core.variables.VariableSpace space)
- Specified by:
shareVariablesWith
in interfaceorg.pentaho.di.core.variables.VariableSpace
-
injectVariables
public void injectVariables(Map<String,String> prop)
- Specified by:
injectVariables
in 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:
addParameterDefinition
in 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:
getParameterDescription
in 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:
getParameterDefault
in 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:
getParameterValue
in interfaceorg.pentaho.di.core.parameters.NamedParams
- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
listParameters
public String[] listParameters()
- Specified by:
listParameters
in interfaceorg.pentaho.di.core.parameters.NamedParams
-
setParameterValue
public void setParameterValue(String key, String value) throws org.pentaho.di.core.parameters.UnknownParamException
- Specified by:
setParameterValue
in interfaceorg.pentaho.di.core.parameters.NamedParams
- Throws:
org.pentaho.di.core.parameters.UnknownParamException
-
eraseParameters
public void eraseParameters()
- Specified by:
eraseParameters
in interfaceorg.pentaho.di.core.parameters.NamedParams
-
clearParameters
public void clearParameters()
- Specified by:
clearParameters
in interfaceorg.pentaho.di.core.parameters.NamedParams
-
activateParameters
public void activateParameters()
- Specified by:
activateParameters
in interfaceorg.pentaho.di.core.parameters.NamedParams
-
copyParametersFrom
public void copyParametersFrom(org.pentaho.di.core.parameters.NamedParams params)
- Specified by:
copyParametersFrom
in interfaceorg.pentaho.di.core.parameters.NamedParams
-
mergeParametersWith
public void mergeParametersWith(org.pentaho.di.core.parameters.NamedParams params, boolean replace)
- Specified by:
mergeParametersWith
in 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:
getLogChannel
in interfaceHasLogChannelInterface
- Returns:
- LogChannelInterface
-
getObjectName
public String getObjectName()
Gets the job name.- Specified by:
getObjectName
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
- Returns:
- jobName
-
getObjectCopy
public String getObjectCopy()
Always returns null for Job.- Specified by:
getObjectCopy
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
- Returns:
- null
-
getFilename
public String getFilename()
Gets the file name.- Specified by:
getFilename
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
- Returns:
- the filename
-
getLogChannelId
public String getLogChannelId()
Gets the log channel id.- Specified by:
getLogChannelId
in 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:
getObjectId
in 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:
getObjectRevision
in 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:
getObjectType
in 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:
getParent
in 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:
getRepositoryDirectory
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
- Returns:
- RepositoryDirectoryInterface
-
getLogLevel
public org.pentaho.di.core.logging.LogLevel getLogLevel()
Gets the logLevel.- Specified by:
getLogLevel
in 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:
getContainerObjectId
in 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:
getRegistrationDate
in 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:
getExecutingServer
in interfaceExecutorInterface
- Returns:
- the executingServer
-
setExecutingServer
public void setExecutingServer(String executingServer)
Sets the executing server.- Specified by:
setExecutingServer
in interfaceExecutorInterface
- Parameters:
executingServer
- the executingServer to set
-
getExecutingUser
public String getExecutingUser()
Gets the executing user.- Specified by:
getExecutingUser
in interfaceExecutorInterface
- Returns:
- the executingUser
-
setExecutingUser
public void setExecutingUser(String executingUser)
Sets the executing user.- Specified by:
setExecutingUser
in interfaceExecutorInterface
- Parameters:
executingUser
- the executingUser to set
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetrics
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetrics
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLogging
in interfaceorg.pentaho.di.core.logging.LoggingObjectInterface
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
- Specified by:
setForcingSeparateLogging
in 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:
getExtensionDataMap
in 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:
callBeforeLog
in interfaceorg.pentaho.di.core.logging.LoggingObjectLifecycleInterface
-
callAfterLog
public void callAfterLog()
- Specified by:
callAfterLog
in interfaceorg.pentaho.di.core.logging.LoggingObjectLifecycleInterface
-
-