An input split is a chunk of data that Hadoop divides from the input files to process in parallel. Each split is processed by one map task.
Click to reveal answer
beginner
Why is data locality important in Hadoop?
Data locality means running tasks on the same machine or close to where the data is stored. It reduces network traffic and speeds up processing.
Click to reveal answer
intermediate
How does Hadoop decide the size of an input split?
Hadoop uses the HDFS block size as a guide but can adjust split size based on configuration and file format to balance load and efficiency.
Click to reveal answer
intermediate
What happens if a map task runs on a node without the data it needs?
The task will read data over the network from another node, which slows down processing and increases network load.
Click to reveal answer
beginner
Explain the relationship between input splits and map tasks.
Each input split is assigned to one map task. The map task processes the data in that split independently.
Click to reveal answer
What does an input split represent in Hadoop?
AA Hadoop configuration file
BA network packet
CA user request
DA chunk of data processed by one map task
✗ Incorrect
An input split is a piece of data assigned to a single map task for processing.
Why is data locality beneficial in Hadoop?
AIt reduces network traffic and speeds up processing
BIt increases disk usage
CIt slows down the job
DIt requires more memory
✗ Incorrect
Running tasks near the data avoids slow network transfers, making processing faster.
What guides the default size of an input split?
AUser's RAM size
BCPU speed
CHDFS block size
DNumber of map tasks
✗ Incorrect
Hadoop uses the HDFS block size as the default size for input splits.
If a map task runs on a node without the data, what happens?
AThe task fails immediately
BData is read over the network, slowing processing
CThe task runs faster
DThe data is copied to the node automatically
✗ Incorrect
Without local data, the task must fetch data over the network, which is slower.
How many map tasks are created per input split?
AOne map task per input split
BMultiple map tasks per split
CNo map tasks
DDepends on the reduce tasks
✗ Incorrect
Each input split is processed by exactly one map task.
Describe what input splits are and why they matter in Hadoop processing.
Think about how Hadoop breaks big data into smaller parts.
You got /3 concepts.
Explain data locality and how it affects the speed of Hadoop jobs.
Consider why running tasks near data is faster.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of input splits in Hadoop?
easy
A. To compress data files for storage efficiency
B. To backup data to multiple locations
C. To encrypt data for security
D. To divide large data into smaller chunks for parallel processing
Solution
Step 1: Understand input splits concept
Input splits break large data into smaller parts so multiple tasks can process them at the same time.
Step 2: Compare options with input splits purpose
Only dividing data for parallel processing matches the input splits function.
Final Answer:
To divide large data into smaller chunks for parallel processing -> Option D
Quick Check:
Input splits = divide data for parallel tasks [OK]
Hint: Input splits break data for parallel work [OK]
Common Mistakes:
Confusing input splits with data compression
Thinking input splits encrypt data
Mixing input splits with backup processes
2. Which of the following is the correct way to describe data locality in Hadoop?
easy
A. Running tasks close to where data is stored to reduce network traffic
B. Running tasks on nodes far from the data to balance load
C. Copying data to all nodes before processing
D. Encrypting data before processing
Solution
Step 1: Define data locality
Data locality means running processing tasks near the data location to save time and network resources.
Step 2: Match definition with options
Only Running tasks close to where data is stored to reduce network traffic describes running tasks close to data to reduce network traffic.
Final Answer:
Running tasks close to where data is stored to reduce network traffic -> Option A
Quick Check:
Data locality = run tasks near data [OK]
Hint: Data locality means processing near data location [OK]
Common Mistakes:
Thinking data locality means copying data everywhere
Confusing data locality with encryption
Believing tasks run far from data for load balancing
3. Consider a Hadoop job processing a 128 MB file with a default block size of 64 MB. How many input splits will Hadoop create by default?
medium
A. 2
B. 128
C. 64
D. 1
Solution
Step 1: Understand block size and file size relation
The file is 128 MB and block size is 64 MB, so the file fits into two blocks.
Step 2: Determine number of input splits
By default, Hadoop creates one input split per block, so 2 splits for 2 blocks.
Final Answer:
2 -> Option A
Quick Check:
File size / block size = input splits [OK]
Hint: Input splits = file size ÷ block size [OK]
Common Mistakes:
Assuming one split regardless of file size
Confusing block size with split size
Choosing number equal to file size in MB
4. A Hadoop job is running slower than expected. The developer suspects data locality is not being used. Which of the following could fix this issue?
medium
A. Increase the number of input splits to one per byte
B. Configure the job to prefer running tasks on nodes where data blocks reside
C. Disable input splits to process the whole file at once
D. Compress the input data before processing
Solution
Step 1: Identify cause of slow job
Slow job may be due to tasks running far from data, causing network delays.
Step 2: Choose fix to improve data locality
Configuring the job to run tasks on nodes holding data blocks improves data locality and speed.
Final Answer:
Configure the job to prefer running tasks on nodes where data blocks reside -> Option B
Quick Check:
Improve data locality by running tasks near data [OK]
Hint: Run tasks on nodes with data blocks to speed up [OK]
Common Mistakes:
Increasing splits too much causes overhead
Disabling splits reduces parallelism
Compressing data doesn't fix locality
5. You have a Hadoop cluster with 4 nodes. A 256 MB file is stored with a block size of 64 MB. If one node fails, how does Hadoop maintain data locality and processing efficiency?
hard
A. It processes all data on a single node ignoring data locality
B. It stops the job until the failed node is fixed
C. It reassigns input splits to nodes holding replica blocks to keep tasks near data
D. It deletes the missing blocks and continues with remaining data
Solution
Step 1: Understand Hadoop replication and fault tolerance
Hadoop stores multiple copies (replicas) of each block on different nodes to handle failures.
Step 2: How Hadoop maintains data locality after node failure
When a node fails, Hadoop schedules tasks on nodes that have replica blocks to keep data locality and efficiency.
Final Answer:
It reassigns input splits to nodes holding replica blocks to keep tasks near data -> Option C
Quick Check:
Replica blocks keep data local despite node failure [OK]
Hint: Hadoop uses replicas to keep data local if node fails [OK]
Common Mistakes:
Thinking job stops on node failure
Assuming data is processed on one node only
Believing missing blocks are deleted immediately
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.