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

Answer : A

Explanation

As indexes are defined on a table, the removal of table partition also removes the respective index.

Answer : D

Explanation

As they are managed by Hive metadata, other applications cannot access it.

Answer : B

Explanation

It is a program to read and write files using Java Input and Output formats.

Q 4 - If we change the partition location of a hive table using ALTER TABLE option then the data for that partition in the table

A - also moves automatically to the new location

B - has to be dropped and recreated

C - has to  be backed up into a second table and restored

D - has to be moved manually into new location

Answer : D

Explanation

Data is independent of schema in Hive.

Answer : C

Explanation

CONCAT function accepts any number of arguments

Q 6 - Which kind of keys(CONSTRAINTS)  Hive can have?

A - Primary Keys

B - Foreign Keys

C - Unique Keys

D - None

Answer : D

Explanation

Hive is schema on read and unlike RDBMS it does not have a way to enforce the existence of keys.

Answer : D

Explanation

It is about creating index on an empty table.

Answer : D

Explanation

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

Q 9 - The reverse() function reverses a string passed to it in a Hive query. This is an example of

A - Standard UDF

B - Aggregate UDF

C - Table Generating UDF

D - None

Answer : A

Explanation

reverse(‘abcd’) gives ‘dcba’. So it is a standard UDF.

Q 10 - Which of the following File Formats are supported by Hive?

A - Text Files

B - Sequnce FIles

C - RC Files

D - All of the above

Answer : D

Explanation

Hive supports all these three file formats as they are also supported by Hadoop in general

hive_questions_answers.htm
Advertisements