#!/bin/bash
case $1 in
"start"){
for i in hadoop120 hadoop121 hadoop 122
do
echo "************$i*************"
ssh $i "/.../kafka/bin/kafka-server-start.sh -daemon /.../kafka/config/server.properties
done
};;
"stop"){
for i in hadoop120 hadoop121 hadoop 122
do
echo "************$i*************"
ssh $i "/.../kafka/bin/kafka-server-stop.sh /.../kafka/config/server.properties
done
};;
esac