Thursday 13 November 2014

Top 30 Hive Interview Questions

1.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

2.How we can enter into Hive shell from normal terminal ?

just by entering the hive command like ‘bin/hive’

3.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.



4.What is the default database of Hive ?

Derby database

5.Which Databases are supported for Hive ?

Derby database is default one,mysql,postgresql database

6.What is the meaning of Hiveql ?

Hiveql meaing is Hive + SQL is called Hiveql,the hiveql commands ae almost same as SQL commands.

7.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.

8.How many types we can create tables in hive ?

Two types

9.What are that two types of tables ?

i) Managed tables

ii) External tables

10.Where Hive stores Metadata ?

Hive stores metadata in relational databases and not in HDFS.



11.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.

12.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

13.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.

14.Which type  tables is always preferred making tables in hive ?

External Table,because external table data stored in HDFS

15.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.

16.Example for SET command ?

hive > SET hive.enforce.bucketing;

hive.enforce.bucketing=true

The above command shows value of that property.

Property setting files in HIVE ?

i) The Hive SET command

ii) The command line -hiveconf option

iii) hive-site.xml

iv) hive-default.xml

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)

17.What is the command for Hive Services ?

hive –service help to get a list of available service names

18.What are the Hive services ?

i)cli

ii) hiveserver

iii) hwi

iv) jar

v)metastore

vi)hive client

vii)Thrift client

viii)JDBC Driver

ix)ODBC Driver

19.What is CLI service ?

The command Line Interface to Hive (Shell).This is the default service

20.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.

21.What is hwi service in hive ?

The Hive Web Interface

22.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.

23.What is meta store service in hive ?

It is possible to run the meta store as a standalone(remote) process.

24.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.

25.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

26.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

27.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)

28.Table metadata in Hive is:
Metastore

29.Is hive support direct update and delete?
NO

30.Hive is DataBase?
No it is Query engine used for OLAP (DataWarehoue) an abstraction of MapReduce

6 comments:

  1. sony@sony:~/spark$ sbt/sbt package
    NOTE: The sbt/sbt script has been relocated to build/sbt.
    Please update references to point to the new location.

    Invoking 'build/sbt package' now ...

    Using /home/sony/jdk as default JAVA_HOME.
    Note, this will be overridden by -java-home if it is set.
    Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
    Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x000000077ff80000, 1431830528, 0) failed; error='Cannot allocate memory' (errno=12)
    #
    # There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (malloc) failed to allocate 1431830528 bytes for committing reserved memory.
    # An error report file with more information is saved as:
    # /home/sony/spark/hs_err_pid5790.log

    ReplyDelete
  2. Nice information about Big Data.
    The best place to learn Big Data is steinmetzils
    100% Job assurence is provided by them.
    visit: http://www.steinmetzils.com/

    ReplyDelete
  3. The term often refers simply to the use of predictive analytics, user behaviour analytics, or certain other advanced data analytics methods that extract value from data, and seldom to a particular size of data set. Thanks a lot admin to sharing with us. Also Learn BigData from the best BigData Online Training in your locality at CatchExperts.com

    ReplyDelete
  4. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

    big data training in chennai

    ReplyDelete