Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to specify the number of nodes in the Hadoop cluster.
Hadoop
num_nodes = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name instead of a number.
Choosing a number too large for a small cluster.
✗ Incorrect
The number of nodes is set to 5 to define the cluster size.
2fill in blank
mediumComplete the code to calculate total storage capacity in TB.
Hadoop
total_storage_tb = num_nodes * [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using storage size in GB instead of TB.
Multiplying by an incorrect storage value.
✗ Incorrect
Each node has 2 TB storage, so total storage is nodes times 2.
3fill in blank
hardFix the error in the code to calculate total memory in GB.
Hadoop
total_memory_gb = num_nodes [1] 64
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using addition instead of multiplication.
Using division which gives wrong results.
✗ Incorrect
Total memory is number of nodes multiplied by memory per node (64 GB).
4fill in blank
hardFill both blanks to create a dictionary of node memory and storage.
Hadoop
node_specs = {'memory_gb': [1], 'storage_tb': [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing memory and storage values.
Using total cluster values instead of per node.
✗ Incorrect
Each node has 64 GB memory and 2 TB storage.
5fill in blank
hardFill all three blanks to create a summary dictionary with nodes, total memory, and total storage.
Hadoop
cluster_summary = {'nodes': [1], 'total_memory_gb': [2], 'total_storage_tb': [3] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using per node values instead of totals.
Mixing up memory and storage values.
✗ Incorrect
The cluster has 5 nodes, total memory is 5*64=320 GB, and total storage is 5*2=10 TB.