This set of Hadoop Multiple Choice Questions & Answers (MCQs) 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
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
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
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
Explanation: Set the transaction isolation level to TRANSACTION_READ_COMMITTED or TRANSACTION_SERIALIZABLE.
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
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
Explanation: AvroSerde understands compressed Avro files.
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
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
Explanation: The AvroSerde uses Avro 1.7.5.
9. Which of the following data type is supported by Hive?
a) map
b) record
c) string
d) enum
View Answer
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
Explanation: Bytes are converted to Array[smallint] prior to Hive 0.12.0.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Check Hadoop Books
- Apply for Computer Science Internship
- Practice Programming MCQs
- Check Programming Books