Hive Interview Questions
What is Hive Shell ?
The shell is the primary way that we will interact with hive by using hiveql commands.In other words shell is nothing but a prompt which is used to enter the Hiveql commands for interacting the Hive shell
How we can enter into Hive shell from normal terminal ?
Hive Interview Questions
just by entering the hive command like ‘hive’
How we can check the hive shell is working or not ?
After entered into hive shell just enter another Hiveql command like ‘show databases;’
Is it necessary to add semi colon (;) at end of the Hiveql commands ?
Yes,We have to add semicolon (;) at end of the Hiveql every command
What is the default database of Hive ?
Which Databases are supported for Hive ?
Derby database is default one,mysql,postgresql database
What is the meaning of Hiveql ?
Hiveql meaing is Hive + SQL is called Hiveql,the hiveql commands ae almost same as SQL commands.
What is Hive Table ?
A Hive table is logically made up of the data being stored and the associated metadata describing the layout of the data int the table.The data typically associated resides in HDFS,although it may reside in any hadoop file system,including the local file system or s3.Hive stores the metadata in a relational databases and not in HDFS.
How many types we can create tables in hive ?
What are that two types of tables ?
i) Managed tables
ii) External tables
Where Hive stores Metadata ?
Hive stores metadata in relational databases and not in HDFS.
What is Managed Table in Hive ?
Managed system is nothing but when you create the table in hive,by default hive will manage the data,which means that hive moves the data into its warehouse directory.
What is External Table in Hive ?
External table is nothing but when you create the table in hive,the data stored at an existing location outside the warehouse directory
What is the main differences between an external and a managed table in Hive ?
One of the main differences between an external and a managed table in Hive is that when an external table is dropped, the data associated with it doesn’t get deleted, only the metadata (number of columns, type of columns, terminators,etc.) gets dropped from the Hive meta store. When a managed table gets dropped, both the metadata and data get dropped.
Which type tables is always preferred making tables in hive ?
External Table,because external table data stored in HDFS
What is the use of SET command in Hive ?
SET command is useful for changing Hive or Map Reduce job settings for a particular query.
Example for SET command ?
hive > SET hive.enforce.bucketing;
The above command shows value of that property.
Property setting files in HIVE ?
i) The Hive SET command
ii) The command line -hiveconf option
v) hadoop-site.xml (or,equivalently , core-site.xml,hdfs-site.xml, and mapred-site.xml)
vi) hadoop-default.xml (or,equivalently, core-default.xml,hdfs-default.xml and mapred-default.xml)
What is the command for Hive Services ?
hive –service help to get a list of available service names
what are the Hive services ?
What is CLI service ?
The command Line Interface to Hive (Shell).This is the default service
What is HiveServer ?
Runs hive as a server exposing a thrift service,enabling access from a range of clients written in different languages.Applications using the thrift,JDBC,ODBC connectors need to run hive server to communicate with Hive.
What is hwi service in hive ?
The Hive Web Interface
what is Jar service in hive ?
The hive jar is equivalent to hadoop jar,a convenient way to run java applications that includes both Hadoop and Hive classes on the class path.
what is meta store service in hive ?
It is possible to run the meta store as a standalone(remote) process.
what is hive clients ?
If you run Hive as a server (hive –server hiveserver),then there are a number of different mechanisms for connecting to it from applications.The relationship between hive client and Hive services.
what is Thrift client ?
The main aim of Hive thrift client is easy to run hive hive commands from other programming languages.Thrift client supported languages are c++,java,php,python, and ruby.They can be found in the src/service/src sub directory in the hive distribution
What is JDBC Driver service ?
Hive provides type 4 pure java server.the defined in class org.apache.hadoop.hive.jdbc.HiveDriver.When it configured with JDBC URI of the form of jdbc:hive://host:port/dbname
What is ODBC Driver service ?
That supports ODBC protocol to connect to hive.(Like the JDBC Driver,the ODBC driver Thrift to communicate with the hive server)