public final class OdiSession extends oracle.odi.domain.support.AbstractOdiEntity implements IWorkRuntimeOdiEntity, IRuntimeExecutable
An OdiSession is an execution (of a scenario, an interface, a package or a procedure, ...)
undertaken by an execution agent. OdiSession is the root entity in OdiSession
- OdiSessionVariable - OdiSessionStepLog. It is identified by a unique session ID that
can be obtained from getSessionId() method call.
Life cycle of an OdiSession begins when it is created / prepared from a scenario, an interface,
etc. Once prepared, ODI Execution Engine can execute it. Life cycle ends when the session is removed from
runtime repository.
| Constructor and Description |
|---|
OdiSession(java.lang.String pSessionName,
ExecutionMode pExeMode,
Status pSessionStatus,
java.lang.String pExeContext)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSessionCustomStep(OdiSessionCustomStep pSessionCustomStep)
Adds the
OdiSessionCustomStep to this OdiSession. |
void |
addSessionCustomTask(OdiSessionCustomTask pSessionCustomTask)
Adds the
OdiSessionCustomTask to this OdiSession. |
void |
addSessionCustomVariable(OdiSessionCustomVariable pSessionCustomVariable)
Adds the
OdiSessionCustomVariable to this OdiSession. |
void |
addSessionParameter(OdiSessionParameter pSessionParameter)
Add the given
OdiSessionParameter to the collection of OdiSessionParameters. |
void |
addSessionStepLog(OdiSessionStepLog pSessionStepLog) |
java.lang.String |
getAgentCreationTime() |
java.lang.String |
getAgentName()
Returns the name of the agent that manage this
OdiSession. |
java.lang.String |
getAgentThreadId() |
int |
getChildSessionCount()
Obtains the count of child
OdiSession. |
java.lang.String |
getContextCode()
Returns the execution context code for this
OdiSession. |
java.lang.String |
getDebugClientId()
INTERNAL: Returns id of the debug client connected to this session.
|
java.lang.Integer |
getDeleteCount()
Deprecated.
consider using
getDeleteCountLong() instead. |
java.lang.Long |
getDeleteCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
|
java.lang.Integer |
getDuration()
Returns the duration of the
OdiSession execution in second, or null if not yet defined
(i.e. |
java.util.Date |
getEndTime()
Returns the end time of the
OdiSession, or null if the session isn't yet finished. |
java.lang.Integer |
getErrorCount()
Deprecated.
consider using
getErrorCountLong() instead. |
java.lang.Long |
getErrorCountLong()
Obtains number of errors of this session i.e.
|
java.lang.String |
getErrorMessage()
Obtains the error message of this
OdiSession if failed, or null if the
session successfully ended. |
java.lang.Long |
getEssJobId()
Returns the ID of ESS Job which started this
OdiSession. |
java.lang.String |
getEssRequestExecutionContext()
Returns the RequestExecutionContext of ESS Job which started this
OdiSession. |
ExecutionMode |
getExecutionMode()
Returns execution mode for this OdiSession.
|
java.lang.String |
getExternalId()
Obtains the Oozie Id for this
OdiSession. |
java.lang.String |
getExternalName()
Obtains the Oozie application path for this
OdiSession. |
java.lang.String |
getExternalUrl()
Obtains the Url for the Oozie Console for this
OdiSession. |
int |
getFailedChildSessionCount()
Obtains the count of failed child
OdiSession. |
OdiSessionStepLog |
getFailureStepLog()
Return the step log (
OdiSessionStepLog) that caused the session's failure. |
java.lang.Integer |
getInsertCount()
Deprecated.
consider using
getInsertCountLong() instead. |
java.lang.Long |
getInsertCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
|
java.io.Serializable |
getInternalId()
Provides a common getter for the persistence layer to obtain an identity,
irrespective of the actual type of identity used.
|
java.lang.String |
getKeywordsAsString()
Obtains comma separated list of keywords associated with
OdiSession. |
LogLevel |
getLogLevel()
Deprecated.
As of 11.1.1.5 this method is replaced by #getExecutionMode()
|
java.lang.String |
getMasterAgentName()
Returns the name of agent received execution request for this session.
|
java.lang.String |
getName()
Returns the name of this
OdiSession (i.e. |
java.lang.Integer |
getNumberOfRuns()
Obtains the number of runs this
OdiSession has been run/restarted. |
java.lang.Number |
getParentSessionId()
Obtains the ID of parent
OdiSession. |
java.lang.Integer |
getRecordCount()
Deprecated.
consider using
getRecordCountLong() instead. |
java.lang.Long |
getRecordCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
|
java.lang.String |
getReturnCode()
Obtains the return code of this
OdiSession. |
OdiSessionStepLog |
getRunningStepLog()
Obtains the current running step log (
OdiSessionStepLog), or null if the execution is not
yet started or is finished. |
OdiSessionBlueprint |
getSessionBlueprint()
Returns related
OdiSessionBlueprint, representing the execution plan of this session. |
java.util.Collection |
getSessionCustomSteps()
Returns the unmodifiable collection of related
OdiSessionCustomSteps |
java.util.Collection |
getSessionCustomTasks()
Returns the unmodifiable collection of related
OdiSessionCustomTasks |
java.util.Collection |
getSessionCustomVariables()
Returns the unmodifiable collection of related
OdiSessionCustomVariables |
java.lang.Number |
getSessionId()
Returns the ID of this
OdiSession. |
OdiSessionParameter |
getSessionParameter(java.lang.String pName)
Fetches the
OdiSessionParameter with name pName. |
java.util.Collection |
getSessionParameters()
Obtains the unmodifable collection of
OdiSessionParameters. |
java.util.Collection |
getSessionSequences()
Deprecated.
|
java.util.List |
getSessionStepLogs()
Obtains the ordered list of executed steps' logs (
OdiSessionStepLog). |
java.util.Collection |
getSessionVariables()
Deprecated.
|
Tag |
getSourceScenarioTag()
Deprecated.
replaced by
#getSessionBlueprint().getSourceScenarioTag() |
java.util.Date |
getStartTime()
Returns the start time of the
OdiSession, or null if the session isn't started yet. |
java.lang.String |
getStartupVariables() |
Status |
getStatus()
Obtains the current status of this
OdiSession. |
java.util.List |
getSteps()
Deprecated.
consider using
OdiSessionBlueprintStep instead. |
java.lang.String |
getSubmitterName()
Obtains actual ODI user name that has submitted the
OdiSession. |
int |
getSuccessfulChildSessionCount()
Obtains the count of successful child
OdiSession. |
java.lang.String |
getSummaryMessage()
Obtains the summary of execution for this
OdiSession for Oozie sessions and returns null for ODI native sessions. |
java.lang.Integer |
getUpdateCount()
Deprecated.
consider using
getUpdateCountLong() instead. |
java.lang.Long |
getUpdateCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
|
boolean |
isDebuggable()
Returns
true if the session can be debugged, false otherwise. |
boolean |
isEssJobSession()
Returns true if this
OdiSession was started by ESS Job, false otherwise. |
boolean |
isInstanceLevelSecurityNeeded()
Internal: this method is for internal purpose and must not be considered
as part of the public API.
|
boolean |
isOozieSession()
Returns
true if the session is Oozie Session, false otherwise. |
boolean |
isOwbJobSession()
Returns
true if the session is OWB Job, false otherwise. |
boolean |
isSessionStartedSynchronously() |
void |
removeSessionParameter(OdiSessionParameter pSessionParameter)
Remove the given
OdiSessionParameter from the collection of OdiSessionParameters. |
void |
removeStep(IRuntimeStep pStep)
Deprecated.
consider using
OdiSessionBlueprintStep instead. |
void |
setAgentCreationTime(java.lang.String pCreationTime) |
void |
setAgentThreadId(java.lang.String pAgentThreadId) |
void |
setSessionStartedSynchronously(boolean pSessionStartedSynchronously) |
void |
setSourceScenarioTag(Tag pTag)
Deprecated.
Source Scenario Tag property is owned by
OdiSessionBlueprint from now, and
thus it may be common for a number of Sessions. So its modification is not possible
at this level. |
void |
setStartupVariables(java.lang.String pStartupVariables) |
void |
setStatus(Status pStatus)
Set the current status of this session.
|
getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, isNew, preCommit, toStringequals, getBigNumericId, getGlobalId, getNumericId, getParent, hashCodegetFirstDate, getFirstUser, getLastDate, getLastUsergetGlobalId, getParentpublic OdiSession(java.lang.String pSessionName,
ExecutionMode pExeMode,
Status pSessionStatus,
java.lang.String pExeContext)
OdiSession(OdiSessionBlueprint, String, ExecutionMode, Status, String)public void removeStep(IRuntimeStep pStep)
OdiSessionBlueprintStep instead.removeStep in interface IRuntimeExecutablepublic java.util.List getSteps()
OdiSessionBlueprintStep instead.getSteps in interface IRuntimeExecutablepublic java.io.Serializable getInternalId()
IRepositoryEntity
Typically a subclass will delegate to a public
SomePrimitiveWrapper getId() method. The necessity for the
getInternalId() abstract method is solely because the
persistence layer needs a way of obtaining the identity irrespective of
the actual identity implementation choice.
Returning null from this method will indicate the object has
never been saved. This will likely be relied on by some DAO
implementations.
getInternalId in interface IRepositoryEntitypublic java.lang.String getName()
OdiSession (i.e. the name of the element that produce this
session, this means the package, variable, scenario, etc.).getName in interface IOdiEntitygetName in class oracle.odi.domain.support.AbstractOdiEntityOdiSessionpublic java.lang.Number getSessionId()
OdiSession.OdiSessionpublic Status getStatus()
OdiSession.OdiSessionsetStatus(Status)public java.lang.String getAgentName()
OdiSession.public java.lang.String getContextCode()
OdiSession.public Tag getSourceScenarioTag()
#getSessionBlueprint().getSourceScenarioTag()null if not executed from scenario.public void setSourceScenarioTag(Tag pTag)
OdiSessionBlueprint from now, and
thus it may be common for a number of Sessions. So its modification is not possible
at this level.pTag - tag to setpublic java.lang.String getSubmitterName()
OdiSession.OdiSessionpublic boolean isInstanceLevelSecurityNeeded()
IOdiEntityDefines a method to capture the info on which object needs instance level privilege.
isInstanceLevelSecurityNeeded in interface IOdiEntityisInstanceLevelSecurityNeeded in class oracle.odi.domain.support.AbstractOdiEntitytrue if instance level security needed,
false otherwisepublic java.lang.String getKeywordsAsString()
OdiSession.
Keywords are used to distribute this OdiSession into OdiSessionFolder.OdiSessionpublic java.util.Date getStartTime()
OdiSession, or null if the session isn't started yet.OdiSessionpublic java.util.Date getEndTime()
OdiSession, or null if the session isn't yet finished.OdiSessionpublic java.lang.Integer getDuration()
OdiSession execution in second, or null if not yet defined
(i.e. the execution is still running).OdiSession execution in secondpublic java.lang.String getReturnCode()
OdiSession.
The return code is obtained from the execution channel of the last task, e.g. operating system code, database error code, etc. It will be "0" (zero) in case of success.
OdiSessionpublic java.lang.String getErrorMessage()
OdiSession if failed, or null if the
session successfully ended.OdiSession if failedpublic int getChildSessionCount()
OdiSession.OdiSessionpublic int getSuccessfulChildSessionCount()
OdiSession.OdiSessionpublic int getFailedChildSessionCount()
OdiSession.OdiSessionpublic java.util.List getSessionStepLogs()
OdiSessionStepLog).
If a running step exists it will be the last one in the returned list.OdiSessionStepLog)public OdiSessionStepLog getFailureStepLog()
OdiSessionStepLog) that caused the session's failure. If the session didn't
failed, than method will always return null. However, it can be null even if
session is failed (e.g. session failed at preparation time).OdiSessionStepLog) that caused the session's failure, or null
if the session didn't failedpublic OdiSessionStepLog getRunningStepLog()
OdiSessionStepLog), or null if the execution is not
yet started or is finished.OdiSessionStepLog)public java.lang.Number getParentSessionId()
OdiSession.OdiSessionpublic java.lang.Integer getRecordCount()
getRecordCountLong() instead.Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of records processed by this session i.e. the sum of records processed by each steps of this OdiSession.
null if not applicableOdiSessionStepLog.getRecordCount()public java.lang.Long getRecordCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of records processed by this session i.e. the sum of records processed by each steps of this OdiSession.
null if not applicableOdiSessionStepLog.getRecordCountLong()public java.lang.Integer getInsertCount()
getInsertCountLong() instead.Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows inserted during execution of this session i.e. the sum of insert made by each steps of this OdiSession.
OdiSessionStepLog.getInsertCount()public java.lang.Long getInsertCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows inserted during execution of this session i.e. the sum of insert made by each steps of this OdiSession.
OdiSessionStepLog.getInsertCountLong()public java.lang.Integer getUpdateCount()
getUpdateCountLong() instead.Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows updated during execution of this session i.e. the sum of update made by each steps of this OdiSession.
OdiSessionStepLog.getUpdateCount()public java.lang.Long getUpdateCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows updated during execution of this session i.e. the sum of update made by each steps of this OdiSession.
OdiSessionStepLog.getUpdateCountLong()public java.lang.Integer getDeleteCount()
getDeleteCountLong() instead.Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows deleted during execution of this session i.e. the sum of delete made by each steps of this OdiSession.
OdiSessionStepLog.getDeleteCount()public java.lang.Long getDeleteCountLong()
Relevant for Interfaces and Procedures and any execution that manipulates data.
Obtains overall numbers of rows deleted during execution of this session i.e. the sum of delete made by each steps of this OdiSession.
OdiSessionStepLog.getDeleteCountLong()public java.lang.Integer getErrorCount()
getErrorCountLong() instead.Obtains number of errors of this session i.e. the sum of errors of each steps of this OdiSession.
OdiSessionStepLog.getErrorCount()public java.lang.Long getErrorCountLong()
Obtains number of errors of this session i.e. the sum of errors of each steps of this OdiSession.
OdiSessionStepLog.getErrorCount()public java.lang.Integer getNumberOfRuns()
Obtains the number of runs this OdiSession has been run/restarted.
public java.lang.String getExternalId()
Obtains the Oozie Id for this OdiSession.
public java.lang.String getExternalName()
Obtains the Oozie application path for this OdiSession.
public java.lang.String getExternalUrl()
Obtains the Url for the Oozie Console for this OdiSession.
public java.lang.String getSummaryMessage()
Obtains the summary of execution for this OdiSession for Oozie sessions and returns null for ODI native sessions.
public java.util.Collection getSessionVariables()
OdiSessionBlueprint and OdiSessionBlueprintVariableOdiSession.OdiSessionVariablepublic java.util.Collection getSessionSequences()
OdiSessionBlueprint and OdiSessionBlueprintSequenceOdiSession.OdiSessionSequencepublic boolean isEssJobSession()
OdiSession was started by ESS Job, false otherwise.OdiSession was started by ESS Job, false otherwisepublic java.lang.Long getEssJobId()
OdiSession.OdiSessionjava.lang.IllegalStateException - if this OdiSession is not ESS Job relatedpublic java.lang.String getEssRequestExecutionContext()
OdiSession.OdiSessionjava.lang.IllegalStateException - if this OdiSession is not ESS Job relatedpublic java.util.Collection getSessionParameters()
OdiSessionParameters.addSessionParameter(OdiSessionParameter),
removeSessionParameter(OdiSessionParameter)@Deprecated public LogLevel getLogLevel()
public ExecutionMode getExecutionMode()
ExecutionModepublic java.lang.String getMasterAgentName()
agentName if the agent involved in load
balancing.public java.lang.String getAgentThreadId()
public void setAgentThreadId(java.lang.String pAgentThreadId)
public java.lang.String getAgentCreationTime()
public void setAgentCreationTime(java.lang.String pCreationTime)
public boolean isSessionStartedSynchronously()
public void setSessionStartedSynchronously(boolean pSessionStartedSynchronously)
public java.lang.String getStartupVariables()
public void setStartupVariables(java.lang.String pStartupVariables)
public void setStatus(Status pStatus)
pStatus - the statusgetStatus()public boolean isOwbJobSession()
true if the session is OWB Job, false otherwise.public boolean isOozieSession()
true if the session is Oozie Session, false otherwise.public boolean isDebuggable()
true if the session can be debugged, false otherwise.public java.lang.String getDebugClientId()
public OdiSessionBlueprint getSessionBlueprint()
OdiSessionBlueprint, representing the execution plan of this session.OdiSessionBlueprintpublic java.util.Collection getSessionCustomSteps()
OdiSessionCustomStepsOdiSessionCustomStepspublic java.util.Collection getSessionCustomTasks()
OdiSessionCustomTasksOdiSessionCustomTaskspublic java.util.Collection getSessionCustomVariables()
OdiSessionCustomVariablesOdiSessionCustomVariablespublic void addSessionCustomStep(OdiSessionCustomStep pSessionCustomStep)
OdiSessionCustomStep to this OdiSession.pSessionCustomStep - OdiSessionCustomStep to addpublic void addSessionCustomVariable(OdiSessionCustomVariable pSessionCustomVariable)
OdiSessionCustomVariable to this OdiSession.pSessionCustomVariable - OdiSessionCustomVariable to addpublic void addSessionCustomTask(OdiSessionCustomTask pSessionCustomTask)
OdiSessionCustomTask to this OdiSession.pSessionCustomTask - OdiSessionCustomTask to addpublic void addSessionStepLog(OdiSessionStepLog pSessionStepLog)
public void addSessionParameter(OdiSessionParameter pSessionParameter)
OdiSessionParameter to the collection of OdiSessionParameters.
This will also set the Session of the given OdiSessionParameter to this OdiSession instance.pSessionParameter - an OdiSessionParameter objectDomainRuntimeException - if pSessionParameter is null or if a Session Parameter with the same name already exists in this OdiSessionpublic void removeSessionParameter(OdiSessionParameter pSessionParameter)
OdiSessionParameter from the collection of OdiSessionParameters.OdiSessionParameter - OdiSessionParameter object to be removedDomainRuntimeException - if pSessionParameter is null or belongs to a different OdiSessionpublic OdiSessionParameter getSessionParameter(java.lang.String pName)
OdiSessionParameter with name pName.
Returns null if no OdiSessionParameter with name pName exists in this SessionpName - Name of the Session Parameter to fetchpName.DomainRuntimeException - if pName is null