Migrating Cloudera Data Engineering Spark jobs

Migrate Spark jobs from Cloudera Data Engineering to Cloudera Data Engineering on Anywhere Cloud by using a workload plan. Code Migrator refactors the jobs for the target Spark version, and you review the changes before Cloudera Migration Assistant creates the jobs on the target.

  • The source Cloudera Data Engineering service and the target Cloudera Data Engineering service on Anywhere Cloud are registered, and you have a user connection for each. For the source service, see Registering Cloudera Data Engineering services. For the target service on Anywhere Cloud, see Registering Cloudera Workflow Orchestrator. See also Managing user connections.
  • The source service and the target service are scanned. Cloudera Migration Assistant uses the scan of the target to list its virtual clusters and their Spark versions. See Scanning clusters.
  • Code Migrator is available. It is displayed when Enable LLM is on in the engine configuration of the Cloudera Migration Assistant engine.
  • The source and target Spark versions are a supported pair. See Supported Spark versions and job types.
  • You have the cma-migrator or cma-admin role.
  1. Create a workload plan with the source Cloudera Data Engineering service and the target Cloudera Data Engineering service on Anywhere Cloud.
    Select CDE Spark Migration as the type, and on the Migration Assets step, select the Spark jobs and resources to migrate. See Creating migration plans.
  2. On the Plans page, open the plan.
  3. Click the Collections tab.
    The jobs and resources that you selected in the plan wizard are in the Migration Assets collection.
  4. Optional: Add more Spark jobs to a collection.
  5. Click the Metadata tab.
  6. Map the jobs to the target virtual cluster.
    Cloudera Migration Assistant maps the resources that each job uses, such as its files and its Python environment, to the same target virtual cluster. A resource always moves to the same virtual cluster as the jobs that use it.
  7. Click the Workloads tab.
  8. Click Spark.
    A warning with the tooltip Missing configurations means that a job needs more configuration before you can migrate it.
  9. Complete the configuration of each job.
  10. Click Save.
  11. Create and run an execution.
    See Running plan executions.
  12. When the execution reaches the Review code changes step, review the changes in the intermediate Git repository.
    Code Migrator writes the changes of each job to a branch named code-agent-branch-[***JOB-ID***].
  13. Click Mark As Completed.
  14. Click OK.
    Cloudera Migration Assistant merges the changes, and continues with the upload.

The execution runs these steps in order:

Table 1. Steps of CDE Spark Migration executions
Step What it does
Export from CDE Downloads the selected jobs and their resources from the source, and commits them to the base branch of the intermediate Git repository. Creates the plan branch with a copy of the files for the target Spark version, and opens a pull request for it.
Migrate Code using AI Starts one Code Migrator job for each pair of source and target virtual clusters. Each job writes its changes to its own branch, forked from the plan branch.
Review code changes A manual step. You review the changes, and then mark the step as completed.
Finalize changes Merges the branches of the Code Migrator jobs into the plan branch.
Import resources into CDE on AWC Creates the resources on the target service, and uploads the files to them. A resource that already exists is not created again, and the files that are already in it are skipped.
Import Spark jobs into CDE on AWC Creates the Spark jobs on the target service. A job that already exists on the target with the same name is skipped, and the log of the step records it.
Clean up temporary files Merges the plan branch into the base branch of the intermediate Git repository.

The Export from CDE step fails before it pushes anything if a resource is not mapped to a target virtual cluster, or if Cloudera Migration Assistant does not know the Spark version of the target virtual cluster. Scan the target service and map the jobs, and then run the step again.

For where the files are in the intermediate repository, see About Spark job migration.

Check the new jobs in Cloudera Data Engineering on Anywhere Cloud, and test them before you use them. The source jobs are not changed, and they keep running on their schedules. Cloudera Migration Assistant does not prevent a job from running on both platforms. See Phased migrations.