0
0
Hadoopdata~10 mins

Why tuning prevents slow and failed jobs in Hadoop - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the number of reducers in a Hadoop job.

Hadoop
job.setNumReduceTasks([1])
Drag options to blanks, or click blank then click option'
A0
B10
C5
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Setting reducers to 0 disables reduce phase, causing job failure.
2fill in blank
medium

Complete the code to set the memory allocation for map tasks.

Hadoop
conf.set("mapreduce.map.memory.mb", "[1]")
Drag options to blanks, or click blank then click option'
A1024
B2048
C512
D4096
Attempts:
3 left
💡 Hint
Common Mistakes
Setting memory too low causes task failures.
3fill in blank
hard

Fix the error in setting the input split size to optimize job performance.

Hadoop
conf.setLong("mapreduce.input.fileinputformat.split.maxsize", [1])
Drag options to blanks, or click blank then click option'
A"268435456"
B268435456L
C26843545
D268435456
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes causes type error.
Using too small split size causes many small tasks.
4fill in blank
hard

Fill both blanks to configure speculative execution to prevent slow tasks.

Hadoop
conf.setBoolean("mapreduce.map.speculative", [1])
conf.setBoolean("mapreduce.reduce.speculative", [2])
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
C"true"
D"false"
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values instead of boolean causes errors.
Disabling speculative execution can cause slow jobs.
5fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters and maps data sizes.

Hadoop
sizes = {file:file_size[file]**2 for file in files if file_size[file] [1] 1000 and file_size[file] [2] 100000}
Drag options to blanks, or click blank then click option'
A:
B>
C<
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' instead of ':' in dict comprehension.
Using wrong comparison operators causing empty results.