Open the workspace "HouseElfs-2.8" (or use your own cluster setup if you prefer)
(optional) Build your image if not yet done by clicking the "Build" button at the bottom right corner. (More info on image build can be found at Build a cluster page)
Start your cluster. (More info on how to start your cluster can be found at Run your cluster)
Great! Your cluster is up. Let's see if HDFS and YARN services are all set. Click on your local HDFS Namenode Web UI and YARN ResourceManager Web UI.
You should see the slave nodes in both screens. See the screenshots underneath for clarity:
We shall execute a basic Hadoop command on your cluster through Hadjo. We shall create /apps directory on HDFS if it does not exist.
From the menu "Cluster Interactions" click on menu item "Execute command (master OS)".
In the input field type hdfs dfs -mkdir -p /apps
Here option "-p" means "Do not fail if the directory already exists":
We shall execute another basic Hadoop command on your cluster through Hadjo in order to list the HDFS root directories (we expect /apps too).
From the menu "Cluster Interactions" click on menu item "Execute command (master OS)".
In the input field type hdfs dfs -ls /
Download YARN "Hello World" appplication JAR. Source code is also available at YARN "Hello World" Maven project. If you wish you can prepare your own JAR, but for simplicity we have built it for you.
Next we shall upload to HDFS /apps directory the downloaded YARN JAR application.
From the menu "Cluster Interactions" click on menu item "File Upload (HDFS)".
Then browse the downloaded JAR and select it. Then you will be prompted to type the HDFS directory. Type "/apps" in the input field:
Next we shall upload the same JAR to master's OS file system. Usually it does not matter where the application will be submitted to Yarn from.
From the menu "Cluster Interactions" click on menu item "File Upload (master OS)".
Then browse the downloaded JAR and select it. Then you will be prompted to type the OS directory. Leave the default value of "/home/hadjo" in the input field:
We are almost there! It is time to execute the YARN application. It is available in HDFS and on the master's OS too.
From the menu "Cluster Interactions" click on menu item "Execute command (master OS)".
Place the following command in the input field hadoop jar yarn-hello-world.jar com.lazyweaver.yarn.Client
:
The application is executed successfully if you see an end line of type Client: Finished "application_