@Shivakuk Thank you for bringing this to our Community.
Did you get to review the following Docs for respective role instances.
Managing Role Instances
https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/managing-clusters/topics/cm-role-instances.ht...
Yarn Resource Manager
https://docs.cloudera.com/cdp-private-cloud-base/latest/yarn-high-availability/topics/yarn-resourcem...
Moving HDFS Roles:
https://docs.cloudera.com/documentation/enterprise/5-6-x/topics/admin_nn_migrate_roles.html#concept_...
Zookeeper
https://docs.cloudera.com/documentation/enterprise/5-8-x/topics/cm_mc_zookeeper_service.html#Replaci...
Spark on Yarn:
Kindly make sure to take a backup of /etc/spark/conf folder and then proceed with the following:
Deleting Role Instance:
>Go to CM UI > Spark > Spark History Server Instance
>Click Actions > Stop
>Click Delete
Adding/Configuring New Spark Instance:
> Click on add role instances > Select on which host you want to install
> Then start the role
IMPORTANT: Please ensure to take backup of the working directories of concerned role instances, followed by re-deploying client configurations.
Let us know how it goes.
Cheers!
V