Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

IDIEP-103
Author
Sponsor
Created

 

Status


Status
colourBlue
titleDRAFTIN PROGRESS

Table of Contents

Motivation

...

  1. Get a class loader which is identified by an array of DeploymentUnit instances passed to the called method.
  2. If the class loader doesn’t exist yet, then create it:
    1. If the deployment unit is deployed and can be used for code execution then use its location for class loading
    2. If the deployment unit is deployed to the cluster but is not deployed to the node then initiate deployment on-demand.
    3. If the deployment unit doesn’t exist, throw the public DeploymentUnitUnavailableException with <class_fqdn>. Deployment unit <deployment_unit_id_and ver> doesn’t exist message, where <class_fqdn> is a compute job/class class name, <deployment_unit_id_and_ver> is a concatenation of ID and version (e.g. com.example:1.0.0) and <class_fqdn> is a name of class which represents a job for execution.
    1. If the deployment unit exists but can’t be used for code execution, throw the public DeploymentUnitUnavailableException with <class_fqdn>. Deployment unit <deployment_unit_id> can’t be used: [clusterStatus = <clusterDURecord.status>, nodeStatus = <nodeDURecord.status>] message, where <class_fqdn> is a compute job/class class name.
    1. For each deployment unit check that it is deployed:
    2. Check that deployment unit can be used for code execution:
  3. Load a class of task/job passed to the Compute API method as parameter. At this point ClassNotFoundException could be thrown from the class loader. Consider this exception as a job execution time exception (see the next step).
  4. Execute required code. At this point any standard Java exception or  job specific exception could be thrown. Consider any of these exceptions as a job execution time exception and throw public ComputeExecutionException which contains an original exception as a cause.

...