1 Star 0 Fork 0

eaglet/hadoop-cluster-docker2.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start-container.sh 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
eaglet 提交于 2018-11-16 09:31 . commit(#add picture)
#!/bin/bash
# the default node number is 3
N=${1:-3}
# start hadoop master container
sudo docker rm -f hadoop-master &> /dev/null
echo "start hadoop-master container..."
sudo docker run -itd \
--net=hadoop \
-p 50070:50070 \
-p 8088:8088 \
-p 8089:9000 \
--privileged=true \
-v $PWD/hadoop:/root/hadoop \
--name hadoop-master \
--hostname hadoop-master \
--restart always \
e4glet/hadoop:2.0 &> /dev/null
# start hadoop slave container
i=1
while [ $i -lt $N ]
do
sudo docker rm -f hadoop-slave$i &> /dev/null
echo "start hadoop-slave$i container..."
sudo docker run -itd \
--net=hadoop \
--name hadoop-slave$i \
--hostname hadoop-slave$i \
--restart always \
e4glet/hadoop:2.0 &> /dev/null
i=$(( $i + 1 ))
done
# get into hadoop master container
sudo docker exec -it hadoop-master bash
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/e4glet/hadoop-cluster-docker2.0.git
[email protected]:e4glet/hadoop-cluster-docker2.0.git
e4glet
hadoop-cluster-docker2.0
hadoop-cluster-docker2.0
master

搜索帮助