Hive Online Quiz



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 - The query "SHOW DATABASE LIKE 'h.*' ; gives the output with database name

A - containing h in their name

B - starting with h

C - ending with h

D - containing 'h.'

Answer : B

Explanation

Hive support regular expressions which are derived from regex capabilities of Java language.

Answer : A

Explanation

Copying data is done by OS commands and not Hive

Answer : B

Explanation

Partitioning creates subdirectories and only those subdirectories are read to fetch the query result, improving the performance.

Answer : A

Explanation

using the ALTER TABLE.. ENABLE NO_DROP & ENABLE OFFLINE clause.

Q 5 - When a Hive query joins 3 tables, How many mapreduce jobs will be started?

A - 1

B - 2

C - 3

D - 0

Answer : B

Explanation

Hive cerates one mapreduce job for the first pair of tables and second pair of tables with one table common between both the pairs.

Q 6 - The Index in Hive can be seen by

A - Describe Index

B - Show Index

C - View Index

D - Find Index

Answer : B

Explanation

Similar to show tables, Indexes can be queried by SHOW Index.

Answer : A

Explanation

As external table data is managed by other applications hive does not create index on them.

Q 8 - If a hive query produces unexpected result then its cause can be investigated by using

A - Block size in HDFS

B - Virtual columns

C - Virtual parameters

D - Query logs

Answer : B

Explanation

Virtual columns give the complete path and name of data block from where the error is arising.

Q 9 - Which of the below is not a type compression option for Sequence file

A - RECORD

B - BLOCK

C - COLUMN

D - NONE

Answer : C

Explanation

There is no COLUMN compression type for a sequence file

Q 10 - Hive can be accessed remotely by using programs written in C++, Ruby etc, over a single port. This is achieved by using

A - HiveServer

B - HiveMetaStore

C - HiveWeb

D - Hive Streaming

Answer : A

Explanation

HiveServer or Hive Thrift service is used to access Hive remotely.

hive_questions_answers.htm
Advertisements