Skip to content

java APIs

Sri Harsha Boda edited this page Sep 15, 2017 · 1 revision

JAVA APIs

1.InitJob

DESCRIPTION : This is used to call the InitJob stored procedure. The input/ output parameters are described as follows.

INPUTS:

processId : This is the process id of the process which needs to be started using the InitJob stored procedure.

maxBatch : This denotes the maximum number of batches that a process would take before the process begins to run.

EXECUTION : The class InitJobRowInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as per the following format:

-- process-id 74 --max_batch 20

The stored procedure is then called by:
InitJobRowInfos = s.selectList ("call_procedures.InitJob", initJobRowInfo);

where initJobRowInfo is an object of class InitJobRowInfo. This takes care of mapping the individual rows of the selection returned by InitJob procedure to the initJobRowInfo object.

OUTPUTS : Returns a list of objects of type InitJobRowInfo, which are further processed in OozieInitJob to obtain the outputs in the necessary formats. In OozieInitJob class, the data from initJobRowInfo is parsed to obtain the following outputs:

  • Minimum and maximum batch ids for each sub process.
  • Minimum and maximum batch dates for each sub process.
  • batch Marking
  • Process run Id *Last Recoverable Sub Process Id.

2.Init Step

Calls the IntStep stored procedure. The input/ output parameters are as described :

INPUTS:

subPid : Process Id of the current sub-process to be started using the Init Step stored procedure

EXECUTION: The class InitStepInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as command line arguments as per the following format:

-- Sub-process-id 2

The stored procedure is then called by the following statement:

        s.selectOne ("call_procedures.InitStep", initStepInfo);

where initStepInfo is an object of class InitStepInfo. This takes care of mapping the output parameters to the initStepInfo object.

OUTPUT : subProcessRunId : Process run id of the sub process that just started

3.HaltStep

INPUTS :

subPid : Process Id of the current sub-process to be ended using the HaltStep stored procedure.

EXECUTION : The class HaltStepInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as command line arguments as per the following format:

-- sub-process-id 2

The stored procedure is then called by the following statement:

       s.selectOne ("call_procedures.HaltStep", haltStepInfo);

where haltStepInfo is an object of class HaltStepInfo. This takes care of mapping the output parameters to the haltStepInfo object. OUTPUT : No output

4.HaltJob

Calls the HaltJob stored procedure. Input/ output parameters are as described :

INPUTS :

processId : This is the process id of the process which needs to be started using the HaltJob stored procedure.

batch_marking : Metadata associated with each batch. It’s actually the comma separated date values in YYYY-MM-DD format if there is a date associated in the batch. Example 2014-06-15,2014-06-17.

EXECUTION : The class HaltJobInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as command line arguments as per the following format:

-- process-id 1 -- batch-marking ‘2014-06-15,2014-06-17’

The stored procedure is then called by the following statement:

          s.selectOne ("call_procedures.HaltJob", haltJobInfo);

where haltJobInfo is an object of class HaltJobInfo. This takes care of mapping the output parameters to the haltJobInfo object.

5.TermStep

Calls the TermStep stored procedure. Input/ output parameters are as described :

INPUTS :

subPid : Process Id of the current sub-process to be ended using the TermStep stored procedure.

EXECUTION : The class TermStepInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as command line arguments as per the following format:

-- sub-process-id 2

The stored procedure is then called by the following statement:

       s.selectOne ("call_procedures.TermStep", termStepInfo);

where termStepInfo is an object of class FailStepInfo. This takes care of mapping the output parameters to the termStepInfo object.
OUTPUT : No output

6.TermJob

INPUTS :

processId : This is the process id of the process which needs to be failed using the TermJob stored procedure.

EXECUTION : The class TermJobInfo has all the input and output parameters and their getter, setter methods which are used by Mybatis to set values for the parameters. The input parameters are entered as command line arguments as per the following format:

-- process-id 74

The stored procedure is then called by the following statement:

        s.selectOne("call_procedures.TermJob", termJobInfo);

where termJobInfo is an object of class TermJobInfo This takes care of mapping the output parameters to the termJobInfo object.

OUTPUT : No output

Clone this wiki locally