Table of Contents |
---|
...
Deploys a deployment unit with identifier <deployment_unit_id>
to the cluster.
Code Block | ||
---|---|---|
| ||
$ ignite3 unit deploy <deployment_unit_id> --version <deployment_unit_version> --path <file>|<dir> |
...
The deployment unit must be uploaded to the CMG Raft group majority nodes and must include a leader in the current term (Fig. 1 shows an example of such a majority with an included leader but it is not mandatory). It will ensure that the system is able to detect the change of leader and deploy units correctly; the leader is always a part of the majority during the uploading process.
While majority nodes are available there is at least one node which has an uploaded deployment unit and this deployment unit could be deployed on another node on demand. Otherwise the cluster itself can’t operate correctly.
...
depOpId
the meta storage revision number.clusterDURecord(depOpId, UPLOADING)
. This operation could fail because another process has already created a record for the same deployment unit in any status.nodeDURecord(depOpId, UPLOADING, node)
.nodeDURecord.status
must be changed to DEPLOYED
value - nodeDURecord(depOpId, DEPLOYED, node)
.clusterDURecord.status
must be changed to DEPLOYED
value - clusterDURecord(depOpId, DEPLOYED)
....
DeploymentUnit
instances passed to the called method.ClassNotFoundException
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
).ClassNotFoundException
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.ClassNotFoundException
could be thrown from the class loader. Consider this exception as a job execution time exception (see the next step).ComputeExecutionException
which contains an original exception as a cause.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.
...