Skip navigation links

Oracle Fusion Middleware External Executors Java API Reference for Oracle Business Intelligence Data Warehouse Administration Console
11g Release 1 (11.1.1)

E20491-01


com.oracle.dac.thirdparty.executor
Interface DACExecutorJob


public interface DACExecutorJob

DACExecutorJob runs actual tasks on external ETL engine. Jobs are created by executors during ETL. One job is responsible to run one task. Jobs are also initialized in the executor using task parameters. DACExecutorJob should implement a synchronous call to ETL engine and report back the execution status.

Since:
DAC 11.1.1.5.0

Method Summary
 void abort()
          Aborts a job.
 void attach(java.sql.Timestamp etlActualStartTime)
          If and when the DAC Server goes down, and is brought back up, one of the three options below may apply to the tasks that are submitted on the external executors: - have completed - have failed - still running.
 void cleanUp()
          Cleans up after execution is over.
 void execute()
          Executes job.
 java.lang.String getDescription()
          Returns detailed description of the job result.
 int getErrorCode()
          Returns execution error code.
 java.lang.Long getFailedRows()
           
 java.lang.Long getNumberOfRowsRead()
          Returns the number of rows read from the source(s).
 java.lang.Long getNumberOfRowsWritten()
          Returns the number of rows written into the target(s).
 java.lang.Long getReadThruput()
          Returns the average number of rows per second read from the source.
 java.lang.String getStatus()
          Returns status.
 java.lang.Long getSuccessRows()
          Returns the number of rows successfully processed.
 java.lang.Long getWriteThruput()
          Returns average number of rows per second written to the target.
 boolean wasAttachedProcessRunning()
          This method is called after the attach(Timestamp etlActualStartTime) method is called.

 

Method Detail

execute

void execute()
             throws DACExecutorJobException
Executes job. Synchronous call needs to be implemented.
Throws:
DACExecutorJobException - if there is an error while submitting or executing the job

abort

void abort()
Aborts a job.

cleanUp

void cleanUp()
Cleans up after execution is over.

getErrorCode

int getErrorCode()
Returns execution error code. 0 indicates success, anything else means failure.
Returns:
execution error code

getStatus

java.lang.String getStatus()
Returns status. Values like Succeeded, Completed, Failed are expected. It is only used for logging, actual success or failure determined by error code.
Returns:
string describing execution status

getDescription

java.lang.String getDescription()
Returns detailed description of the job result.
Returns:
detailed description of the job result

getSuccessRows

java.lang.Long getSuccessRows()
Returns the number of rows successfully processed.
Returns:
the number of rows

getFailedRows

java.lang.Long getFailedRows()
Returns:
the number of rows that could not be successfully processed

getNumberOfRowsRead

java.lang.Long getNumberOfRowsRead()
Returns the number of rows read from the source(s).
Returns:
the number of rows read from the source(s)

getNumberOfRowsWritten

java.lang.Long getNumberOfRowsWritten()
Returns the number of rows written into the target(s).
Returns:
the number of rows written into the target(s)

getReadThruput

java.lang.Long getReadThruput()
Returns the average number of rows per second read from the source.
Returns:
average number of rows per second read from the source

getWriteThruput

java.lang.Long getWriteThruput()
Returns average number of rows per second written to the target.
Returns:
average number of rows per second written to the target

attach

void attach(java.sql.Timestamp etlActualStartTime)
            throws DACExecutorJobException
If and when the DAC Server goes down, and is brought back up, one of the three options below may apply to the tasks that are submitted on the external executors: - have completed - have failed - still running. This method is invoked when DAC server is restarted, and the left over execution plan resumes. It is used to check whether the task that was submitted is still running on the external system and if so wait for it to complete. Make sure this is a blocking call, it should not return until the process completes. Do the necessary polling inside before returning. Prior to returning couple of member variables that store the error code, and the status description should be populated. If the task has completed since the ETL started, then you should set the error code to 0. Once DAC receives error code 0,it will not attempt to rerun the task. If the task has failed since the ETL started, set the error code to a non-zero value. If its still running, in this method, you should wait for it to complete. If you are waiting, set a boolean to remember that the process was running. This will be returned in the method called wasAttachedProcessRunning(). * If the task did not even start since the actual ETL start time, make sure the error code reflects a non-zero value.
Parameters:
etlActualStartTime - the start time of the previous ETL attempt
Throws:
DACExecutorJobException

wasAttachedProcessRunning

boolean wasAttachedProcessRunning()
This method is called after the attach(Timestamp etlActualStartTime) method is called. Its important to know if the process was indeed running when the DAC server was restarted, and the incomplete execution plan resumes. If the process was running, and fails, DAC would not restart the task. If the process was not running, and the error code of the job is a non-zero value, then the task will be resubmitted for execution.
Returns:
true, if the process was still running when attach function was called. Fails - if it already succeeded/failed or never even ran

Skip navigation links

Oracle Fusion Middleware External Executors Java API Reference for Oracle Business Intelligence Data Warehouse Administration Console
11g Release 1 (11.1.1)

E20491-01


Copyright © 2003, 2011, Oracle. All rights reserved.