NEW
Font size
WorksheetsApache Hive
Total questions: 32
Worksheet time: 16mins
The results of a hive query can be stored as
Local File
HDFS file
Both the above
Can not be stored
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
Users can pass configuration information to the SerDe using
SET SERDEPRPERTIES
WITH SERDEPRPERTIES
BY SERDEPRPERTIES
CONFIG SERDEPRPERTIES
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
Which kind of keys(CONSTRAINTS) Hive can have?
Primary Keys
Foreign Keys
Unique Keys
None of the above
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
The default delimiter in hive to separate the element in STRUCT is
'\001'
'\oo2'
'\oo3'
'\oo4'
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
The main advantage of creating table partition is
Effective storage memory utilization
Faster query performance
Less RAM required by namenode
Simpler query syntax
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
A view in Hive can be seen by using
SHOW TABLES
SHOW VIEWS
DESCRIBE VIEWS
VIEW VIEWS
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
Which file controls the logging of Mapreduce Tasks?
hive-log4j.properties
hive-exec-log4j.properties
hive-cli-log4j.properties
hive-create-log4j.properties
What Hive can not offer
Storing data in tables and columns
Online transaction processing
Handling date time data
Partitioning stored data
To see the partitions keys present in a Hive table the command used is
Describe
Describe extended
Show
Show extended
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
Which of the following hint is used to optimize the join queries
/* joinlast(table_name) */
/* joinfirst(table_name) */
/* streamtable(table_name) */
/* cacheable(table_name) */
Calling a unix bash script inside a Hive Query is an example of
Hive Pipeline
Hive Caching
Hive Forking
Hive Streaming
Calling a unix bash script inside a Hive Query is an example of
Hive Pipeline
Hive Caching
Hive Forking
Hive Streaming
Hive uses _________ for logging.
logj4
log4l
log4i
log4j
HiveServer2 introduced in Hive 0.11 has a new CLI called
BeeLine
SqlLine
HiveLine
CLilLine
In which mode HiveServer2 only accepts valid Thrift calls.
Remote
HTTP
Embedded
Interactive
Which of the following data type is supported by Hive?
map
record
string
enum
Which of the following is not a complex data type in Hive?
Matrix
Array
Map
STRUCT
Each database created in hive is stored as
A file
A directory
A HDFS block
A jar file
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
When a Hive query joins 3 tables, How many mapreduce jobs will be started?
0
1
2
3
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
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
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
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.'
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
