Olete.in
Articles
Mock Tests
🧪 Hive MCQ Quiz Hub
Hive Mcq
Choose a topic to test your knowledge and improve your Hive skills
1. The results of a hive query can be stored as Local File HDFS file Both the above
Local File
HDFS file
Both the above
Can not be stored
2. If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword
RESTRICT
OVERWRITE
F DROP
CASCADE
3. Users can pass configuration information to the SerDe using
SET SERDEPRPERTIES
WITH SERDEPRPERTIES
BY SERDEPRPERTIES
CONFIG SERDEPRPERTIES
4. The property set to run hive in local mode as true so that it runs without creating a mapreduce job is
hive.exec.mode.local.auto
hive.exec.mode.local.override
hive.exec.mode.local.settings
hive.exec.mode.local.config
5. Which kind of keys(CONSTRAINTS) Hive can have?
Primary Keys
Foreign Keys
Unique Keys
None of the above
6. What is the disadvantage of using too many partitions in Hive tables?
It slows down the namenode
Storage space is wasted
Join quires become slow
All of the above
7. The default delimiter in hive to separate the element in STRUCT is
' 01'
'oo2'
'oo3'
'oo4'
8. By default when a database is dropped in Hive
The tables are also deleted
The directory is deleted if there are no tables
The HDFS blocks are formatted
None of the above
9. The main advantage of creating table partition is
Effective storage memory utilization
Faster query performance
Less RAM required by namenode
Simpler query syntax
10. If the schema of the table does not match with the data types present in the file containing the table then Hive
Automatically drops the file
Automatically corrects the data
Reports Null values for mismatched data
Does not allow any query to run on the table
11. A view in Hive can be seen by using
SHOW TABLES
SHOW VIEWS
DESCRIBE VIEWS
VIEW VIEWS
12. If an Index is dropped then
The underlying table is also dropped
The directory containing the index is deleted
The underlying table is not dropped
Error is thrown by hive
13. Which file controls the logging of Mapreduce Tasks?
hive-log4j.properties
hive-exec-log4j.properties
hive-cli-log4j.properties
hive-create-log4j.properties
14. hive-exec-log4j.properties
Storing data in tables and columns
Online transaction processing
Handling date time data
Partitioning stored data
15. To see the partitions keys present in a Hive table the command used is
Describe
Describe extended
Show
Show extended
16. For optimizing join of three tables, the largest sized tables should be placed as
The first table in the join clause
Second table in the join clause
Third table in the join clause
Does not matter
17. Which of the following hint is used to optimize the join queries
/* joinlast(table_name) */
/* joinfirst(table_name) */
/* streamtable(table_name) */
/* cacheable(table_name) */
18. Calling a unix bash script inside a Hive Query is an example of
Hive Pipeline
Hive Caching
Hive Forking
Hive Streaming
19. Hive uses _________ for logging.
logj4
log4l
log4i
log4j
20. HiveServer2 introduced in Hive 0.11 has a new CLI called
BeeLine
SqlLine
HiveLine
CLilLine
21. In which mode HiveServer2 only accepts valid Thrift calls.
Remote
HTTP
Embedded
Interactive
22. Which of the following data type is supported by Hive?
map
record
string
enum
23. Which of the following is not a complex data type in Hive?
Matrix
Array
Map
STRUCT
24. Each database created in hive is stored as
A file
A directory
A HDFS block
A jar file
25. When a partition is archived in Hive it
Reduces space through compression
Reduces the length of records
Reduces the number of files stored
Reduces the block size
26. When a Hive query joins 3 tables, How many mapreduce jobs will be started?
1
2
3
None of the above
27. The reverse() function reverses a string passed to it in a Hive query. This is an example of
Standard UDF
Aggregate UDF
Table Generating UDF
None of the above
28. Hive can be accessed remotely by using programs written in C++, Ruby etc, over a single port. This is achieved by using
HiveServer
HiveMetaStore
HiveWeb
Hive Streaming
29. The thrift service component in hive is used for
Moving hive data files between different servers
Use multiple hive versions
Submit hive queries from a remote client
Installing hive
30. The query “SHOW DATABASE LIKE ‘h.*’ ; gives the output with database name
Containing h in their name
Starting with h
Ending with h
Containing 'h.'
31. The tables created in hive are stored as
A file under the database directory
A subdirectory under the database directory
A .java file present in the database directory
A HDFS block containing the database directory
32. Using the ALTER DATABASE command in an database you can change the
Database name
dbproperties
Database creation time
Directory where the database is stored
33. In Hive you can copy
The schema without the data
The data without the schema
Both schema and its data
Neither the schema nor its data
34. The drawback of managed tables in hive is
They are always stored under default directory
They cannot grow bigger than a fixed size of 100GB
They can never be dropped
They cannot be shared with other applications
35. On dropping a managed table
The schema gets dropped without dropping the data
The data gets dropped without dropping the schema
An error is thrown
Both the schema and the data is dropped
36. On dropping a external table
The schema gets dropped without dropping the data
The data gets dropped without dropping the schema
An error is thrown
Both the schema and the data is dropped
37. The 2 default TBLPROPERTIES added by hive when a hive table is created is
hive_version and last_modified by
last_modified_by and last_modified_time
last_modified_time and hive_version
last_modified_by and table_location
38. The partition of an Indexed table is dropped. then,
Corresponding partition from all indexes are dropped.
No indexes are dropped
Indexes refresh themselves automatically
Error is shown asking to first drop the indexes
39. Which of the following query displays the name of the database, the root location on the file system and comments if any.
Describe extended
Show
Describe
Show extended
40. Which of the following is the join in Hive?
Join
Full outer join
Right outer join
All of the above
41. How to change the column data type in Hive
ALTER and CHANGE
ALTER
CHANGE
None of the above
42. Which of the following is the data types in Hive
ARRAY
STRUCT
MAP
All of the above
43. Which of the following is the Key components of Hive Architecture
User Interface
Metastore
Driver
All of the above
44. Which of the following is the commonly used Hive services
Command Line Interface (cli)
Hive Web Interface (hwi)
HiveServer (hiveserver)
All of the above
45. Point out the correct statement
Hive is not a relational database, but a query engine that supports the parts of SQL
Hive is a relational database with SQL support
Pig is a relational database with SQL support
None of the above
46. Which of the following is used to analyse data stored in Hadoop cluster using SQL like query
Mahoot
Hive
Pig
All of the above
Submit