Complete the code to set the number of reduce tasks in a MapReduce job.
job.setNumReduceTasks([1]);The method setNumReduceTasks takes an integer to specify how many reduce tasks to run.
Complete the code to set the memory allocated for map tasks in megabytes.
conf.setInt("mapreduce.map.memory.mb", [1]);
The setInt method expects an integer value for memory in MB, so 2048 is correct.
Fix the error in setting the speculative execution for reduce tasks.
conf.setBoolean("mapreduce.reduce.speculative", [1]);
The setBoolean method requires a boolean value true or false, not a string or number.
Fill both blanks to configure the input split size and the maximum split size.
conf.setLong("mapreduce.input.fileinputformat.split.minsize", [1]); conf.setLong("mapreduce.input.fileinputformat.split.maxsize", [2]);
The minimum split size is set to 128MB (134217728 bytes) and the maximum split size to 256MB (268435456 bytes).
Fill all three blanks to create a map output compression configuration.
conf.setBoolean("mapreduce.map.output.compress", [1]); conf.set("mapreduce.map.output.compress.codec", [2]); conf.setInt("mapreduce.task.io.sort.mb", [3]);
Enable compression with true, set codec to Snappy, and allocate 256MB for sort buffer.