1 Star 1 Fork 0

ForeverCyril/hadoop-docker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 653 Bytes
一键复制 编辑 原始数据 按行查看 历史
ForeverCyril 提交于 2022-03-27 17:52 . add: basic hadoop setup
#!/bin/bash
set -e
N=${1:-3}
CURRENT_DIR=$(dirname $(readlink -f "$0"))
HADOOP_VERSION=3.3.2
if [ ! -f "$CURRENT_DIR/assets/hadoop.tar.gz" ]; then
echo "No hadoop archive found at $CURRENT_DIR/assets/hadoop.tar.gz"
echo "Start Downloading."
wget -O $CURRENT_DIR/assets/hadoop.tar.gz \
https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz
echo "Dowloading Finshed."
fi
echo "Start building hadoop with ${N} subnode."
i=1
rm assets/hadoop/workers
while [ $i -le $N ]
do
echo "hadoop-worker$i" >> assets/hadoop/workers
((i++))
done
docker build -t forevercyril/hadoop:$N-node-v0.1 .
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/forevercyril/hadoop-docker.git
git@gitee.com:forevercyril/hadoop-docker.git
forevercyril
hadoop-docker
hadoop-docker
master

搜索帮助