This set of MCQs focuses on “HiveQL – 1”.
1. Hive uses _________ for logging.
a) logj4
b) log4l
c) log4i
d) log4j
View Answer
Explanation: 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] <filepath>* executes a Hive query and prints results to standard output
b) <query string> executes a Hive query and prints results to standard output
c) <query> executes a Hive query and prints results to standard output
d) All of the mentioned
View Answer
Explanation: list FILE[S] <filepath>* 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: In HTTP mode, the message body contains Thrift payloads.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Apply for Computer Science Internship
- Check Programming Books
- Check Hadoop Books
- Practice Programming MCQs