Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Which of the following components provides the distributed storage in the Hadoop Architecture?
Not quite. Try another option.
Answer: HDFS
HDFS (Hadoop Distributed File System) is the primary storage system of the Hadoop architecture, designed to store large files across multiple machines.
Question 2 of 60 · Hadoop Architecture · Easy
What are the two core components of the original Apache Hadoop framework?
Not quite. Try another option.
Answer: HDFS and MapReduce
The original Hadoop framework consists of two core layers: HDFS for storage and MapReduce for processing.
Question 3 of 60 · Hadoop Architecture · Easy
Hadoop is primarily optimized for which type of data processing?
Not quite. Try another option.
Answer: Batch processing
Hadoop is designed for batch processing, meaning it efficiently processes massive amounts of data in the background rather than providing real-time responses.
Question 4 of 60 · Hadoop Storage: HDFS · Easy
What does HDFS stand for?
Not quite. Try another option.
Answer: Hadoop Distributed File System
HDFS stands for Hadoop Distributed File System, which is the distributed file system that provides high-throughput access to application data.
Question 5 of 60 · Hadoop Storage: HDFS · Easy
What is the default block size in HDFS for Hadoop 2.x and later?
Not quite. Try another option.
Answer: 128 MB
In Hadoop 2.x and later versions, the default block size in HDFS is 128 MB. This large size helps minimize disk seek time.
Question 6 of 60 · Hadoop Storage: HDFS · Easy
How does HDFS primarily achieve fault tolerance?
Not quite. Try another option.
Answer: By replicating data blocks across multiple nodes
HDFS achieves reliability and fault tolerance by replicating data blocks (usually 3 times by default) across different nodes in the cluster.
Question 7 of 60 · Hadoop Storage: HDFS · Easy
Which data access model does HDFS follow?
Not quite. Try another option.
Answer: Write-once, read-many
HDFS is designed for a 'write-once, read-many' model. A file once created, written, and closed need not be changed, which simplifies data coherency.
Question 8 of 60 · Hadoop MapReduce paradigm · Easy
In the MapReduce paradigm, what is the role of the Reduce function?
Not quite. Try another option.
Answer: To aggregate and summarize intermediate results
The Reduce function takes the intermediate output from the Map phase and aggregates or summarizes it to produce the final output.
Question 9 of 60 · Hadoop MapReduce paradigm · Easy
What is the primary data structure passed between the Map and Reduce phases?
Not quite. Try another option.
Answer: Key-Value pairs
The MapReduce framework operates exclusively on <key, value> pairs, meaning the map function outputs intermediate key-value pairs which are then processed by the reduce function.
Question 10 of 60 · Hadoop MapReduce paradigm · Easy
Which phase occurs directly between the Map phase and the Reduce phase to group data by keys?
Not quite. Try another option.
Answer: Shuffle and Sort
The 'Shuffle and Sort' phase collects the output from the mappers, sorts them by key, and transfers them to the reducers.
Question 11 of 60 · MapReduce Terminology · Easy
In MapReduce terminology, what is an 'InputSplit'?
Not quite. Try another option.
Answer: A logical representation of data processed by a single Map task
An InputSplit is a logical division of the input data. Each Map task processes exactly one InputSplit.
Question 12 of 60 · MapReduce Terminology · Easy
What does a 'RecordReader' do in a MapReduce job?
Not quite. Try another option.
Answer: It translates an InputSplit into key-value pairs for the Mapper
The RecordReader reads data from an InputSplit and converts it into key-value pairs so the Mapper can process them.
Question 13 of 60 · MapReduce Terminology · Easy
What is the term for the output produced by the Mapper before it reaches the Reducer?
Not quite. Try another option.
Answer: Intermediate Data
The key-value pairs generated by the Map function are called Intermediate Data. This data is temporarily stored before being sent to the Reducer.
In HDFS, which node is responsible for storing the metadata about the file system?
Not quite. Try another option.
Answer: NameNode
The NameNode acts as the master server in HDFS. It manages the file system namespace and stores all metadata, such as file names, permissions, and block locations.
What happens if the NameNode fails in a traditional Hadoop 1.x cluster (without High Availability)?
Not quite. Try another option.
Answer: The entire HDFS becomes inaccessible
In early versions of Hadoop without High Availability, the NameNode was a single point of failure. If it failed, the metadata was unavailable, making the entire file system inaccessible.
Question 17 of 60 · Job Tracker and TaskTracker · Easy
In the MapReduce version 1 (MRv1) architecture, which component manages the resources and schedules jobs across the cluster?
Not quite. Try another option.
Answer: JobTracker
The JobTracker in MRv1 is the master service responsible for resource management, scheduling MapReduce jobs, and tracking their progress.
Question 18 of 60 · Job Tracker and TaskTracker · Easy
Where does a TaskTracker typically run in a Hadoop MRv1 cluster?
Not quite. Try another option.
Answer: On the same node as a DataNode
To achieve data locality, a TaskTracker usually runs on the same physical machine as a DataNode, allowing it to process data that is stored locally.
Question 19 of 60 · word count on command line · Easy
When running a typical Word Count program in Hadoop, what is the expected output format?
Not quite. Try another option.
Answer: A list of unique words alongside their frequency of occurrence
The standard Word Count MapReduce program outputs a text file containing key-value pairs, where the key is a unique word and the value is the number of times it appeared.
Question 20 of 60 · word count on command line · Easy
Which command is commonly used on the command line to execute a compiled MapReduce JAR file?
Not quite. Try another option.
Answer: hadoop jar
The hadoop jar command is used to run a MapReduce job packaged in a JAR file on a Hadoop cluster.
Question 21 of 60 · Hadoop Storage: HDFS · Medium
A user wants to store a file of size 300 MB in HDFS with a configured block size of 128 MB. Assuming the replication factor is set to 3, how many physical block replicas will be stored across the cluster in total?
Not quite. Try another option.
Answer: 9 blocks
The file is split into 3 logical blocks (128 MB, 128 MB, and 44 MB). Since the replication factor is 3, each of the 3 logical blocks will have 3 replicas, resulting in physical blocks stored in the cluster.
Question 22 of 60 · Hadoop Architecture · Medium
In a Hadoop cluster configured with Rack Awareness and a replication factor of 3, how does the cluster typically place the replicas to ensure fault tolerance while optimizing write bandwidth?
Not quite. Try another option.
Answer: One replica is placed on the local rack, and the other two are placed on two different nodes in a different rack.
To balance fault tolerance and write bandwidth, Hadoop's default rack awareness policy places the first replica on the local rack, and the second and third replicas on two different nodes within a single remote rack. This protects against a single rack failure.
Question 23 of 60 · Hadoop Architecture · Medium
What is the primary architectural advantage of the 'Data Locality' principle in Hadoop?
Not quite. Try another option.
Answer: It schedules computational tasks on the node where the data physically resides, minimizing network congestion.
Data locality means moving the computation to the data rather than moving data to the computation. By executing map tasks on the nodes where the HDFS blocks are stored, Hadoop drastically reduces network overhead and improves performance.
Question 24 of 60 · Hadoop Storage: HDFS · Medium
An administrator notices that the NameNode is running out of RAM, even though the cluster's total storage capacity is mostly empty. What is the most likely cause of this issue?
Not quite. Try another option.
Answer: The cluster is storing an excessive number of very small files.
The NameNode stores metadata for every file and block in memory (RAM). Even if the files are tiny (e.g., a few kilobytes), each still consumes a fixed amount of memory for metadata (roughly 150 bytes). Millions of small files can exhaust NameNode memory before disk space runs out.
Question 25 of 60 · Hadoop Storage: HDFS · Medium
What is the actual role of the Secondary NameNode in a standard Hadoop cluster?
Not quite. Try another option.
Answer: It periodically downloads the fsimage and edits files, merges them, and uploads the updated fsimage to the primary NameNode.
The Secondary NameNode is not a high-availability backup. Its purpose is to perform checkpointing by periodically merging the edits log into the fsimage to prevent the edits file from growing too large, which would cause long NameNode startup times.
Question 26 of 60 · Hadoop Storage: HDFS · Medium
During an HDFS write operation, a client wants to write a block with a replication factor of 3. How is the data practically transferred to the DataNodes?
Not quite. Try another option.
Answer: The client sends the data to the first DataNode, which pipes it to the second, which in turn pipes it to the third.
HDFS uses a replication pipeline. The client streams the data to the first DataNode, which immediately forwards it to the second DataNode, which forwards it to the third. This pipelining efficiently utilizes network bandwidth.
Question 27 of 60 · Hadoop MapReduce paradigm · Medium
If a MapReduce job is configured with zero Reducers (setNumReduceTasks(0)), what is the final output of the job?
Not quite. Try another option.
Answer: The output consists of the unsorted key-value pairs exactly as outputted by the Map tasks, stored in HDFS.
If the number of reducers is zero, the MapReduce job becomes a 'map-only' job. The shuffle and sort phases are skipped, and the output of the map phase is written directly to HDFS without being sorted.
Question 28 of 60 · Hadoop MapReduce paradigm · Medium
How does a Combiner optimize a MapReduce job that calculates the total sales per region?
Not quite. Try another option.
Answer: It performs a local aggregation of map output data on the Map node, reducing the amount of data sent across the network during the shuffle phase.
A Combiner acts as a 'mini-reducer' running locally on the output of a Map task. By aggregating data locally before it is sent over the network to the Reducers, it significantly minimizes the bandwidth required during the shuffle phase.
Question 29 of 60 · Hadoop MapReduce paradigm · Medium
During the Shuffle and Sort phase of MapReduce, what specific guarantee is provided to the Reducer regarding its input?
Not quite. Try another option.
Answer: Values associated with the same key are grouped together, and the keys are presented to the Reducer in sorted order.
The framework guarantees that all values for a given key are grouped together and passed to the reducer's reduce() method. Furthermore, the keys are sorted, allowing the reducer to process the data sequentially.
Question 30 of 60 · MapReduce Terminology · Medium
In the context of MapReduce Terminology, what is the primary difference between an HDFS Block and an InputSplit?
Not quite. Try another option.
Answer: An HDFS Block is a physical division of data on disk, whereas an InputSplit is a logical division of data that defines the input for a single Map task.
A Block is a physical chunk of a file stored in HDFS (e.g., 128 MB). An InputSplit is a logical representation of data created by the InputFormat, which the RecordReader parses into key-value pairs for exactly one map task. Often they align, but an InputSplit respects logical record boundaries.
Question 31 of 60 · MapReduce Terminology · Medium
Why must keys emitted by the Mapper implement the WritableComparable interface in Hadoop?
Not quite. Try another option.
Answer: So they can be serialized over the network and sorted during the shuffle phase.
In Hadoop, data passed between phases must be serializable (Writable). Furthermore, because keys must be sorted and grouped during the shuffle phase before reaching the Reducer, they must also be comparable (Comparable). Thus, keys implement WritableComparable.
Question 32 of 60 · MapReduce Terminology · Medium
What component is directly responsible for converting raw input data (e.g., lines of a text file) into the initial <key, value> pairs processed by the Mapper?
Not quite. Try another option.
Answer: The RecordReader
The RecordReader interacts directly with the InputSplit. It reads the raw data from the data source and translates it into <key, value> pairs that are passed one by one to the map() function.
Question 33 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Medium
In a MapReduce v1 (MRv1) architecture, what is the primary role of the JobTracker?
Not quite. Try another option.
Answer: To allocate resources, schedule jobs, monitor TaskTrackers, and re-execute failed tasks.
In classic Hadoop (MRv1), the JobTracker is the central service responsible for resource management, task scheduling, monitoring the progress of jobs, and handling failures by re-assigning tasks to available TaskTrackers.
Question 34 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Medium
A TaskTracker node unexpectedly loses power while executing a Map task. How does the cluster recognize and handle this failure?
Not quite. Try another option.
Answer: The JobTracker stops receiving heartbeats from the TaskTracker, marks it as dead, and schedules the incomplete task on another available TaskTracker.
TaskTrackers send regular heartbeats to the JobTracker. If the JobTracker misses heartbeats for a certain threshold, it assumes the TaskTracker has failed and re-assigns any running tasks from that node to other healthy nodes.
Question 35 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Medium
When a JobTracker determines that a specific Map task is running unusually slow compared to others in the same job, what mechanism can it use to mitigate this?
Not quite. Try another option.
Answer: Speculative Execution
Speculative Execution is a feature where the JobTracker detects a slow-running task (a straggler) and launches a duplicate, or speculative, task on another node. Whichever task finishes first is used, and the other is killed.
Question 36 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Medium
Which of the following best describes the relationship between DataNodes and TaskTrackers in a traditional Hadoop 1.x cluster?
Not quite. Try another option.
Answer: They typically run on the same physical machines to enable data locality for MapReduce tasks.
To achieve data locality, slave nodes in a classic Hadoop cluster run both a DataNode daemon (for storage) and a TaskTracker daemon (for computation). This allows tasks to be processed on the same node where the data is stored.
Question 37 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Medium
If a DataNode successfully writes its block but its disk subsequently fails, how does the NameNode eventually find out about the missing data?
Not quite. Try another option.
Answer: The DataNode sends regular block reports along with its heartbeats to the NameNode.
DataNodes periodically send Block Reports to the NameNode. A Block Report contains a list of all HDFS blocks stored on that DataNode. If a disk fails, the blocks will be missing from the report, prompting the NameNode to replicate them elsewhere.
Question 38 of 60 · word count on command line · Medium
A user attempts to run a pre-compiled word count MapReduce job using the command: hadoop jar wc.jar WordCount /user/data/input /user/data/output. However, the job immediately fails before running any map tasks. What is the most likely cause?
Not quite. Try another option.
Answer: The /user/data/output directory already exists in HDFS.
Hadoop strictly requires that the output directory for a MapReduce job does not exist prior to execution. This safety mechanism prevents a job from accidentally overwriting the output of a previous job. If it exists, the job setup fails immediately.
Question 39 of 60 · word count on command line · Medium
When executing a WordCount program via the command line (hadoop jar wordcount.jar org.example.WordCount /input /output), what happens to the output data produced by the Reducers?
Not quite. Try another option.
Answer: It is written as multiple part files (e.g., part-r-00000) inside the /output directory in HDFS.
By default, MapReduce jobs write their final output to HDFS in the specified output directory. Each Reducer creates its own output file, typically named part-r-00000, part-r-00001, etc., depending on the number of reduce tasks.
Question 40 of 60 · Hadoop Architecture · Medium
In a Hadoop High Availability (HA) cluster, what prevents the 'split-brain' scenario where two NameNodes both think they are active and attempt to alter the filesystem simultaneously?
Not quite. Try another option.
Answer: Fencing mechanisms are configured to isolate or power off the previously active NameNode.
To prevent split-brain in an HA setup, Hadoop uses 'fencing' methods. If a failover occurs, the cluster employs techniques (like shutting down the old NameNode's network port or even cutting its power via an intelligent PDU) to ensure it can no longer write to the shared storage.
Question 41 of 60 · Hadoop Storage: HDFS · Hard
During an HDFS write operation, if the second DataNode in the replication pipeline fails while receiving a block, what is the immediate sequence of actions taken by the HDFS client and the remaining DataNodes?
Not quite. Try another option.
Answer: The pipeline is closed, the failed DataNode is removed, the remaining DataNodes are given a new generation stamp, and the write resumes with the remaining DataNodes.
When a DataNode fails in the pipeline, the pipeline is temporarily closed. Any data in the ack queue is returned to the data queue. The remaining DataNodes receive a new generation stamp so the failed node's partial block is discarded if it recovers. The write resumes on the remaining nodes; the NameNode will later asynchronously replicate the block to meet the target replication factor.
Question 42 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Hard
In the MRv1 architecture, what happens if a TaskTracker stops sending heartbeats to the JobTracker due to a temporary network partition that exceeds the timeout period?
Not quite. Try another option.
Answer: The JobTracker marks the TaskTracker as dead and reschedules its tasks; when the partition resolves, the TaskTracker attempts to reconnect and is instructed to kill its old tasks.
If a TaskTracker's heartbeat times out, the JobTracker assumes it is dead and reschedules its tasks. The TaskTracker, however, continues executing its tasks blindly until the network is restored. Once it reconnects, the JobTracker recognizes the stale state and sends a command to the TaskTracker to kill those obsolete tasks.
Question 43 of 60 · Hadoop MapReduce paradigm · Hard
How does the MapReduce framework handle speculative execution when a task is straggling due to systemic data skew (e.g., one Reducer receives 90% of the data) rather than hardware degradation?
Not quite. Try another option.
Answer: It launches a speculative task, but both the original and speculative tasks will take equally long since the skew is inherent to the data, potentially wasting cluster resources.
Speculative execution is designed to counter hardware slowness by launching duplicate tasks on different nodes. However, it cannot solve data skew. If a Reducer is slow because it received vastly more data, the speculative duplicate will receive the exact same skewed data and suffer the same delay, simply wasting cluster resources.
Question 44 of 60 · MapReduce Terminology · Hard
Suppose an HDFS file is 130 MB and the block size is 64 MB. The file contains textual records where a single logical record spans across the boundary of the first and second block. How does TextInputFormat handle the InputSplit boundary to ensure data integrity?
Not quite. Try another option.
Answer: The first Map task processes the first block and reads past the 64 MB boundary into the second block until the end of the current record. The second Map task ignores the first partial record in its block.
TextInputFormat uses LineRecordReader, which is designed to handle records crossing block boundaries. The Mapper assigned to a split will read past the end of its block to finish the last record. Conversely, the Mapper for the next split will skip the first partial record it encounters, knowing the previous Mapper handled it.
Question 45 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Hard
Which of the following best describes the structural transition of metadata when the NameNode is restarted, specifically regarding the FsImage and EditLog?
Not quite. Try another option.
Answer: The NameNode applies the EditLog to the FsImage in memory, creates a new FsImage on disk, and truncates the old EditLog before accepting new client requests.
During startup, the NameNode loads the FsImage into memory and replays the EditLog to reach the latest state. It then flushes this updated state back to disk as a new FsImage and clears the EditLog (since its transactions are now in the FsImage). Only after this process is complete and block reports are received does it exit SafeMode.
Question 46 of 60 · word count on command line · Hard
When executing a Word Count job via the Hadoop command line using hadoop jar, what is the effect of setting -D mapreduce.job.reduces=0?
Not quite. Try another option.
Answer: The Map output is written directly to HDFS without a shuffle, sort, or reduce phase, resulting in output files containing unaggregated key-value pairs.
Setting the number of Reducers to 0 creates a Map-only job. In this scenario, the shuffle, sort, and reduce phases are completely bypassed. The Mappers output their raw key-value pairs directly to HDFS. For Word Count, this means outputting (word, 1) for every occurrence without any global aggregation.
Question 47 of 60 · Hadoop Architecture · Hard
In a Hadoop cluster configured with Rack Awareness, if a client running on a DataNode requests to write a file with a replication factor of 3, how does the block placement policy distribute the replicas?
Not quite. Try another option.
Answer: Replica 1 on the local node, Replica 2 on a random node in a different rack, Replica 3 on another node in that same different rack.
Hadoop's default block placement policy places the first replica on the local node (or a random node if the client is outside the cluster). To balance fault tolerance and write bandwidth, the second replica is placed on a node in a different remote rack, and the third replica is placed on a different node in that same remote rack. This minimizes cross-rack network traffic while ensuring survival if a single rack fails.
Question 48 of 60 · Hadoop Storage: HDFS · Hard
An HDFS client opens a file for appending (append()). Simultaneously, a network partition isolates the client from the NameNode but not from the DataNodes. How does HDFS handle lease management for this file?
Not quite. Try another option.
Answer: The NameNode's lease for the client expires after the hard limit (usually 1 hour). The NameNode initiates lease recovery, closing the file and potentially discarding uncommitted blocks.
In HDFS, writers hold a lease managed by the NameNode. If the client cannot renew the lease (due to a partition), the soft limit (1 min) and eventually the hard limit (1 hour) will expire. Upon hard limit expiration, the NameNode forcefully revokes the lease, triggers lease recovery on the last block via the DataNodes, and closes the file, guaranteeing the file system's integrity.
Question 49 of 60 · Hadoop MapReduce paradigm · Hard
Consider a MapReduce job where the map output keys are custom objects representing composite keys: [String category, Long timestamp]. You want the Reducer to process data grouped by category, but sorted internally by timestamp. Which components must be explicitly configured to achieve this Secondary Sorting?
Not quite. Try another option.
Answer: A custom Partitioner on category, a custom GroupingComparator on category, and a custom SortComparator on [category, timestamp].
For Secondary Sorting, the Partitioner must partition only by the natural key (category) so all related records go to the same Reducer. The SortComparator must sort the composite key by [category, timestamp] during the shuffle phase. Finally, the GroupingComparator must group only by the natural key (category) so the Reducer's reduce() method receives all timestamps for a category in one iterable.
Question 50 of 60 · MapReduce Terminology · Hard
What is the primary constraint placed on the Combiner function in the MapReduce paradigm to ensure the correctness of the final output?
Not quite. Try another option.
Answer: Its input key-value types must match the output key-value types, and the operation it performs must be both commutative and associative.
A Combiner acts as a mini-reducer on the map side. Because Hadoop does not guarantee how many times a Combiner will be called (it could be zero, once, or multiple times), the function must be commutative and associative (like addition or finding a maximum). Furthermore, its input types must match its output types so it can safely be chained or bypassed.
Question 51 of 60 · Hadoop Storage: HDFS · Hard
How does HDFS ensure data integrity during a read operation if a client detects a checksum mismatch for a block?
Not quite. Try another option.
Answer: The client reports the bad block and the DataNode to the NameNode, then proceeds to read from another replica of the block.
When an HDFS client reads data, it verifies checksums. If it detects a corrupted block, it reports the corruption to the NameNode (so the NameNode can schedule block replication from a healthy replica to fix the corruption) and transparently switches to another DataNode that holds a healthy replica of the block to continue the read operation.
Question 52 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Hard
In a heavily utilized MRv1 cluster, the JobTracker must schedule tasks based on data locality. If a node has a free slot, but no pending Map tasks have data local to that node, what is the default delay scheduling strategy often used by fair/capacity schedulers?
Not quite. Try another option.
Answer: The JobTracker waits for a short, configurable period of time before assigning a non-local task, hoping a task with local data becomes available.
Delay scheduling is an optimization in schedulers (like Fair and Capacity schedulers). Instead of immediately assigning a rack-local or off-switch task when node-local data isn't available, the scheduler temporarily skips the job and waits a short time. This highly increases the probability that a node-local task will become available shortly, improving overall cluster throughput.
Question 53 of 60 · Hadoop MapReduce paradigm · Hard
During the Shuffle and Sort phase of MapReduce, what dictates the transition of map output data from memory to disk on the Mapper side?
Not quite. Try another option.
Answer: Data is buffered in a circular in-memory buffer; when the buffer reaches a certain threshold (e.g., 80%), a background thread begins spilling the contents to disk while the Mapper continues writing to the remaining space.
Map tasks write their output to a circular memory buffer (default 100 MB). When the buffer fill reaches a threshold (default 80%), a background thread spills the data to local disk. The Mapper continues producing output into the remaining 20% of the buffer. If the buffer fills completely, the map thread blocks until the spill finishes.
Question 54 of 60 · word count on command line · Hard
A user executes a Word Count job from the command line using a compressed input file (input.txt.gz). What determines whether Hadoop can split this compressed file into multiple InputSplits?
Not quite. Try another option.
Answer: The compression codec used; algorithms like Gzip do not support splitting, so the entire file must be processed by a single Mapper, whereas bzip2 is splittable.
Not all compression codecs are splittable. Gzip creates a continuous compressed stream without synchronization markers, meaning a Mapper cannot jump to the middle of the file to start reading. Thus, a Gzip file must be processed by one Mapper. Codecs like bzip2 or LZO (with indexing) provide sync points, allowing Hadoop to split them across multiple Mappers.
Question 55 of 60 · MapReduce Terminology · Hard
In the context of the WritableComparable interface, which is strictly required for MapReduce keys, what is the specific purpose of the compareTo() and readFields() methods, respectively?
Not quite. Try another option.
Answer: compareTo() handles sorting of keys during the shuffle phase; readFields() deserializes the object state from an incoming DataInput stream.
The WritableComparable interface combines Writable (for serialization/deserialization) and Comparable (for sorting). compareTo() is used to sort keys during the shuffle and sort phase. readFields() is the method from the Writable interface used to deserialize the data from the binary stream (DataInput) back into the object's fields.
Question 56 of 60 · Hadoop Architecture · Hard
Which of the following describes the most critical limitation of the MRv1 architecture (JobTracker/TaskTracker) that ultimately necessitated the shift to YARN (Yet Another Resource Negotiator)?
Not quite. Try another option.
Answer: The JobTracker was deeply tightly coupled with both cluster resource management and job lifecycle scheduling, creating a massive scalability bottleneck around 4,000 nodes.
In MRv1, the JobTracker performed dual duties: managing cluster resources and tracking the status/lifecycle of every single task in every job. This tight coupling and heavy workload caused the JobTracker to become a CPU and memory bottleneck, severely limiting the maximum size of a Hadoop cluster (typically maxing out around 4,000 nodes). YARN solved this by splitting these roles into the ResourceManager and ApplicationMaster.
Question 57 of 60 · Hadoop - Namenode, DataNode, Job Tracker and TaskTracker · Hard
If the JobTracker JVM fails and undergoes a restart in a classic MRv1 setup, what is the fate of the currently executing jobs and the TaskTrackers?
Not quite. Try another option.
Answer: All running jobs fail entirely because the job metadata and task state held in the JobTracker's memory are lost; TaskTrackers reconnect to the new JobTracker as empty nodes.
In classic MRv1, the JobTracker is a single point of failure (SPOF) without native High Availability. Job states, task progress, and scheduling metadata are kept in the JobTracker's RAM. If it crashes, all running jobs are lost and must be resubmitted. Upon restart, TaskTrackers reconnect but old jobs cannot be resurrected.
Question 58 of 60 · Hadoop MapReduce paradigm · Hard
In MapReduce, DistributedCache is used to broadcast side data. If an application utilizes DistributedCache.addCacheArchive(), how does the TaskTracker process this payload before task execution?
Not quite. Try another option.
Answer: It un-archives the file automatically on the local disk of the worker node, and provides the path to the task via symlinks in the task's working directory.
When an archive (e.g., zip, tar, tgz) is added to the DistributedCache using addCacheArchive (or the newer addArchiveToClassPath), the framework automatically copies the archive to the local disk of the TaskTracker, extracts (un-archives) it, and creates a symlink in the working directory of the task, allowing local file I/O access to the extracted contents.
Question 59 of 60 · MapReduce Terminology · Hard
Regarding data localization, what distinguishes a Rack-local task from a Node-local task in Hadoop MapReduce?
Not quite. Try another option.
Answer: Node-local tasks process data residing on the same DataNode as the TaskTracker; Rack-local tasks process data residing on a different DataNode but within the same network switch.
Data locality involves placing the computation near the data. A 'Node-local' map task runs on the exact same physical machine that holds the HDFS block, avoiding network transit. A 'Rack-local' task runs on a different machine than the data block, but on the same rack, meaning data only traverses the top-of-rack switch, which is slower than node-local but faster than off-rack.
Question 60 of 60 · Hadoop Architecture · Hard
Hadoop employs an abstraction called SequenceFile for storing binary key-value pairs. Within the architecture, what is the structural advantage of using SequenceFile.CompressionType.BLOCK over RECORD compression?
Not quite. Try another option.
Answer: BLOCK compression compresses multiple records together as a single block, achieving much higher compression ratios than compressing individual records, while maintaining splittability.
SequenceFile supports NONE, RECORD, and BLOCK compression. RECORD compresses only the values. BLOCK compression aggregates multiple records (both keys and values) into blocks and compresses the block as a whole. Because it applies compression over a larger data payload, it achieves significantly better compression ratios. It also writes sync markers between blocks, ensuring the file remains splittable for MapReduce.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of INT312 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of INT312 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.