CCD-410 · Question #48
You need to perform statistical analysis in your MapReduce job and would like to call methods in the Apache Commons Math library, which is distributed as a 1.3 megabyte Java archive (JAR) file…
The correct answer is C. When submitting the job on the command line, specify the -libjars option followed by the JAR file path. The usage of the jar command is like this, Usage: hadoop jar <jar> [mainClass] args... If you want the commons-math3.jar to be available for all the tasks you can do any one of these 1. Copy the jar file in $HADOOP_HOME/lib dir 2. Use the generic option -libjars.
Question
You need to perform statistical analysis in your MapReduce job and would like to call methods in the Apache Commons Math library, which is distributed as a 1.3 megabyte Java archive (JAR) file. Which is the best way to make this library available to your MapReducer job at runtime?
Options
- AHave your system administrator copy the JAR to all nodes in the cluster and set its location in the
- BHave your system administrator place the JAR file on a Web server accessible to all cluster nodes
- CWhen submitting the job on the command line, specify the -libjars option followed by the JAR file path.
- DPackage your code and the Apache Commands Math library into a zip file named JobJar.zip
How the community answered
(36 responses)- A6% (2)
- B8% (3)
- C72% (26)
- D14% (5)
Explanation
The usage of the jar command is like this, Usage: hadoop jar <jar> [mainClass] args... If you want the commons-math3.jar to be available for all the tasks you can do any one of these 1. Copy the jar file in $HADOOP_HOME/lib dir 2. Use the generic option -libjars.
Topics
Community Discussion
No community discussion yet for this question.