About Spark job migration

Cloudera Migration Assistant moves Spark jobs from Cloudera Data Engineering to Cloudera Data Engineering on Anywhere Cloud. It copies each job and its resources, uses Code Migrator to refactor the code for the target Spark version, and creates the job on the target after you review the changes.

Job types

Cloudera Migration Assistant migrates these Spark job types:

  • Python jobs
  • Scripts that run with a Python virtual environment
  • Java and Scala jobs

How Spark migration works

  1. Cloudera Migration Assistant downloads the resources of the selected jobs from the source virtual cluster, and commits them to the base branch of an intermediate Git repository. It then creates a plan branch with a copy of the files for the Spark version of the target virtual cluster.
  2. Code Migrator refactors the copy for the target Spark version. It runs one job for each pair of source and target virtual clusters, and writes the changes of each job to its own branch.
  3. You review the changes, and then mark the review step as completed.
  4. Cloudera Migration Assistant merges the changes into the plan branch.
  5. Cloudera Migration Assistant uploads the resources to Cloudera Data Engineering on Anywhere Cloud, and creates the jobs there.
  6. Cloudera Migration Assistant merges the plan branch into the base branch. The base branch then holds both the original files and the migrated files.

Intermediate repository layout

The intermediate repository is the cde-deployments repository of the built-in Git server. Cloudera Migration Assistant keeps the files of each source virtual cluster in their own folder, [***HOST***]/[***ENVIRONMENT***]/[***SERVICE***]/[***VIRTUAL CLUSTER***]/. Here [***HOST***] is the control plane host of the source, or _ when the source has none. In the table, this folder is shown as [***VC***].

Table 1. Folders of intermediate repository
Folder Branch What it holds
[***VC***]/Resources/original/[***RESOURCE***]/ Base branch The files of each resource as they are on the source. Cloudera Migration Assistant does not upload them.
[***VC***]/Resources/[***SPARK VERSION***]/[***RESOURCE***]/ Plan branch, and the base branch after the migration The copy that Code Migrator refactors and that Cloudera Migration Assistant uploads to the target. [***SPARK VERSION***] is the Spark version of the target virtual cluster, for example 3.5.4.
[***VC***]/JobConfigurations/original/ Base branch One file for each job, with its Spark configuration, its arguments, and its driver and executor sizing, as they are on the source.
[***VC***]/JobConfigurations/[***SPARK VERSION***]/ Plan branch, and the base branch after the migration The copy of the job files that Cloudera Migration Assistant uses to create the jobs on the target.

The plan branch is named plan-[***PLAN-ID***]-[***TRANSITION-ID***]. Cloudera Migration Assistant opens a pull request for it, so you can review all the changes of the execution in one place, and merges the pull request in the last step of the execution. When you run the plan again, Cloudera Migration Assistant downloads only the resources that changed on the source since the last run. It does not replace jobs or files that already exist on the target. See Phased migrations.