#!/bin/bash
if (($#==0))
then
exit 1;
fi
ssh hadoop101 "source /etc/profile && /opt/module/cloudera-manager/cm-5.12.1/etc/init.d/cloudera-scm-server $1" > /dev/null
echo -------------running----$1
echo ------------ cm-server in $1
for i in hadoop101 hadoop102 hadoop103
do
echo ------------ cm-agent in $i
ssh $i "source /etc/profile && /opt/module/cloudera-manager/cm-5.12.1/etc/init.d/cloudera-scm-agent $1" > /dev/null
done
网友评论