READ Free Dumps For Cloudera- CCD-410
Question ID 12507 | You have written a Mapper which invokes the following five calls to the
OutputColletor.collect method:
output.collect (new Text (Apple), new Text (Red) ) ;
output.collect (new Text (Banana), new Text (Yellow) ) ;
output.collect (new Text (Apple), new Text (Yellow) ) ;
output.collect (new Text (Cherry), new Text (Red) ) ;
output.collect (new Text (Apple), new Text (Green) ) ;
How many times will the Reducers reduce method be invoked?
|
Option A | 6
|
Option B | 3
|
Option C | 1
|
Option D | 0
|
Option E | 5
|
Correct Answer | B |
Explanation Explanation: reduce() gets called once for each [key, (list of values)] pair. To explain, let's say you called: out.collect(new Text("Car"),new Text("Subaru"); out.collect(new Text("Car"),new Text("Honda"); out.collect(new Text("Car"),new Text("Ford"); out.collect(new Text("Truck"),new Text("Dodge"); out.collect(new Text("Truck"),new Text("Chevy"); Then reduce() would be called twice with the pairs reduce(Car,
) reduce(Truck, ) Reference: Mapper output.collect()?
Question ID 12508 | 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?
|
Option A | Have your system administrator copy the JAR to all nodes in the cluster and set its location in the HADOOP_CLASSPATH environment variable before you submit your job.
|
Option B | Have your system administrator place the JAR file on a Web server accessible to all cluster nodes and then set the HTTP_JAR_URL environment variable to its location.
|
Option C | When submitting the job on the command line, specify the libjars option followed by the JAR file path.
|
Option D | Package your code and the Apache Commands Math library into a zip file named JobJar.zip
|
Correct Answer | C |
Explanation Explanation: The usage of the jar command is like this, Usage: hadoop 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 or 2. Use the generic option -libjars.