Apache Hadoop
Setup Apache Hadoop on Windows, Linux & Mac OS ..
The following steps are intended for setting up a Pentaho Lab environment and need to be completed in order to complete the Workshops.
Ensure you have downloaded the Workshop--Installation:
cd
git clone https://github.com/jporeilly/Workshop--InstallationTo install git:
sudo apt install gitx
Update system packages.
sudo apt update && sudo apt upgrade -yHadoop is built on Java so you need a Java Development Kit (JDK) installed. Confirm installation.
java --versionBefore you begin ensure Docker & Docker Compose have been installed & configured.
docker-compose --versionCreate Directories
Create directory structure.
// Some codeRun the docker containers using docker-compose
cd
cd ~/Hadoop
docker-compose up -d[+] Running 28/5
✔ datanode Pulled 32.7s
✔ namenode Pulled 32.6s
✔ nodemanager1 Pulled 32.5s
✔ resourcemanager Pulled 32.3s
✔ historyserver Pulled 32.5s
[+] Running 9/9
✔ Network hadoop_default Creat... 0.5s
✔ Volume "hadoop_hadoop_datanode" Created 0.0s
✔ Volume "hadoop_hadoop_historyserver" Created 0.0s
✔ Volume "hadoop_hadoop_namenode" Created 0.0s
✔ Container datanode Started 3.8s
✔ Container namenode Started 3.9s
✔ Container nodemanager Starte... 3.9s
✔ Container historyserver Star... 3.8s
✔ Container resourcemanager St... 3.9s
... Access the Cluster
Can login into any node by specifying the container.
Navigate to mapped data volume.
Accessing the UI
The Namenode UI can be accessed at:
ResourceManager UI can be accessed at:
History Server UI can be accessed at:
Shutdown Cluster
To shut down the cluster.
Test - Word Count Algorithm
List all the files in our HDFS system.
Create a /user/root/ file.
Verify directory.
Download the hadoop-mapreduce-examples-3.2.1-sources.jar file
Save - hadoop-mapreduce-examples-3.2.1-sources.jar to: ~/Hadoop
Download & Save text file - Canterbury Tales or Ulysses
Copy the files into the namenode container.
Create the Input folder.
Copy over /tmp/pg2383.txt to /user/root/input.
10 . Run MapReduce
View the output.
Check the results accessing to the output folder.
Output the text file.
Download the Apache-Hadoop prebuilt image from Docker Hub repository:
These images are about 14GB .. so please be patient ..!

Once completed, deploy the Apache-Hadoop containers.
The YARN Resource Manager port is mapped to: port:8095 to prevent conflict with Cedalo Management Center - MQTT
Once completed a shell will open:
Enter: init
This stops all running processes, formats the HDFS namenodes, and starts all processes.
Enter: jps


This completes the installation of all tools required for the Big Data course.
Just type exit to exit from the container - this will stop the container.
To start the container enter the following:
Once the Docker shell opens, just type restart to restart all processes.

Last updated
Was this helpful?



