From cf707333c6cec9f5590ecd28052b1db289e6cbba Mon Sep 17 00:00:00 2001 From: Thiago Gomes Date: Fri, 1 Dec 2023 01:30:29 -0300 Subject: [PATCH 1/2] fix: verify if hadoopNetwork exists bfore attempting to remove it --- run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 . From c8e670e6feead056231a88120ae9b3f541fc9326 Mon Sep 17 00:00:00 2001 From: Thiago Gomes Date: Fri, 1 Dec 2023 01:34:17 -0300 Subject: [PATCH 2/2] fix: add instructions to ensure that maven is installed before run code sample scripts --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ ```