Phased migrations
Cloudera Migration Assistant migrates each workload once, when you run an execution, and does not keep the source and the target in sync. You plan the order of the migrations, the timing of each move, and the testing and cutover to the target.
How migrations run
An execution copies the items in the scope of a plan from the source to the target once. A migration is a manual, one-time action:
- Source – Cloudera Migration Assistant does not change or delete anything on the source. The source jobs and DAGs keep running on their schedules.
- No synchronization – Cloudera Migration Assistant does not keep job definitions, DAGs, schedules, dependencies, or run state in sync between the source and the target. Changes that you make on the source after a migration are not copied to the target.
- No run monitoring – Cloudera Migration Assistant does not monitor the runs of jobs or DAGs on the source or on the target.
- Run type – Each execution runs once. The Run periodically option of the execution wizard is not available.
Migration increments
You decide the increments of a migration. A plan has one source and one target, and moves the items that you select: a whole virtual cluster, with all its DAGs or Spark jobs, or single items in it. Create a plan or an execution for each group of workloads that you want to move together, and move the groups one after the other. See Creating migration plans.
You can migrate Airflow DAGs and Spark jobs together or independently. A CDE Airflow Migration plan moves DAGs, and a CDE Spark Migration plan moves Spark jobs and their resources.
Recommended order
Cloudera recommends that you migrate the Airflow DAGs first, and then the Spark jobs that they run:
- Migrate the DAGs with a CDE Airflow Migration plan. Code Migrator
rewrites the DAGs to use the operators that you choose for the target. This requires
Enable LLM. Without it, Code Migrator is not deployed and the DAGs
are not rewritten. The migrated DAGs trigger their Spark jobs through the Airflow connection that they use:
CdeTriggerRunOperatorwith anawc_cdeconnection, orCdeRunJobOperatorwith a legacycloudera_data_engineeringconnection. See Migrating Airflow DAGs from Cloudera Data Engineering to Cloudera Workflow Orchestrator and Airflow operator mapping. - Open the Spark plan that the Airflow execution created. The Create Spark migration plan step of the Airflow execution finds the Spark jobs that the migrated DAGs run, and creates a
CDE Spark Migration plan for them, named
[***AIRFLOW PLAN***] - Spark jobs, for each target cluster. It maps each job to the target virtual cluster of its Airflow connection, and does not run the new plan. - Run the Spark plan. If the connection points to a compute cluster on Anywhere Cloud, the migrated DAGs fail until the Spark migration has created the jobs there. If the connection points to a virtual cluster of the legacy Cloudera Data Engineering service, the jobs stay on the source, and the DAGs keep running them. See Migrating Cloudera Data Engineering Spark jobs.
When you run the Airflow plan again, Cloudera Migration Assistant reuses the Spark plan that it created, and adds only the jobs that are not mapped yet.
Items that already exist on target
Cloudera Migration Assistant does not overwrite jobs, resources, or DAGs on the target:
- Spark jobs – Cloudera Migration Assistant skips a job that has the same name on the target, and the log of the step records Job [***NAME***] already exists on target, skipped.
- Resources – Cloudera Migration Assistant does not create a resource that exists on the target again. It skips the files that are already in the resource, and uploads only the new files.
- Airflow DAGs – Cloudera Migration Assistant creates a Git change with the migrated DAGs in the repository of Cloudera Workflow Orchestrator, and you review and merge it. Two DAGs in a plan that have the same target DAG ID block the execution. To resolve the conflict, rename one of them in the source, scan again, and create a new plan. See Resolving DAG name conflicts.
When you run a plan again, Cloudera Migration Assistant copies only the items that are not on the target yet. It does not update a job or a file that already exists on the target. To migrate a changed job again, remove it from the target first, and then run the plan again.
Duplicate runs
While both platforms run, a workload can run on both of them, or on neither. Cloudera Migration Assistant does not prevent this, so plan it for each workload:
- Decide when each workload moves to the target, and which platform runs it until then.
- Merge the Git change with the migrated DAGs in Cloudera Workflow Orchestrator only when the DAGs can run on the target.
- When a workload runs on the target, pause its schedule on the source.
- Keep a record of the workloads that have moved, for example, with one plan for each group.
Validation, cutover, and rollback
Cloudera Migration Assistant does not validate migrated workloads, switch them over to the target, or roll back a migration. Plan these tasks yourself:
- Validation – Test the migrated jobs and DAGs on the target before you rely on them, and compare their results with the results on the source.
- Cutover – Switch each workload to the target yourself: pause it on the source, and start it on the target.
- Rollback – The source is not changed, so you can continue to use it. The steps of an execution that have finished are not undone. Remove the migrated items from the target yourself if you need to.
For the steps of an execution, see Running plan executions.
