Migrating and refactoring Spark jobs

Migrate a Spark job from Cloudera Data Engineering to Cloudera Data Engineering on Anywhere Cloud and refactor it for the target Spark version by using Code Migrator, from registering the services to running the new job.

  • You have a source Cloudera Data Engineering service with a Python, Java, or Scala Spark job, and a target Cloudera Data Engineering service on Anywhere Cloud.
  • The source and target Spark versions are a supported pair. See Supported Spark versions and job types.
  • Code Migrator is available. It is displayed when Enable LLM is on in the engine configuration of the Cloudera Migration Assistant engine.
  • You have the cma-admin role for the setup steps, and the cma-migrator or cma-admin role for the migration.
  1. Ensure that an agent serves the source and target services.
    See Deploying agents on Anywhere Cloud.
  2. Register the source and target Cloudera Data Engineering services.
    See Registering Cloudera Data Engineering services.
  3. Add a user connection for each service.
    See Managing user connections.
  4. Scan the source service and the target service.
    See Scanning clusters.
  5. Create a workload plan of the CDE Spark Migration type, select the job on the Migration Assets step, map it to the target virtual cluster, and complete its configuration.
    See Migrating Cloudera Data Engineering Spark jobs.
  6. Create and run an execution.
    See Running plan executions.
  7. When the execution reaches the Review code changes step, review the refactored code, and mark the step as completed.
    See Approving code changes in plan executions.
  8. Run the remaining steps.
  9. In Cloudera Data Engineering on Anywhere Cloud, run the new job, and compare its output with the output of the source job.
The job and its resources are in the target virtual cluster, and the source service is unchanged.