On this page
- Introduction
- Q1). Explain What Is Hive?
- Q2). When Is Hive Used?
- Q3). Differentiate Modes Of Hive?
- Q4). When Is Map Reduce Mode?
- Q5). What Are The Key Components Of Hive Architecture?
- Q6). Mention What Are The Different Types Of Tables Available In Hive?
- Q7). What In Hive Composed Of?
- Q8). Why Is Hive Not Suitable For OLTP Systems?
- Q9). Mention What Is The Object Inspector Functionality In Hive?
- Q10). What Is (HS2) Hive Server2?
- Q11). What Is The Role Of The Hive Query Processor?
- Q12). List The Components Of A Hive Query Processor?
- Q13). Mention What Are Partitions In Hive?
- Q14). How To Schedule An Issue In JIRA?
- Q15). Is It Possible To Name View Same As The Name Of A Hive Table?
- Q16). Mention What Are Views In Hive?
- Q17). In Hive, How Can You Enable Buckets?
- Q18). In Hive, Can You Overwrite Hadoop MapReduce Configuration In Hive?
- Q19). Explain How Can You Change A Column Data Type In Hive?
- Q20). Mention What Is The Difference Between Order By And Sort By In Hive?
- Q21). Explain When To Use Explode In Hive?
- Q22). Mention How Can You Stop A Partition Form Being Queried?
Introduction
Under the guidance of the expert team of Janbask, We have listed some important Hive Interview Questions and with their answers. The questions are framed in such a way that the candidates will be able to understand the concept of Hive along with the understanding of question pattern.
Hive Interview Questions For Fresher
- Explain what is Hive?
- When is Hive used?
- Differentiate modes of Hive?
- When is Map reduce mode?
- What are the key components of Hive Architecture?
- Mention what are the different types of tables available in Hive?
- What in Hive composed of?
- Why is Hive not suitable for OLTP systems?
- Mention what is the ObjectInspector functionality in Hive?
- What is (HS2) HiveServer2?
Hive Interview Questions For Experienced
- What is the role of the Hive query processor?
- List the components of a Hive query processor?
- Mention what is Partitions in Hive?
- When is "Internal Table" and "External Table" in Hive chosen?
- Is it possible to name view same as the name of a Hive table?
- Mention what are views in Hive?
- In Hive, how can you enable buckets?
- In Hive, can you overwrite Hadoop MapReduce configuration in Hive?
- Explain how can you change a column data type in Hive?
- Mention what is the difference between order by and sort by in Hive?
- Explain when to use explode in Hive?
- Mention how can you stop a partition from being queried?
The Hive is an is an open-source-software tool used in ETL and Data warehousing, developed on top of Hadoop Distributed File System (HDFS). The Hive is mainly used while making data warehouse applications and while dealing with static data instead of dynamic data.
Hive Interview Question And Answers For Freshers
Q1). Explain What Is Hive?
A:The Hive is an is an open-source-software tool used in ETL and Data warehousing, developed on top of Hadoop Distributed File System (HDFS). Hive is a data warehouse framework, that is used for querying and analysis of data is stored in HDFS.
Q2). When Is Hive Used?
A:
- Used while making data warehouse applications.
- While dealing with static data instead of dynamic data
- On high latency application.
- When maintaining a large dataset
- Instead of scripting when queries are used
Q3). Differentiate Modes Of Hive?
A: These modes of Hive are,
- Local mode
- Map reduce mode
- The Hive can operate in the above modes depending on the size of data nodes in Hadoop.
Q4). When Is Map Reduce Mode?
A: The Map reduce mode is used when,
- The large amount of data sets and query both are executed in parallel.
- Hive is used in this mode when there are multiple data nodes in Hadoop, and when data is distributed across different nodes.
- When large data sets with high performance are aimed at.
Q5). What Are The Key Components Of Hive Architecture?
A: Key components of Hive Architecture include,
- User Interface
- Compiler
- Metascore
- Driver
- Execute Engine
Q6). Mention What Are The Different Types Of Tables Available In Hive?
A: There are mainly two types of tables available in Hive.
- Managed table: both the data and schema are controlled by Hive
- External table: only the schema is controlled by Hive.
Q7). What In Hive Composed Of?
A: Hive is composed of,
- Clients
- Services
- Storage and Computing
Q8). Why Is Hive Not Suitable For OLTP Systems?
A: As the insert and update function at the row level is not provided, Hive becomes is not suitable for OLTP systems
Q9). Mention What Is The Object Inspector Functionality In Hive?
A: In Hive the analysis of the internal structure of the columns, rows, and complex objects are done using Object Inspector functionality. Object Inspector functionality creates accessibility to the internal fields present inside the objects.
Q10). What Is (HS2) Hive Server2?
A: Hive Server2 is a server interface. The following functions are performed by HiveServer2.
- Works against Hive by allowing remote clients to execute queries.
- The results of queries mentioned are retrieved
Advanced features:
- Multi-client concurrency
- Authentication
Hive Interview Question And Answers For Experienced
Q11). What Is The Role Of The Hive Query Processor?
A: In order to execute the jobs in the order of dependencies, Hive query processor with the execution time framework, convert the graph of MapReduce jobs.
Q12). List The Components Of A Hive Query Processor?
A: The components of a Hive query processor are,
- Logical Plan Generation
- Physical Plan Generation
- Execution Engine
- Operators
- UDF's and UDAF's
- Optimizer
- Parser
- Semantic Analyzer
- Type Checking
Q13). Mention What Are Partitions In Hive?
A:
- Partitions are a way of dividing tables into different parts based on partition keys.
- Partition is used when the table has one or more Partition keys.
- Partition act as basic key elements that determine how the data is stored in the table.
Q14). How To Schedule An Issue In JIRA?
A: Internal table,
- While processing the available data in the local file system
- When Hive is expected to manage the complete lifecycle of data including the deletion
External table,
- When the processing data is available in HDFS
- When the files are being used outside of Hive
Q15). Is It Possible To Name View Same As The Name Of A Hive Table?
A: No, it isn't possible to name view same as the name of a Hive table. When compared to all the other tables, The name of a view has to be unique and as views present in the same database.
Q16). Mention What Are Views In Hive?
A: Views are Similar to tables In Hive, They are generated based on the requirements.
- Any results can be saved as set data as a view in Hive
- Similar to views used in SQL in usage.
- All types of DML operations can be performed on a view.
Q17). In Hive, How Can You Enable Buckets?
A: By using "set.hive.enforce.bucketing=true;" command buckets can be enabled.
Q18). In Hive, Can You Overwrite Hadoop MapReduce Configuration In Hive?
A: Yes, overwriting Hadoop MapReduce configuration is possible in Hive.
Q19). Explain How Can You Change A Column Data Type In Hive?
A: By using the command, "ALTER TABLE table_name CHANGE column_name column_name new_datatype;" one can change a column data type in Hive.
Q20). Mention What Is The Difference Between Order By And Sort By In Hive?
A: SORT BY: Sorts the data within each reducer. A lot of reducers for SORT BY operation. ORDER BY: Sorts all the data together, that passes through one reducer. Thus, ORDER BY uses a single in Hive.
Q21). Explain When To Use Explode In Hive?
A: Hive uses explode when an array is taken as input and converted into a separate table row in order to convert complex data types into desired table formats.
Q22). Mention How Can You Stop A Partition Form Being Queried?
A: Stopping a partition form being queried by using the "ENABLE OFFLINE" clause with the ALTER TABLE statement.