Hadoop
Using docker
# Pull the Hadoop image from the registry
docker pull gitea.revservices.tw/parrotxray/hadoop-3.5.0:master
# Run the Hadoop container
docker run -d --name hadoop -p 9000:9000 -p 9870:9870 -p 8088:8088 -p 8042:8042 -p 19888:19888 gitea.revservices.tw/parrotxray/hadoop-3.5.0:master
# Access the Hadoop container
docker exec -it hadoop bash
Manual installation
Please refer to Hadoop Installation Guide for manual installation of Hadoop.
Automatic installation
# clone the repository
git clone https://gitea.revservices.tw/joy/Hadoop.git
# access the Hadoop directory
cd Hadoop
# Run the installation script
chmod +x install_hadoop.sh
./install_hadoop.sh
Run Wordcount example
# create input directory
hdfs dfs -mkdir -p /user/root/input
# push test text to test.txt
echo "I am a student. You are also student." > test.txt
hdfs dfs -put test.txt /user/root/input/
# run workcount
hadoop jar /opt/hadoop-3.5.0/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.5.0.jar wordcount /user/root/input /user/root/output
# output result
hdfs dfs -cat /user/root/output/part-r-00000
Description
Languages
Shell
71%
Dockerfile
29%