0
0
Hadoopdata~10 mins

Memory and container sizing in Hadoop - Interactive Code Practice

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

Complete the code to set the container memory size to 4096 MB.

Hadoop
yarn.scheduler.maximum-allocation-mb=[1]
Drag options to blanks, or click blank then click option'
A2048
B4096
C8192
D1024
Attempts:
3 left
💡 Hint
Common Mistakes
Setting the memory too low causing container failures.
Confusing memory size units.
2fill in blank
medium

Complete the code to configure the minimum container memory size to 1024 MB.

Hadoop
yarn.scheduler.minimum-allocation-mb=[1]
Drag options to blanks, or click blank then click option'
A512
B2048
C1024
D4096
Attempts:
3 left
💡 Hint
Common Mistakes
Setting minimum memory too high, wasting resources.
Setting minimum memory too low, causing task failures.
3fill in blank
hard

Fix the error in the code to correctly set the container memory size to 3072 MB.

Hadoop
yarn.nodemanager.resource.memory-mb=[1]
Drag options to blanks, or click blank then click option'
A3072
B2048
C4096
D1024
Attempts:
3 left
💡 Hint
Common Mistakes
Setting memory less than minimum container size.
Using incorrect configuration property name.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps each container size in MB to its size in GB, only for sizes greater than 2 GB.

Hadoop
container_sizes_gb = {size: size [1] 1024 for size in sizes if size [2] 2048}
Drag options to blanks, or click blank then click option'
A//
B>
C<
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' instead of '//' for conversion.
Using '<' instead of '>' in the condition.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps node names in uppercase to their memory in GB, only for nodes with memory greater than 4096 MB.

Hadoop
node_memory_gb = { [1]: [2] [3] 1024 for node, mem in nodes.items() if mem > 4096 }
Drag options to blanks, or click blank then click option'
Anode.upper()
Bmem
C//
Dnode.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using multiplication instead of floor division.
Using node.lower() instead of uppercase.
Not converting memory units.