Apache Hive is a data warehouse software built on top of Hadoop. It allows users to query and manage large datasets using a SQL-like language called HiveQL.
Click to reveal answer
beginner
Name the main components of Hive architecture.
The main components are: 1) Hive Driver, 2) Compiler, 3) Execution Engine, 4) Metastore, and 5) Hive Clients.
Click to reveal answer
beginner
What is the role of the Hive Metastore?
The Hive Metastore stores metadata about tables, partitions, and schemas. It helps Hive understand the structure of the data stored in Hadoop.
Click to reveal answer
intermediate
How does the Hive Driver function in the architecture?
The Hive Driver receives the HiveQL query, manages the lifecycle of the query, and passes it to the compiler for processing.
Click to reveal answer
intermediate
Explain the role of the Execution Engine in Hive.
The Execution Engine executes the tasks created by the compiler. It interacts with Hadoop's MapReduce or other execution frameworks to run the query.
Click to reveal answer
Which component in Hive stores metadata about tables and partitions?
AMetastore
BExecution Engine
CCompiler
DDriver
✗ Incorrect
The Metastore holds metadata information such as table schemas and partition details.
What language does Hive use to query data?
ASQL
BJava
CPython
DHiveQL
✗ Incorrect
Hive uses HiveQL, a SQL-like language designed for querying data in Hadoop.
Which Hive component is responsible for converting HiveQL queries into execution plans?
AMetastore
BCompiler
CDriver
DExecution Engine
✗ Incorrect
The Compiler parses HiveQL and creates execution plans.
What does the Execution Engine in Hive do?
AStores metadata
BCompiles queries
CExecutes tasks on Hadoop
DReceives user queries
✗ Incorrect
The Execution Engine runs the tasks on Hadoop using MapReduce or other frameworks.
Which of these is NOT a component of Hive architecture?
AHive Executor
BHive Compiler
CHive Driver
DHive Metastore
✗ Incorrect
Hive Executor is not a standard component; the correct term is Execution Engine.
Describe the main components of Hive architecture and their roles.
Think about how a query flows from user input to execution.
You got /6 concepts.
Explain how Hive interacts with Hadoop to process data.
Focus on the flow from query to data processing.
You got /5 concepts.
Practice
(1/5)
1. What is the main role of the Hive Metastore in Hive architecture?
easy
A. It stores the actual data files in HDFS
B. It executes the SQL queries on Hadoop data
C. It manages user authentication and security
D. It stores metadata about tables and partitions
Solution
Step 1: Understand the components of Hive architecture
Hive architecture includes Metastore, Driver, Compiler, Execution Engine, and HDFS storage.
Step 2: Identify the role of Metastore
The Metastore stores metadata like table definitions, schema, and partition info, not the actual data.
Final Answer:
It stores metadata about tables and partitions -> Option D
Quick Check:
Metastore = Metadata storage [OK]
Hint: Metastore always holds metadata, not data itself [OK]
Common Mistakes:
Confusing Metastore with data storage
Thinking Metastore runs queries
Mixing Metastore with security management
2. Which of the following is the correct sequence of components involved when a Hive query is executed?
easy
A. Driver -> Compiler -> Metastore -> Execution Engine
B. Compiler -> Driver -> Execution Engine -> Metastore
C. Driver -> Compiler -> Execution Engine -> Metastore
D. Metastore -> Driver -> Compiler -> Execution Engine
Solution
Step 1: Recall the Hive query execution flow
The Driver receives the query, then the Compiler parses and plans it.
Step 2: Understand component order
The Compiler consults the Metastore for metadata, then the Execution Engine runs the tasks.
3. Given the following Hive query execution steps, which component is responsible for converting the query into a directed acyclic graph (DAG) of tasks?
SELECT * FROM sales WHERE year = 2023;
medium
A. Driver
B. Metastore
C. Compiler
D. Execution Engine
Solution
Step 1: Identify the role of Compiler in Hive
The Compiler parses the query and creates a logical plan, then converts it into a DAG of tasks.
Step 2: Differentiate from other components
The Driver manages the session, Metastore stores metadata, and Execution Engine runs the DAG tasks.
Final Answer:
Compiler -> Option C
Quick Check:
Compiler creates DAG = C [OK]
Hint: Compiler turns query into task graph (DAG) [OK]
Common Mistakes:
Thinking Driver creates the DAG
Confusing Metastore with query planning
Assuming Execution Engine creates the DAG
4. A Hive query fails with an error saying metadata not found for a table. Which component is most likely causing this error?
medium
A. Metastore
B. Compiler
C. Driver
D. Execution Engine
Solution
Step 1: Understand the error context
Metadata not found means Hive cannot find table schema or info.
Step 2: Identify responsible component
The Metastore stores all metadata; if missing, it causes this error.
Final Answer:
Metastore -> Option A
Quick Check:
Metadata error = Metastore issue [OK]
Hint: Metadata errors point to Metastore problems [OK]
Common Mistakes:
Blaming Execution Engine for metadata errors
Confusing Driver with metadata storage
Assuming Compiler handles metadata retrieval
5. You want to optimize Hive query execution by reducing the number of MapReduce jobs. Which Hive architecture component should you focus on tuning or configuring?
hard
A. Metastore
B. Execution Engine
C. Driver
D. Compiler
Solution
Step 1: Identify which component runs jobs
The Execution Engine runs the MapReduce or Tez jobs generated by Hive.
Step 2: Understand optimization target
Reducing jobs means tuning Execution Engine settings or choosing efficient engines like Tez or Spark.
Final Answer:
Execution Engine -> Option B
Quick Check:
Job optimization = Execution Engine tuning [OK]
Hint: Tune Execution Engine to reduce jobs and improve speed [OK]
Common Mistakes:
Trying to optimize Metastore for job count
Confusing Driver with job execution
Ignoring Execution Engine's role in running jobs
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.