1 Star 0 Fork 0

idocker/hadoop-cluster-docker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start-container.sh 862 Bytes
一键复制 编辑 原始数据 按行查看 历史
idocker 提交于 2020-06-17 17:10 . init
#!/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 \
--name hadoop-master \
--hostname hadoop-master \
kiwenlau/hadoop:1.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 \
kiwenlau/hadoop:1.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/MengSuiXinFei/hadoop-cluster-docker.git
[email protected]:MengSuiXinFei/hadoop-cluster-docker.git
MengSuiXinFei
hadoop-cluster-docker
hadoop-cluster-docker
master

搜索帮助