Unit 2: Hadoop Architecture - Practice Quiz

INT312 — Big Data Fundamentals 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which type of architecture is traditionally used by Hadoop?

Hadoop Architecture Easy
A. Peer-to-peer architecture
B. Master-slave architecture
C. Client-only architecture
D. Single-tier architecture

2 Which two components form the core of classic Hadoop architecture?

Hadoop Architecture Easy
A. HTTP and FTP
B. HTML and XML
C. SQL and NoSQL
D. HDFS and MapReduce

3 What does HDFS stand for?

Hadoop Storage: HDFS Easy
A. Hierarchical Data Format Service
B. Hadoop Distributed File System
C. Hadoop Database File Service
D. High-Density File System

4 How does HDFS normally store a large file?

Hadoop Storage: HDFS Easy
A. As blocks across multiple nodes
B. As one local memory object
C. As rows in one database
D. As messages in one queue

5 What is the main purpose of block replication in HDFS?

Hadoop Storage: HDFS Easy
A. To rename stored files
B. To improve fault tolerance
C. To create user accounts
D. To compress every record

6 Which two main phases are used in the MapReduce programming model?

Hadoop MapReduce paradigm Easy
A. Map and Reduce
B. Open and Close
C. Read and Write
D. Start and Stop

7 What is the primary role of the Map phase?

Hadoop MapReduce paradigm Easy
A. Produce intermediate key-value pairs
B. Manage DataNode heartbeats
C. Create operating system users
D. Store HDFS block metadata

8 What is the primary role of the Reduce phase?

Hadoop MapReduce paradigm Easy
A. Install Hadoop on each machine
B. Register nodes in the cluster
C. Divide files into HDFS blocks
D. Combine values associated with keys

9 In MapReduce, data is commonly processed in which form?

MapReduce Terminology Easy
A. Folder-window pairs
B. Row-column screens
C. Key-value pairs
D. Audio-video pairs

10 What is the process of transferring mapper output to reducers called?

MapReduce Terminology Easy
A. Formatting
B. Checkpointing
C. Shuffle
D. Replication

11 What does a mapper produce before the Reduce phase begins?

MapReduce Terminology Easy
A. Cluster configuration
B. DataNode heartbeat
C. Intermediate output
D. File system metadata

12 What is the main responsibility of the HDFS NameNode?

Hadoop NameNode Easy
A. Display command output
B. Execute every map task
C. Store all user records
D. Manage file system metadata

13 Which information is maintained by the NameNode?

Hadoop NameNode Easy
A. Locations of HDFS blocks
B. Passwords of operating systems
C. Contents of every data block
D. Results of every shell command

14 What is the main responsibility of an HDFS DataNode?

Hadoop DataNode Easy
A. Schedule all cluster jobs
B. Maintain the file namespace
C. Compile MapReduce programs
D. Store actual data blocks

15 What does a DataNode regularly send to the NameNode to show that it is active?

Hadoop DataNode Easy
A. User password
B. SQL query
C. Java archive
D. Heartbeat

16 In classic Hadoop MapReduce, what is the main role of the JobTracker?

Hadoop JobTracker Easy
A. Manage file permissions only
B. Edit input text files
C. Coordinate and schedule jobs
D. Store HDFS data blocks

17 Which component submits progress information to the JobTracker in classic Hadoop?

Hadoop JobTracker Easy
A. Secondary NameNode
B. NameNode
C. TaskTracker
D. HDFS client

18 What does a TaskTracker do in classic Hadoop MapReduce?

Hadoop TaskTracker Easy
A. Stores only file metadata
B. Runs map and reduce tasks
C. Creates Hadoop user accounts
D. Maintains the HDFS namespace

19 Which command pattern correctly runs a Hadoop word-count JAR?

Word count on command line Easy
A. hdfs run app.jar WordCount input output
B. hadoop start app.jar WordCount input output
C. java hdfs app.jar WordCount input output
D. hadoop jar app.jar WordCount input output

20 Which command can display the first reducer output file from an HDFS word-count result directory named output?

Word count on command line Easy
A. hdfs dfs -cat output/part-r-00000
B. hdfs dfs -put output/part-r-00000
C. hdfs dfs -rm output/part-r-00000
D. hdfs dfs -mkdir output/part-r-00000

21 A Hadoop cluster must process a large dataset while minimizing network traffic. Which architectural decision best supports this goal?

Hadoop Architecture Medium
A. Send every intermediate record to the NameNode
B. Move all blocks to the node running the client
C. Move computation to nodes storing the required blocks
D. Store each input file on a single DataNode

22 A client submits a MapReduce job that reads a file from HDFS. Which sequence best describes the main interaction?

Hadoop Architecture Medium
A. The client gets block locations from the NameNode and tasks read from DataNodes
B. The client gets file data from the JobTracker and tasks write to the NameNode
C. The client gets block locations from DataNodes and tasks read from the NameNode
D. The client gets file data from the NameNode and tasks write to DataNodes

23 An HDFS file is divided into 5 blocks and stored with a replication factor of 3. Assuming every block is fully replicated, how many block replicas are stored in total?

Hadoop Storage: HDFS Medium
A. 20 block replicas
B. 15 block replicas
C. 10 block replicas
D. 8 block replicas

24 A 300 MB file is stored in HDFS using a block size of 128 MB. How many HDFS blocks are required?

Hadoop Storage: HDFS Medium
A. 2 blocks
B. 4 blocks
C. 3 blocks
D. 5 blocks

25 A DataNode containing one replica of an HDFS block becomes unavailable. Other replicas remain accessible. What is the expected immediate result?

Hadoop Storage: HDFS Medium
A. The file becomes unavailable until the node returns
B. The client must upload the entire file again
C. The NameNode reconstructs the missing bytes itself
D. The file remains readable from another replica

26 A MapReduce program calculates total sales for each product. The mapper emits (product, saleAmount). What should the reducer do?

Hadoop MapReduce paradigm Medium
A. Sum all sale amounts received for each product
B. Store every input record without grouping
C. Replicate each sale amount across all products
D. Sort product names by their character length

27 A job has many repeated mapper keys and performs an associative sum. Which feature can reduce the amount of data transferred during shuffle?

Hadoop MapReduce paradigm Medium
A. An input format that creates smaller records
B. A partitioner that sends all keys to one node
C. A reducer that duplicates intermediate values
D. A combiner that performs local partial sums

28 A MapReduce job uses four reducers. What determines which reducer receives a particular intermediate key?

Hadoop MapReduce paradigm Medium
A. The TaskTracker applied to the reducer count
B. The NameNode applied to the source file path
C. The partitioner applied to the intermediate key
D. The InputFormat applied to the final output

29 In a word-count job, a mapper emits (cloud, 1) three times and (data, 1) twice. After shuffle and sort, what input is logically presented to reducers?

MapReduce Terminology Medium
A. (cloud, 3) and (data, 2) in every case
B. (cloud, [1,1,1]) and (data, [1,1])
C. (1, [cloud,cloud,cloud,data,data])
D. ([cloud,data], [1,1,1,1,1])

30 Which MapReduce component defines how input data is divided into logical splits and converted into key-value records?

MapReduce Terminology Medium
A. Combiner
B. Partitioner
C. InputFormat
D. OutputFormat

31 A mapper task fails after producing intermediate output, but before reducers finish fetching it. What normally happens?

MapReduce Terminology Medium
A. The input split is permanently removed from HDFS
B. The reducer calculates the missing mapper output
C. The NameNode creates the intermediate records
D. The mapper task is rerun to regenerate its output

32 A user renames an HDFS file without changing its contents. Which node primarily updates the information for this operation?

Hadoop NameNode Medium
A. NameNode
B. DataNode
C. TaskTracker
D. JobTracker

33 The NameNode stops receiving heartbeats from a DataNode for an extended period. What action is most appropriate?

Hadoop NameNode Medium
A. Delete all files that had blocks on the DataNode
B. Transfer filesystem metadata to the failed DataNode
C. Mark the DataNode unavailable and schedule missing replicas
D. Run reducer tasks to reconstruct the namespace

34 During an HDFS read, a client discovers that the nearest replica is unavailable. What should the client normally do?

Hadoop DataNode Medium
A. Request the block contents directly from the NameNode
B. Request the block from another listed DataNode
C. Wait until the nearest DataNode becomes available
D. Ask the JobTracker to recreate the complete file

35 Which message allows a DataNode to inform the NameNode about the HDFS blocks it currently stores?

Hadoop DataNode Medium
A. Input split
B. Reduce output
C. Job submission
D. Block report

36 In Hadoop MapReduce version 1, a TaskTracker repeatedly fails tasks assigned to it. Which JobTracker response best maintains job progress?

Hadoop JobTracker Medium
A. Combine every input split into one reducer task
B. Move all HDFS metadata to the failing TaskTracker
C. Reschedule failed tasks on other available TaskTrackers
D. Disable replication for the job's input blocks

37 The JobTracker has two available TaskTrackers, but only one stores a local replica of the next map task's input block. Which placement is generally preferred?

Hadoop JobTracker Medium
A. Assign the map task to the TaskTracker with the local replica
B. Assign the map task directly to the NameNode process
C. Assign the map task to the TaskTracker without the local replica
D. Delay the map task until every node stores the block

38 In MapReduce version 1, how does a TaskTracker normally obtain new work from the JobTracker?

Hadoop TaskTracker Medium
A. It reads pending task definitions from an HDFS data block
B. It sends a heartbeat that reports status and available slots
C. It waits for a DataNode to push a complete job archive
D. It requests namespace changes from the secondary NameNode

39 A word-count job has written results to /output/wc in HDFS. Which command displays all reducer output part files on the terminal?

Word count on command line Medium
A. hadoop fs -rm /output/wc/part-*
B. hadoop fs -mkdir /output/wc/part-*
C. hadoop fs -put /output/wc/part-*
D. hadoop fs -cat /output/wc/part-*

40 A word-count command fails because its intended HDFS output directory already exists. Which action usually resolves the issue before rerunning the job?

Word count on command line Medium
A. Upload the old output with hadoop fs -put /output/wc
B. Copy the old output with hadoop fs -get /output/wc
C. Remove the old output with hadoop fs -rm -r /output/wc
D. Display the old output with hadoop fs -cat /output/wc

41 In a classic Hadoop 1.x cluster, a worker remains reachable and continues sending TaskTracker heartbeats, but its DataNode process has stopped. Which system behavior is most accurate?

Hadoop Architecture Hard
A. The worker becomes unavailable to both subsystems only after the JobTracker enters safe mode.
B. The TaskTracker remains active, and the NameNode reconstructs the stopped DataNode process remotely.
C. The JobTracker may still schedule tasks there, while HDFS eventually marks its block replicas unavailable.
D. The NameNode immediately terminates the TaskTracker because both daemons share one heartbeat.

42 A 300 MiB HDFS file uses a 128 MiB block size and replication factor 3. Ignoring checksums and metadata, which statement is correct?

Hadoop Storage: HDFS Hard
A. It creates 9 logical blocks and consumes 1152 MiB across all replicas.
B. It creates 3 logical blocks and consumes 1152 MiB across all replicas.
C. It creates 3 logical blocks and consumes 900 MiB across all replicas.
D. It creates 9 logical blocks and consumes 900 MiB across all replicas.

43 An HDFS file has replication factor 3, and all DataNodes are healthy. The NameNode reports that all three replicas of one block are on the same rack. What is the most important consequence?

Hadoop Storage: HDFS Hard
A. The block tolerates two DataNode failures but not loss of that rack.
B. The block tolerates loss of that rack because three replicas exist.
C. The block is automatically converted into three independent namespace entries.
D. The block becomes unreadable until the SecondaryNameNode checkpoints it.

44 A MapReduce job reads 10,000 files of 1 KiB each from HDFS. The total payload is small, yet startup and metadata overhead are severe. Which explanation best identifies the structural cause?

Hadoop Storage: HDFS Hard
A. HDFS encrypts each small file with a distinct key stored in the JobTracker namespace.
B. Every 1 KiB file physically occupies a complete replicated block on each DataNode.
C. Every file forces the NameNode to transmit its full contents before mapping can begin.
D. Each file and block adds NameNode metadata and may produce a separate input split.

45 Which statement correctly distinguishes a SecondaryNameNode checkpoint from NameNode failover in classic Hadoop 1.x?

Hadoop NameNode Hard
A. A checkpoint merges fsimage with edits but does not automatically assume the active NameNode role.
B. A checkpoint accepts client writes while the primary NameNode serves only read operations.
C. A checkpoint continuously mirrors every DataNode block and immediately becomes the active NameNode.
D. A checkpoint stores application data blocks and reconstructs namespace metadata only after a failure.

46 After a NameNode restart, HDFS enters safe mode because the configured threshold of reported blocks has not yet been reached. Which action is expected during this period?

Hadoop NameNode Hard
A. The JobTracker assumes block management duties and creates replicas for every missing report.
B. DataNodes stop sending block reports so that the namespace image remains unchanged.
C. Clients can generally read reported blocks, but namespace mutations and replication scheduling are restricted.
D. Clients can create files, but existing files remain unreadable until every replica reports.

47 A client detects a checksum mismatch while reading one replica of an HDFS block, while another replica is healthy. What is the expected recovery path?

Hadoop DataNode Hard
A. The DataNode asks the SecondaryNameNode to reconstruct the block from the namespace edit log.
B. The NameNode returns the corrupt bytes because checksum verification occurs only during block creation.
C. The client repairs the bytes locally and writes the corrected range directly into the corrupt replica.
D. The client reads another replica and reports the corrupt replica so it can be invalidated and replaced.

48 An administrator wants to retire a healthy DataNode without reducing the durable replication of its blocks. Which procedure has the intended semantics?

Hadoop DataNode Hard
A. Stop it immediately and manually remove its block files from the local data directories.
B. Add it to the exclude list, refresh nodes, and wait for decommissioning to complete.
C. Delete its storage ID from fsimage and restart every remaining DataNode in the cluster.
D. Reduce every file's replication factor, stop the node, and restore the factors afterward.

49 A large text file has HDFS block boundaries that fall in the middle of several lines. With a standard line-oriented TextInputFormat, why are records normally neither lost nor duplicated?

Hadoop MapReduce paradigm Hard
A. Each mapper processes only complete physical blocks and sends partial lines directly to the reducer.
B. The JobTracker merges duplicate mapper records by comparing their byte offsets after the map phase.
C. Each split's RecordReader adjusts record boundaries, typically skipping or extending partial lines as needed.
D. The NameNode rewrites every file so that newline characters always coincide with HDFS block boundaries.

50 A job uses four reducers and the default conceptual partition rule . Keys A and B have different hash codes but compare equal under the reducer's grouping comparator. What must be true for correctness?

MapReduce Terminology Hard
A. The sort comparator must force A and B into different spill files.
B. The partitioner must send A and B to the same reducer.
C. The combiner must convert A and B into an identical serialized key.
D. The RecordReader must emit A and B from the same input split.

51 A mapper emits (department, (salary, 1)). A proposed combiner replaces all salaries for each department with (averageSalary, 1), and the reducer averages its received salary values. Why can this produce an incorrect global average?

Hadoop MapReduce paradigm Hard
A. An average alone discards the partial count needed to weight groups of unequal size.
B. Combiners execute exactly once, so the reducer receives only one value from each mapper.
C. Reducers cannot receive floating-point values generated by a mapper-side combiner.
D. The shuffle sorts departments by salary and therefore changes the arithmetic order.

52 A reducer writes directly to an external payment service, and speculative execution is enabled. Two attempts of the same reduce task both reach the service before one attempt is discarded. Which design property is required to prevent duplicate payments?

Hadoop MapReduce paradigm Hard
A. The combiner must aggregate payments because combiners are guaranteed to execute exactly once.
B. The reducer must use more input splits so each speculative attempt handles fewer payment records.
C. The external operation must be idempotent or deduplicated using a stable transaction identifier.
D. The HDFS replication factor must equal the number of simultaneous speculative task attempts.

53 A secondary-sort job uses composite keys (customer, timestamp) and must deliver each customer's records to one reducer in ascending timestamp order. Which configuration is correct?

MapReduce Terminology Hard
A. Partition by the full composite key, sort by customer, and group by timestamp.
B. Partition randomly, sort by timestamp only, and group by customer at the JobTracker.
C. Partition by customer, sort by the full composite key, and group by customer.
D. Partition by timestamp, sort by customer only, and group by the full composite key.

54 A job has 12 map tasks and 5 reduce tasks. Every mapper emits data, but the partitioner assigns no keys to one reducer. How many final reducer part files are normally created after successful completion?

MapReduce Terminology Hard
A. Four part files, because reducers without keys do not commit task output.
B. Sixty part files, because every mapper creates one committed file per reducer.
C. Twelve part files, because each mapper creates one final shuffled output file.
D. Five part files, including an empty file for the reducer receiving no keys.

55 In a default classic Hadoop 1.x deployment without configured recovery or external high availability, what is the principal effect of JobTracker failure?

Hadoop JobTracker Hard
A. Only reduce tasks fail; map tasks continue and commit the entire job without a coordinator.
B. The NameNode assumes scheduling duties because it already tracks block and worker locations.
C. TaskTrackers elect a replacement JobTracker and preserve all in-memory job state automatically.
D. Running jobs lose central coordination and generally must be resubmitted after the JobTracker returns.

56 For a map task whose input block has replicas on nodes N1, N2, and N3, no map slot is immediately free on those nodes, but a slot is free on another node in the same rack. Which scheduling choice best reflects delay scheduling for locality?

Hadoop JobTracker Hard
A. Assign the task to all three replica nodes even though their map slots are occupied.
B. Wait briefly for node locality, then allow rack-local execution if the delay threshold expires.
C. Move the input block permanently to the free node before assigning the map task.
D. Run immediately on any cluster node because HDFS replication makes data locality irrelevant.

57 A classic MRv1 TaskTracker is configured with 8 map slots and 2 reduce slots. All map slots are busy, both reduce slots are idle, and another map task is waiting. Under static slot configuration, what normally happens?

Hadoop TaskTracker Hard
A. The map task immediately uses a reduce slot because all slots are dynamically interchangeable.
B. The TaskTracker moves one active mapper to a reduce slot and launches the waiting mapper.
C. The DataNode creates an additional map slot when it detects a locally replicated input block.
D. The map task waits because an idle reduce slot is not automatically converted into a map slot.

58 A TaskTracker stops heartbeating after launching several attempts. The attempts may still be running at the operating-system level. What does the JobTracker normally do after the worker timeout?

Hadoop TaskTracker Hard
A. It asks the NameNode to convert the attempts into HDFS block-replication operations.
B. It marks the worker lost and reschedules incomplete attempts on other available TaskTrackers.
C. It waits indefinitely because only a task JVM, not a TaskTracker, can report task failure.
D. It treats the attempts as successful because their JVM processes may still be running.

59 The command hadoop jar hadoop-mapreduce-examples.jar wordcount /books /wc-out fails immediately with a message that /wc-out already exists. Which remedy preserves the existing output while allowing a new run?

Word count on command line Hard
A. Append -overwrite because the example WordCount class always supports that flag.
B. Delete only _SUCCESS because its presence is the sole cause of the path-exists check.
C. Use the existing directory because each reducer automatically chooses a unique subdirectory.
D. Choose a different non-existing HDFS output path for the new job.

60 A WordCount job completes with three reducers. Running hadoop fs -cat /wc-out/part-r-00000 shows only some words, even though the input contained many more. What is the correct way to inspect the complete reducer output from the command line?

Word count on command line Hard
A. Run hadoop fs -cat /wc-out/part-m-* because mapper files are the final word counts.
B. Run hadoop fs -cat /wc-out/_SUCCESS because it contains merged reducer records.
C. Run hadoop fs -cat /wc-out/part-r-* to concatenate all reducer part files.
D. Run hadoop fs -getmerge /wc-out/part-r-00000 result.txt because one part references all others.