Simple Hadoop Yarn (With Use Case: Send Email using Yarn)
Tested on -
- Mac OS X 10.9 using java version "1.7.0_40"
- Hortonworks Sandbox Version 2.0
using java version "1.6.0_24"
You need to have installed Hadoop 2 on your Mac,
or be using Hortonworks Sandbox Version 2.0
Prior knowledge of Hadoop source code,
especially within this area helps -
Just run the BASH script (run-simple-yarn-app.sh)
It will do a maven build, and then run the yarn client.
=> Usage: ./run-simple-yarn-app.sh -c <unix_command> -n <number_of_yarn_containers>
$ ./run-simple-yarn-app.sh -c /usr/bin/who -n 9
EXTRAS_1 (Use Case: Send Email Demo):
Want to send email from all the Yarn Containers?
Place the sendemail ruby script in accessible location
(/bin, /usr/bin, or some other standard location of PATH,
or mention the full path in run script).
$ ./run-simple-yarn-app.sh -c 'sendemail <your_email_address> <your_email_password>' -n 9
EXTRAS_2 (Use Case: Let Yarn Container run MapReduce Job):
Want to run WordCount MapReduce job under Yarn by dedicating a container for it?
$ ./run-simple-yarn-app.sh -c "/bin/cp $LOCAL_DIRS/*/appMaster.jar /tmp; hadoop --config /tmp/hadoop_mr_cfg jar /tmp/appMaster.jar com.hw.yarn.WordCount in out" -n 1