Top 10 Hive Developer interview questions
1) What is Hive?
Hive is an ETL and Data warehousing tool developed on top of Hadoop Distributed File System (HDFS). It is a data warehouse framework to query and analyse the data that is stored in HDFS. Hive is an open-source-software that lets programmers analyze large data sets on Hadoop.2) What are the Key components in Hive Architecture?
- Command Line Interface (cli)
- Hive Web Interface (hwi)
- HiveServer (hiveserver)
- Metastore
- Driver
- Execution Engine
3) What is a Hive Metastore?
Hive Metastore is a central repository in Hive. It is used for storing schema information or metadata in the external database.4) Mention what are the different modes of Hive?
Different modes of Hive depends on the size of data nodes in Hadoop.These modes are,
- Local mode
- Map reduce mode
5) What is the use of Hcatalog?
Hcatalog can be used to share data structures with external systems. Hcatalog provides access to hive metastore to users of other tools on Hadoop so that they can read and write data to hive’s data warehouse.6) What are the differences between Hive and HBase?
- Hive enables most of the SQL queries, but HBase does not allow SQL queries
- Hive does not support record level insert, update, and delete operations on table
- Hive is a data warehouse framework whereas HBase is NoSQL database
- Hive run on the top of MapReduce, HBase runs on the top of HDFS
7) Where is table data stored in Apache Hive by default?
hdfs://namenode_server/user/hive/warehouse
8) Write a hive query to view all the databases whose name begins with "db"
hive> SHOW DATABASES LIKE 'db.*';
9) Write a query to rename a table Student to Student_2.
hive> Alter Table Student RENAME to Student_2;
10) How to create an index on a table in Hive?
hive> CREATE INDEX index_salary ON TABLE employee (salary)
AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler';
The above query creates an index named index_salary which points to the salary column in the employee table.
11) How to delete the above index named index_salary?
DROP INDEX index_salary ON employee;
12) How to see the present working directory in UNIX from hive. Is it possible to run this command from hive?
Hive allows execution of UNIX commands with the use of exclamatory (!) symbol. Just use the ! Symbol before the command to be executed at the hive prompt. To see the present working directory in UNIX from hive run !pwd at the hive prompt.
hive> !pwd
0 comments:
Post a Comment