Wednesday, May 14, 2014

Cloudera Manager - Deleting a Host

There are two ways to remove a host from a cluster:
  1. You can remove a host from a cluster, but leave it available to be added to a different cluster managed by Cloudera Manager.
  2. You can stop Cloudera Manager from managing a host and the Hadoop daemons on the host.

I choose the second one. There are four steps:
  1. Decommission the host.
  2. Stop Cloudera agent on the host.
  3. Remove all the roles from the host.
  4. Remove the host the cluster.

Decommission host:
Decommissioning a host lets you decommission all roles on a single host without having to go to each service and decommission the roles individually. Once all roles on the host have been decommissioned and stopped, the host can be removed from service.

Decommissioning applies to only to HDFS DataNodes, MapReduce TaskTrackers, YARN NodeManagers, and HBase RegionServers. If the host you select has other roles running on it, those roles will simply be stopped.

Host decommissioning supports decommissioning multiple hosts in parallel.

To decommission one or more hosts:

  • Click the Hosts tab.
  • Select the host(s) you want to decommission.
  • From the Actions for Selected menu, click Decommission.

A confirmation pop-up informs you of the roles that will be decommissioned or stopped on the nodes you have selected. To proceed with the decommissioning, click Confirm.

Stop the Cloudera agent:

  1. Log into the host
  2. Run the followinh command

This stops the agent and all the services they manage.
# service cloudera-scm-agent hard_stop

Or if you are sure no services are running, do a
# service cloudera-scm-agent stop

Check datablock repliation:
Before you remove all the roles and the host from the cluster, check data block replications, make sure the re-balancing process is finished. HDFS will automatically starts re-balancing the cluster. You can check from Cloudera Manager UI or from
"hdfs fsck /" command.

Remove all the roles:
You must go to each Service's Instances tab, and select and delete the appropriate role instance for that service.

To delete a role instance:

  • Click the Services tab.
  • Click the service instance that contains the role instance you want to delete. For example, click the hdfs service instance if you want to delete a DataNode role instance.
  • Click the Instances tab.
  • Select the role instance you want to delete.
  • Choose Actions for Selected > Delete. Click Delete again to confirm the deletion.

Repeat the above steps for every instance.

Remove host from cluster:
From the Hosts tab, select the host you want to remove from the cluster. From the Actions for Selected menu, select Remove From Cluster.

No comments: