Engineering Questions with Answers - Multiple Choice Questions

Hadoop MCQs

1 - Question

1. Serialization of string columns uses a ________ to form unique column values.
a) Footer
b) STRIPES
c) Dictionary
d) Index

View Answer

Answer: c
Explanation: The dictionary is sorted to speed up predicate filtering and improve compression ratios.




2 - Question

2. Point out the correct statement.
a) The Avro file dump utility analyzes ORC files
b) Streams are compressed using a codec, which is specified as a table property for all streams in that table
c) The ODC file dump utility analyzes ORC files
d) All of the mentioned

View Answer

Answer: b
Explanation: The codec can be Snappy, Zlib, or none.




3 - Question

3. _______ is a lossless data compression library that favors speed over compression ratio.
a) LOZ
b) LZO
c) OLZ
d) All of the mentioned

View Answer

Answer: a
Explanation: lzo and lzop need to be installed on every node in the Hadoop cluster.




4 - Question

4. Which of the following will prefix the query string with parameters?
a) SET hive.exec.compress.output=false
b) SET hive.compress.output=false
c) SET hive.exec.compress.output=true
d) All of the mentioned

View Answer

Answer: a
Explanation: Use lzop command utility or your custom Java to generate .lzo.index for the .lzo files.




5 - Question

5. Point out the wrong statement.
a) TIMESTAMP is Only available starting with Hive 0.10.0
b) DECIMAL introduced in Hive 0.11.0 with a precision of 38 digits
c) Hive 0.13.0 introduced user definable precision and scale
d) All of the mentioned

View Answer

Answer: b
Explanation: TIMESTAMP is available starting with Hive 0.8.0




6 - Question

6. Integral literals are assumed to be _________ by default.
a) SMALL INT
b) INT
c) BIG INT
d) TINY INT

View Answer

Answer: b
Explanation: Integral literals are assumed to be INT by default, unless the number exceeds the range of INT in which case it is interpreted as a BIGINT, or if one of the following postfixes is present on the number.




7 - Question

7. Hive uses _____ style escaping within the strings.
a) C
b) Java
c) Python
d) Scala

View Answer

Answer: a
Explanation: String literals can be expressed with either single quotes (‘) or double quotes (“).




8 - Question

8. Which of the following statement will create a column with varchar datatype?
a) CREATE TABLE foo (bar CHAR(10))
b) CREATE TABLE foo (bar VARCHAR(10))
c) CREATE TABLE foo (bar CHARVARYING(10))
d) All of the mentioned

View Answer

Answer: b
Explanation: Varchar datatype was introduced in Hive 0.12.0




9 - Question

9. _________ will overwrite any existing data in the table or partition.
a) INSERT WRITE
b) INSERT OVERWRITE
c) INSERT INTO
d) None of the mentioned

View Answer

Answer: c
Explanation: INSERT INTO will append to the table or partition, keeping the existing data intact.




10 - Question

10. Hive does not support literals for ______ types.
a) Scalar
b) Complex
c) INT
d) CHAR

View Answer

Answer: b
Explanation: It is not possible to use them in INSERT INTO…VALUES clauses.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners