Hadoop Questions and Answers – HiveQL – 2

This set of Hadoop Multiple Choice Questions & Answers (MCQs) for quizzes focuses on “HiveQL – 2”.

1. Hive specific commands can be run from Beeline, when the Hive _______ driver is used.
a) ODBC
b) JDBC
c) ODBC-JDBC
d) All of the Mentioned
View Answer

Answer: b
Explanation: Hive specific commands are same as Hive CLI commands.

2. Point out the correct statement.
a) –helpusage display a usage message
b) The JDBC connection URL format has the prefix jdbc:hive:
c) Starting with Hive 0.14, there are improved SV output formats
d) None of the mentioned
View Answer

Answer: c
Explanation: Output formats available are namely DSV, CSV2 and TSV2.

3. _________ reduce the amount of informational messages displayed (true) or not (false).
a) –silent=[true/false]
b) –autosave=[true/false]
c) –force=[true/false]
d) All of the mentioned
View Answer

Answer: a
Explanation: It also stops displaying the log messages for the query from HiveServer2.

4. Which of the following is used to set transaction isolation level?
a) –incremental=[true/false]
b) –isolation=LEVEL
c) –force=[true/false]
d) –truncateTable=[true/false]
View Answer

Answer: b
Explanation: Set the transaction isolation level to TRANSACTION_READ_COMMITTED or TRANSACTION_SERIALIZABLE.

advertisement
advertisement

5. Point out the wrong statement.
a) HiveServer2 has a new JDBC driver
b) CSV and TSV output formats are maintained for forward compatibility
c) HiveServer2 supports both embedded and remote access to HiveServer2
d) None of the mentioned
View Answer

Answer: b
Explanation: CSV and TSV output formats are maintained for backward compatibility.

6. The ________ allows users to read or write Avro data as Hive tables.
a) AvroSerde
b) HiveSerde
c) SqlSerde
d) None of the mentioned
View Answer

Answer: a
Explanation: AvroSerde understands compressed Avro files.

Note: Join free Sanfoundry classes at Telegram or Youtube

7. Starting in Hive _______ the Avro schema can be inferred from the Hive table schema.
a) 0.14
b) 0.12
c) 0.13
d) 0.11
View Answer

Answer: a
Explanation: Starting in Hive 0.14, columns can be added to an Avro backed Hive table using the Alter Table statement.

8. The AvroSerde has been built and tested against Hive 0.9.1 and later, and uses Avro _______ as of Hive 0.13 and 0.14.
a) 1.7.4
b) 1.7.2
c) 1.7.3
d) None of the mentioned
View Answer

Answer: d
Explanation: The AvroSerde uses Avro 1.7.5.

advertisement

9. Which of the following data type is supported by Hive?
a) map
b) record
c) string
d) enum
View Answer

Answer: d
Explanation: Hive has no concept of enums.

10. Which of the following data type is converted to Array prior to Hive 0.12.0?
a) map
b) long
c) float
d) bytes
View Answer

Answer: d
Explanation: Bytes are converted to Array[smallint] prior to Hive 0.12.0.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

To practice all areas of Hadoop for quizzes, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.