Complete the code to set the container memory size to 4096 MB.
yarn.scheduler.maximum-allocation-mb=[1]The maximum allocation memory for containers is set to 4096 MB to allow larger container sizes.
Complete the code to configure the minimum container memory size to 1024 MB.
yarn.scheduler.minimum-allocation-mb=[1]The minimum allocation memory is set to 1024 MB to ensure containers have enough memory to run basic tasks.
Fix the error in the code to correctly set the container memory size to 3072 MB.
yarn.nodemanager.resource.memory-mb=[1]The node manager's resource memory must be set to 3072 MB to allocate enough memory for containers.
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.
container_sizes_gb = {size: size [1] 1024 for size in sizes if size [2] 2048}The floor division operator '//' converts MB to GB by dividing by 1024. The condition '> 2048' filters sizes greater than 2 GB.
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.
node_memory_gb = { [1]: [2] [3] 1024 for node, mem in nodes.items() if mem > 4096 }node.lower() instead of uppercase.We convert node names to uppercase with node.upper(), keep memory as mem, and convert MB to GB using floor division //.