美文网首页
hadoopCDHStart

hadoopCDHStart

作者: 白纸糊 | 来源:发表于2019-05-07 11:40 被阅读0次
#!/bin/bash
for i in hadoop101 hadoop102
do
    if [ $i = "hadoop101" ]
    then
        echo ------------$i is starting hdfs-------------
        ssh $i "source /etc/profile && /opt/module/CDH/hadoop-2.5.0-cdh5.3.6/sbin/start-dfs.sh && /opt/module/CDH/hadoop-2.5.0-cdh5.3.6/sbin/mr-jobhistory-daemon.sh start historyserver"
    elif [ $i = "hadoop102" ]
    then
        echo ------------$i is starting yarn-------------
        ssh $i "source /etc/profile && /opt/module/CDH/hadoop-2.5.0-cdh5.3.6/sbin/start-yarn.sh"
    fi
done

相关文章

网友评论

      本文标题:hadoopCDHStart

      本文链接:https://www.haomeiwen.com/subject/phjbeqtx.html