The following example runs a script that sets the required variables, uses the MapReduce job logs for a job with an application ID of job_1396563311211_0947, and creates the report in the default location. It then copies the HTML version of the report from HDFS to the /home/jdoe
local directory and opens the report in a browser.
To run this example on a YARN cluster, replace the application ID with the application ID of the job. The application ID of the job looks like this example: job_1396563311211_0947
.
Example 5-1 Running the Job Analyzer Utility
$ cat runja.sh BALANCER_HOME=/opt/oracle/orabalancer-<version>-h2 export HADOOP_CLASSPATH=${BALANCER_HOME}/jlib/orabalancer-<version>.jar:${BALANCER_HOME}/jlib/commons-math-2.2.jar:$HADOOP_CLASSPATH # Command on YARN cluster hadoop jar orabalancer-<version>.jar oracle.hadoop.balancer.tools.JobAnalyzer \ -D oracle.hadoop.balancer.application_id=job_1396563311211_0947 $ sh ./runja.sh $ $ hadoop fs -get jdoe_nobal_outdir/_balancer/jobanalyzer-report.html /home/jdoe $ cd /home/jdoe $ firefox jobanalyzer-report.html