I was able to figure out with the help of below community article.
https://community.cloudera.com/t5/Community-Articles/How-to-install-all-clients-on-all-nodes-in-your...
cluster/ta-p/246821
script.sh
---------
curl -s -u admin:admin http://ambari:8080/api/v1/hosts|grep host_name|sed -n 's/.*"host_name" : "\([^\"]*\)".*/\1/p'>hostcluster.txt
while read line ;
do
j=$line
mkdir -p $j
curl -s -u admin:admin -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Restart HDFS Client","operation_level":{"level":"HOST_COMPONENT","cluster_name":"rest","host_name":"$j","service_name":"HDFS"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://ambari:8080/api/v1/clusters/rest/hosts/$j/host_components/HDFS_CLIENT
done < hostcluster.txt