Hive Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to Hive. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Each database created in hive is stored as

A - a directory

B - a file

C - a hdfs block

D - a jar file

Answer : A

Explanation

Each database becomes a directory and each table becomes a file in that directory

Q 2 - If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword

A - RESTRICT

B - OVERWRITE

C - F DROP

D - CASCADE

Answer : D

Explanation

CASCADE clause drops the table first before dropping the database

Q 4 - While querying a hive table for a Array type column, if the array index is nonexistent then

A - NULL is returned

B - Error is reported.

C - Partial results are returned

D - "NA" is returned

Answer : A

Explanation

Hive returns NULL while in java it would have returned index out of bound error

Q 5 - The property set to run hive in local mode as true so that it runs without creating a mapreduce job is

A - hive.exec.mode.local.auto

B - hive.exec.mode.local.override

C - hive.exec.mode.local.settings

D - hive.exec.mode.local.config

Answer : A

Explanation

In local mode hive will not trigger a mapreduce job.

Answer : A

Explanation

Sorting as the last clause will be efficient as that is also the last step in the reduce job producing the output.

Q 7 - What is the disadvantage of using too many partitions in Hive tables?

A - It slows down the namenode

B - Storage space is wasted

C - Join quires become slow

D - All of these

Answer : D

Explanation

Too many partitions create too many files and too much metadata to be stored by namenode.

Answer : D

Explanation

Data compression between map and reduce task is called intermediate compression.

Q 10 - A user creates a UDF which accepts arguments of different data types, each time it is run. It is an example of

A - Aggregate Function

B - Generic Function

C - Standard UDF

D - Super Functions

Answer : B

Explanation

Generic functions are created as java programs and can accept variable data types.


hive_questions_answers.htm

Advertisements