[ https://issues.apache.org/jira/browse/IGNITE-19517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey N. Gura updated IGNITE-19517: ------------------------------------ Labels: iep-103 ignite-3 (was: ignite-3) > Add class resolution mechinism to compute > ----------------------------------------- > > Key: IGNITE-19517 > URL: https://issues.apache.org/jira/browse/IGNITE-19517 > Project: Ignite > Issue Type: New Feature > Reporter: Mikhail Pochatkin > Priority: Major > Labels: iep-103, ignite-3 > > h4. Regular behavior > As soon as code execution is initiated due to invocation one of the methods > execute, executeColocated or broadcast the following steps must be performed: > > # Get a class loader which is identified by an array of DeploymentUnit > instances passed to the called method. > # If the class loader doesn’t exist yet, then create it: > # For each deployment unit check that it is deployed: > # If the deployment unit is deployed and can be used for code execution then > use its location for class loading > # If the deployment unit is deployed to the cluster but is not deployed to > the node then initiate deployment on-demand. > # If the deployment unit doesn’t exist, throw ClassNotFoundException with > _“<class_fqdn>. Deployment unit <deployment_unit_id_and ver> doesn’t exist”_ > message, where _<deployment_unit_id_and_ver>_ is a concatenation of ID and > version (e.g. com.example:1.0.0) > # Check that deployment unit can be used for code execution: > # If the deployment unit exists but can’t be used for code execution, throw > ClassNotFoundException with _“<class_fqdn>. Deployment unit > <deployment_unit_id> can’t be used: [clusterStatus = > <clusterDURecord.status>, nodeStatus = <nodeDURecord.status>]”_ message. > # 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. > # Execute required code. > In order to have the possibility to detect that some code is in progress and > uses some class loader a reference counter could be used. The counter must be > incremented when job execution is started and decremented when code execution > is finished. -- This message was sent by Atlassian Jira (v8.20.10#820010)