Sample questions
Question 1Easy
- A bundle of resources such as memory and CPU cores on a node
- A Docker image only containing an application and all of its libraries
- An HDFS block
- A replica of the NameNode
Answer: A. A bundle of resources such as memory and CPU cores on a node
Explanation
Tasks run inside containers whose size is requested from the ResourceManager.
Step-by-step solution
- Request memory and cores.
- RM grants a container.
- Task runs inside it.
Why the other options are wrong
- B. YARN containers are resource allocations.
- C. Blocks are storage units.
- D. Not related.
Question 2Easy
- Yearly Apache Resource Node
- Yet Another Resource Negotiator
- Yet Another Replication Network
- Your Application Runtime Node
Answer: B. Yet Another Resource Negotiator
Explanation
YARN manages cluster resources and schedules applications in Hadoop 2 and later.
Step-by-step solution
- Resource management layer.
- Separates scheduling from processing.
- Runs many frameworks.
Why the other options are wrong
- A. Not the name.
- C. Not the name.
- D. Not the name.
Question 3Easy
In Hadoop 2 and later, which component manages cluster resources and allocates containers?
- HDFS
- YARN
- Hive
- Oozie
Answer: B. YARN
Explanation
YARN separates resource management from processing frameworks like MapReduce and Spark.
Step-by-step solution
- In Hadoop 2 and later, YARN is the cluster resource manager.
- It separates resource management from the processing frameworks.
- It allocates containers, which are slices of cluster resources, to applications.
- So the component is YARN (option B).
Why the other options are wrong
- A. HDFS is the storage layer and does not allocate containers.
- C. Hive is a SQL-style query layer, not a resource manager.
- D. Oozie is a workflow scheduler for jobs, not the cluster resource manager.
Tip: Hadoop 2 split the roles: HDFS stores data, YARN manages resources, the processing framework computes.
Question 4Easy
In YARN, which component allocates cluster resources among applications?
- NameNode, the master daemon that runs on each worker node
- NodeManager
- ResourceManager
- DataNode
Answer: C. ResourceManager
Explanation
The ResourceManager schedules containers; NodeManagers launch and monitor them on each node.
Step-by-step solution
- ResourceManager: global.
- NodeManager: per node.
- ApplicationMaster: per app.
Why the other options are wrong
- A. The NameNode manages HDFS metadata.
- B. It manages resources on a single node.
- D. It stores HDFS blocks.
Question 5Medium
What problem in Hadoop 1 did YARN solve?
- HDFS replication was too high because the ResourceManager could not schedule any containers
- There was no storage layer
- MapReduce was removed
- The JobTracker was a single bottleneck for both scheduling and job tracking
Answer: D. The JobTracker was a single bottleneck for both scheduling and job tracking
Explanation
YARN splits resource management and per-application coordination so more frameworks, such as Spark, can run on the cluster.
Step-by-step solution
- JobTracker did everything.
- YARN separates concerns.
- Supports many frameworks.
Why the other options are wrong
- A. Unrelated.
- B. HDFS existed already.
- C. MapReduce still runs on YARN.
Question 6Medium
In YARN, which daemon runs on each worker node and manages containers there?
- NodeManager
- ResourceManager
- NameNode
- ApplicationMaster
Answer: A. NodeManager
Explanation
NodeManager launches and monitors containers; ResourceManager is the cluster-level arbiter.
Step-by-step solution
- YARN has one ResourceManager for the whole cluster.
- Each worker node runs its own NodeManager.
- The NodeManager launches and monitors the containers on its own node.
- So the per-node daemon is the NodeManager (option A).
Why the other options are wrong
- B. ResourceManager is the cluster-level arbiter, not a per-node daemon.
- C. NameNode holds HDFS metadata, not YARN containers.
- D. ApplicationMaster runs per application and coordinates one job's tasks.
Tip: Per node = NodeManager, per cluster = ResourceManager, per application = ApplicationMaster.
Question 7Medium
What is the role of the ApplicationMaster in YARN?
- Stores metadata for all HDFS files by default by default
- Manages resources for the entire cluster on each node on each node
- Replicates blocks between nodes
- Negotiates resources for one application and coordinates its tasks
Answer: D. Negotiates resources for one application and coordinates its tasks
Explanation
There is one ApplicationMaster per application; it requests containers from the ResourceManager.
Step-by-step solution
- The ApplicationMaster is started for one application.
- It asks the ResourceManager for containers for that application.
- It then coordinates that application's tasks inside those containers.
- So the role is option D: negotiate resources for one application and coordinate its tasks.
Why the other options are wrong
- A. Storing metadata for HDFS files is the NameNode's job, not the ApplicationMaster's.
- B. Cluster-wide resource management is the ResourceManager's job; the ApplicationMaster serves one application.
- C. Replicating blocks is done by HDFS, not by the ApplicationMaster.
Tip: Remember: one ApplicationMaster per application, and it talks to the ResourceManager for containers.
Question 8Medium
The ApplicationMaster in YARN
- Manages all applications in the cluster, deciding which jobs may start and where
- Stores HDFS blocks
- Authenticates all users
- Negotiates containers for one application and tracks its tasks
Answer: D. Negotiates containers for one application and tracks its tasks
Explanation
Each application has its own ApplicationMaster running in a container.
Step-by-step solution
- One AM per application.
- Asks RM for containers.
- Monitors task progress.
Why the other options are wrong
- A. That is the ResourceManager.
- B. DataNodes do that.
- C. Not its task.
Question 9Hard
YARN has a total of 100 GB memory. Each container needs 4 GB, and 1 container is used by the ApplicationMaster. How many task containers can run at once?
- 25
- 100
- 24
- 26
Answer: C. 24
Explanation
100/4 = 25 containers; one is the AM, leaving 24 for tasks.
Step-by-step solution
- Total containers = 100/4 = 25.
- Minus 1 for the AM.
- = 24.
Why the other options are wrong
- A. Ignores the container used by the ApplicationMaster.
- B. Treats memory in GB as container count.
- D. Adds one instead of subtracting.
Practise all 9 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →