HIVE嵌入式搭建
my_hadoop.sh脚本
#!/bin/bash
if [ $# -lt 1 ]
then
echo "No Args Input..."
exit ;
fi
case $1 in
"start")
echo " =================== 启动 hadoop集群 ==================="
echo " --------------- 启动 hdfs ---------------"
# 这里是hadoop目录下的start-dfs.sh路径,不一致的自行修改一下。
ssh abcd01 "/export/servers/hadoop-3.1.3/sbin/start-dfs.sh"
echo " --------------- 启动 yarn ---------------"
ssh abcd02 "/export/servers/hadoop-3.1.3/sbin/start-yarn.sh"
echo " --------------- 启动 historyserver ---------------"
ssh abcd01 "/export/servers/hadoop-3.1.3/bin/mapred --daemon start historyserver"
;;