diff --git a/README.md b/README.md index 43d5bc5..d7e9658 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ $ ./run.sh 2 ``` ## Sample Word Count -Follow below steps to run the word count example that is "hello world" of hadoop community. +Ensure that "maven" is installed in your machine to compile Java code, than follow below steps to run the word count example that is "hello world" of hadoop community. ```sh $ cd codeSamples/ ``` diff --git a/run.sh b/run.sh index 9db9300..2363fc7 100755 --- a/run.sh +++ b/run.sh @@ -15,8 +15,13 @@ do echo "slave$i" >> ./conf/slaves done +# Check if the hadoopNetwork exists before attempting to remove it +if [[ $(docker network ls -f name=hadoopNetwork -q) ]]; then + docker network rm hadoopNetwork +fi + #Create a network named "hadoopNetwork" -docker network rm hadoopNetwork && docker network create -d bridge --subnet 172.25.0.0/16 hadoopNetwork +docker network create -d bridge --subnet 172.25.0.0/16 hadoopNetwork #Create base hadoop image named "base-hadoop:1.0" docker build -t base-hadoop:1.0 .