wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Apache Hive

Total questions: 32

Worksheet time: 16mins

Name
Class
Date
1.

The results of a hive query can be stored as

a)

Local File

b)

HDFS file

c)

Both the above

d)

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

a)

RESTRICT

b)

OVERWRITE

c)

F DROP

d)

CASCADE

3.

Users can pass configuration information to the SerDe using

a)

SET SERDEPRPERTIES

b)

WITH SERDEPRPERTIES

c)

BY SERDEPRPERTIES

d)

CONFIG SERDEPRPERTIES

4.

The property set to run hive in local mode as true so that it runs without creating a mapreduce job is

a)

hive.exec.mode.local.auto

b)

hive.exec.mode.local.override

c)

hive.exec.mode.local.settings

d)

hive.exec.mode.local.config

5.

Which kind of keys(CONSTRAINTS) Hive can have?

a)

Primary Keys

b)

Foreign Keys

c)

Unique Keys

d)

None of the above

6.

What is the disadvantage of using too many partitions in Hive tables?

a)

It slows down the namenode

b)

Storage space is wasted

c)

Join quires become slow

d)

All of the above

7.

The default delimiter in hive to separate the element in STRUCT is

a)

'\001'

b)

'\oo2'

c)

'\oo3'

d)

'\oo4'

8.

By default when a database is dropped in Hive

a)

The tables are also deleted

b)

The directory is deleted if there are no tables

c)

The HDFS blocks are formatted

d)

None of the above

9.

The main advantage of creating table partition is

a)

Effective storage memory utilization

b)

Faster query performance

c)

Less RAM required by namenode

d)

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

a)

Automatically drops the file

b)

Automatically corrects the data

c)

Reports Null values for mismatched data

d)

Does not allow any query to run on the table

11.

A view in Hive can be seen by using

a)

SHOW TABLES

b)

SHOW VIEWS

c)

DESCRIBE VIEWS

d)

VIEW VIEWS

12.

If an Index is dropped then

a)

The underlying table is also dropped

b)

The directory containing the index is deleted

c)

The underlying table is not dropped

d)

Error is thrown by hive

13.

Which file controls the logging of Mapreduce Tasks?

a)

hive-log4j.properties

b)

hive-exec-log4j.properties

c)

hive-cli-log4j.properties

d)

hive-create-log4j.properties

14.

What Hive can not offer

a)

Storing data in tables and columns

b)

Online transaction processing

c)

Handling date time data

d)

Partitioning stored data

15.

To see the partitions keys present in a Hive table the command used is

a)

Describe

b)

Describe extended

c)

Show

d)

Show extended

16.

For optimizing join of three tables, the largest sized tables should be placed as

a)

The first table in the join clause

b)

Second table in the join clause

c)

Third table in the join clause

d)

Does not matter

17.

Which of the following hint is used to optimize the join queries

a)

/* joinlast(table_name) */

b)

/* joinfirst(table_name) */

c)

/* streamtable(table_name) */

d)

/* cacheable(table_name) */

18.

Calling a unix bash script inside a Hive Query is an example of

a)

Hive Pipeline

b)

Hive Caching

c)

Hive Forking

d)

Hive Streaming

19.

Calling a unix bash script inside a Hive Query is an example of

a)

Hive Pipeline

b)

Hive Caching

c)

Hive Forking

d)

Hive Streaming

20.

Hive uses _________ for logging.

a)

logj4

b)

log4l

c)

log4i

d)

log4j

21.

HiveServer2 introduced in Hive 0.11 has a new CLI called

a)

BeeLine

b)

SqlLine

c)

HiveLine

d)

CLilLine

22.

In which mode HiveServer2 only accepts valid Thrift calls.

a)

Remote

b)

HTTP

c)

Embedded

d)

Interactive

23.

Which of the following data type is supported by Hive?

a)

map

b)

record

c)

string

d)

enum

24.

Which of the following is not a complex data type in Hive?

a)

Matrix

b)

Array

c)

Map

d)

STRUCT

25.

Each database created in hive is stored as

a)

A file

b)

A directory

c)

A HDFS block

d)

A jar file

26.

When a partition is archived in Hive it

a)

Reduces space through compression

b)

Reduces the length of records

c)

Reduces the number of files stored

d)

Reduces the block size

27.

When a Hive query joins 3 tables, How many mapreduce jobs will be started?

a)

0

b)

1

c)

2

d)

3

28.

The reverse() function reverses a string passed to it in a Hive query. This is an example of

a)

Standard UDF

b)

Aggregate UDF

c)

Table Generating UDF

d)

None of the above

29.

Hive can be accessed remotely by using programs written in C++, Ruby etc, over a single port. This is achieved by using

a)

HiveServer

b)

HiveMetaStore

c)

HiveWeb

d)

Hive Streaming

30.

The thrift service component in hive is used for

a)

Moving hive data files between different servers

b)

Use multiple hive versions

c)

Submit hive queries from a remote client

d)

Installing hive

31.

The query “SHOW DATABASE LIKE ‘h.*’ ; gives the output with database name

a)

Containing h in their name

b)

Starting with h

c)

Ending with h

d)

Containing 'h.'

32.

The tables created in hive are stored as

a)

A file under the database directory

b)

A subdirectory under the database directory

c)

A .java file present in the database directory

d)

A HDFS block containing the database directory