This section presents you various set of Mock Tests related to Hive. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following scenarios are not prevented by enabling strict mode in Hive?
The other three scenarios create long running job. So STRICT mode is applied to them.
Q 2 - If a hive query produces unexpected result then its cause can be investigated by using
Virtual columns give the complete path and name of data block from where the error is arising.
Q 3 - Intermediate compression in Hive is about
Data compression between map and reduce task is called intermediate compression.
Q 4 - Hive.exec.compress.output controls
This property controls the compression of the output generated by a query.
Q 5 - The disadvantage of compressing files in HDFS is
When files are not splitable , querying them becomes inefficient.
Q 6 - Which of the below is not a type compression option for Sequence file
There is no COLUMN compression type for a sequence file
Q 7 - Which file controls the logging of commands put in CLI?
This property controls the logging in command line Interface.
Q 8 - Which file controls the logging of Mapreduce Tasks?
This property controls the logging in Mapreduce tasks
Q 9 - The command to list the functions currently loaded in a Hive Session is
SHOW FUNCTIONS produces list of all the functions currently available in hive session
Q 10 - A standard user-defined function (UDF) refers to any function that
Examples functions are – concat, reverse etc.
Q 11 - Aggregate functions in Hive are the function which
Examples functions are − count, avarege etc.
Q 12 - A Table Generating Function is a Function that
Examples functions is Explode()
Q 13 - A GenericUDF is a Function that
These functions are created as java programs.
Q 14 - The explode() function in hive takes an array of input and iterates through it returning each element as a separate row. This is an example of
SELECT explode(array(1,2,3)) AS element FROM src;
gives 1 2 3 so it is table generating function
Q 15 - The reverse() function reverses a string passed to it in a Hive query. This is an example of
reverse(‘abcd’) gives ‘dcba’. So it is a standard UDF.
Q 16 - A user creates a UDF which accepts arguments of different data types, each time it is run. It is an example of
Generic functions are created as java programs and can accept variable data types.
Q 17 - To add a new user defined Function permanently to Hive, we need to
Functionregistry holds the list of all permanent functions
Q 18 - The UDF can access files inside
All the listed filesystem can be accessed using UDF
Q 19 - The MACRO created in Hive has the ability to
Macros are created for the purpose of calling other functiuons
Q 20 - Calling a unix bash script inside a Hive Query is an example of
In this type of streaming the code resides in the script being called and Hive is not aware of the code.
Q 21 - Hive can be accessed remotely by using programs written in C++, Ruby etc, over a single port. This is achieved by using
HiveServer or Hive Thrift service is used to access Hive remotely.
Q 22 - Which of the following File Formats are supported by Hive?
Hive supports all these three file formats as they are also supported by Hadoop in general
Q 23 - When one of the join tables is small enough to fit into memory, The type of join used by Hive is
As one of the tables already fits into the memory each row of the big table is quickly compared with each row of small table using Map Join.
Q 24 - The Hive metadata can be easily created and edited using
Hcatalog stores metadata information for many Hadoop tools like Hive and Mapreduce. It can be accessed through a web interface.
Q 25 - Hive supports row-level Inser/update and Delete using the ACID features only on which file format?
Except the ORC file all other files types do not support insert or update.
|Question Number||Answer Key|