./build-image.sh
docker network create --driver=bridge hadoop
./start-container.sh
start hadoop-master container...
start hadoop-slave1 container...
start hadoop-slave2 container...
root@hadoop-master:~#
./start-hadoop.sh
./run-wordcount.sh
input file1.txt:
Hello urAD
input file2.txt:
Hello Hadoop
input file3.txt:
Hello Docker
wordcount output:
Docker 1
Hadoop 1
Hello 3
urAD 1
./resize-cluster.sh 5
- 指定參數 >1: 2, 3...
- 這個 script 會重建 hadoop image 裡的 slave node 的名稱
./start-container.sh 5
- 指定參數 >1: 2, 3...
同上 4 ~ 5