You can try this using the Rest api:
# DELETE the Client
curl -k -u admin:admin -H "X-Requested-By: ambari" -X DELETE
"$HTTP_PROTOCOL://$CONSOLE_NODE:$PORT/api/v1/clusters/$CLUSTER/host_components?HostRoles/component_name.in(HDFS_CLIENT)&HostRoles/host_name.in(hostname01,hostname02)"
# INSTAL the Client
curl -v -k -i -u 'admin:admin' -H 'X-Requested-By: ambari' -X POST -d '
{
"RequestInfo":{
"query":"Hosts/host_name.in(hostname01)"
},
"Body":{
"host_components":[
{
"HostRoles":{
"component_name":"HDFS_CLIENT"
}
}
]
}
}' '$HTTP_PROTOCOL://$CONSOLE_NODE:$PORT/api/v1/clusters/$CLUSTER/hosts'