250+ TOP MCQs on HiveQL – 1 and Answers

MCQs on “HiveQL – 1”.

1. Hive uses _________ for logging.
a) logj4
b) log4l
c) log4i
d) log4j

Answer: d
Clarification: By default Hive will use hive-log4j.default in the conf/ directory of the Hive installation.

2. Point out the correct statement.
a) list FILE[S] * executes a Hive query and prints results to standard output
b) executes a Hive query and prints results to standard output
c) executes a Hive query and prints results to standard output
d) All of the mentioned

Answer: b
Clarification: list FILE[S] * checks whether the given resources are already added to the distributed cache or not. See Hive Resources below for more information.

3. What does the hive.rrot.logger specified in the following statement?

 $HIVE_HOME/bin/hive --hiveconf hive.root.logger=INFO,console

a) Log level
b) Log modes
c) Log source
d) All of the mentioned

Answer: a
Clarification: hive.root.logger specified the logging level as well as the log destination. Specifying console as the target sends the logs to the standard error.

4. HiveServer2 introduced in Hive 0.11 has a new CLI called __________
a) BeeLine
b) SqlLine
c) HiveLine
d) CLilLine

Answer: a
Clarification: Beeline is a JDBC client based on SQLLine.

5. Point out the wrong statement.
a) There are four namespaces for variables in Hive
b) Custom variables can be created in a separate namespace with the define
c) Custom variables can also be created in a separate namespace with hivevar
d) None of the mentioned

Answer: a
Clarification: Three namespaces for variables are hiveconf, system, and env.

6. HCatalog is installed with Hive, starting with Hive release is ___________
a) 0.10.0
b) 0.9.0
c) 0.11.0
d) 0.12.0

  250+ TOP MCQs on Hadoop Configuration and Answers

Answer: c
Clarification: hcat commands can be issued as hive commands, and vice versa.

7. hiveconf variables are set as normal by using the following statement?
a) set -v x=myvalue
b) set x=myvalue
c) reset x=myvalue
d) none of the mentioned

Answer: d
Clarification: The hiveconf variables are set as normal by set x=myvalue.

8. Variable Substitution is disabled by using ___________
a) set hive.variable.substitute=false;
b) set hive.variable.substitutevalues=false;
c) set hive.variable.substitute=true;
d) all of the mentioned

Answer: a
Clarification: Variable substitution is on by default (hive.variable.substitute=true).

9. _______ supports a new command shell Beeline that works with HiveServer2.
a) HiveServer2
b) HiveServer3
c) HiveServer4
d) None of the mentioned

Answer: a
Clarification: The Beeline shell works in both embedded mode as well as remote mode.

10. In ______ mode HiveServer2 only accepts valid Thrift calls.
a) Remote
b) HTTP
c) Embedded
d) Interactive

Answer: a
Clarification: In HTTP mode, the message body contains Thrift payloads.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top