Hadoop Questions and Answers – HiveQL – 1

This set of MCQs focuses on “HiveQL – 1”.

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

Answer: d
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

Answer: b
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

Answer: a
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.

advertisement
advertisement

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

Answer: a
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

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

Note: Join free Sanfoundry classes at Telegram or Youtube

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

Answer: c
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

Answer: b
Explanation: The hiveconf variables are set as normal by set x=myvalue.

advertisement

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

Answer: a
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

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

advertisement

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

Answer: a
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.

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.