Complete the code to start the Hadoop cluster service.
sudo service hadoop-[1] startThe namenode service manages the metadata and is essential to start first for cluster reliability.
Complete the code to check the status of the DataNode service.
hdfs dfsadmin -report | grep [1]The command filters the report to show information about DataNode services, which store actual data blocks.
Fix the error in the command to restart the ResourceManager service.
sudo service hadoop-[1] restartThe resourcemanager manages cluster resources and restarting it helps maintain cluster reliability.
Fill both blanks to create a dictionary of node statuses where keys are node names and values are their {{BLANK_1}} if they {{BLANK_2}} the cluster.
node_status = {node: status for node, status in nodes.items() if status [1] 'active' and node [2] cluster_nodes}The code filters nodes with status equal to 'active' and nodes that are in the cluster_nodes list to ensure reliability.
Fill all three blanks to create a dictionary of node loads where keys are node names in uppercase, values are their load if load {{BLANK_1}} threshold and node {{BLANK_2}} active_nodes and status {{BLANK_3}} 'active'.
node_loads = {node[1]: load for node, (load, status) in node_info.items() if load [2] threshold and node [3] active_nodes and status == 'active'}The dictionary comprehension converts node names to uppercase, filters loads less than the threshold, and includes only nodes in active_nodes with status 'active' to ensure cluster reliability.