Hive/Hive Mcq Sample Test,Sample questions

Question:
A view in Hive can be seen by using

1. SHOW TABLES

2.SHOW VIEWS

3.DESCRIBE VIEWS

4.VIEW VIEWS


Question:
By default when a database is dropped in Hive

1. The tables are also deleted

2.The directory is deleted if there are no tables

3.The HDFS blocks are formatted

4. None of the above


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

1. Hive Pipeline

2.Hive Caching

3.Hive Forking

4.Hive Streaming


Question:
Each database created in hive is stored as

1. A file

2.A directory

3.A HDFS block

4. A jar file


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

1.The first table in the join clause

2. Second table in the join clause

3.Third table in the join clause

4. Does not matter


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

1.HiveServer

2.HiveMetaStore

3.HiveWeb

4.Hive Streaming


Question:
Hive uses _________ for logging.

1. logj4

2. log4l

3. log4i

4. log4j


Question:
hive-exec-log4j.properties  

1.Storing data in tables and columns

2.Online transaction processing

3.Handling date time data

4.Partitioning stored data


Question:
HiveServer2 introduced in Hive 0.11 has a new CLI called

1.BeeLine

2.SqlLine

3. HiveLine

4.CLilLine


Question:
How to change the column data type in Hive

1. ALTER and CHANGE

2.ALTER

3. CHANGE

4.None of the above


Question:
If an Index is dropped then

1.The underlying table is also dropped

2. The directory containing the index is deleted

3.The underlying table is not dropped

4.Error is thrown by hive


Question:
If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword

1. RESTRICT

2.OVERWRITE

3. F DROP

4.CASCADE


Question:
If the schema of the table does not match with the data types present in the file containing the table then Hive

1. Automatically drops the file

2. Automatically corrects the data

3. Reports Null values for mismatched data

4.Does not allow any query to run on the table


Question:
In Hive you can copy

1. The schema without the data

2.The data without the schema

3.Both schema and its data

4.Neither the schema nor its data


Question:
In which mode HiveServer2 only accepts valid Thrift calls.

1. Remote

2.HTTP

3.Embedded

4.Interactive


Question:
On dropping a external table

1.The schema gets dropped without dropping the data

2.The data gets dropped without dropping the schema

3.An error is thrown

4. Both the schema and the data is dropped


Question:
On dropping a managed table

1. The schema gets dropped without dropping the data

2.The data gets dropped without dropping the schema

3.An error is thrown

4.Both the schema and the data is dropped


Question:
Point out the correct statement

1. Hive is not a relational database, but a query engine that supports the parts of SQL

2. Hive is a relational database with SQL support

3. Pig is a relational database with SQL support

4.None of the above


Question:
The 2 default TBLPROPERTIES added by hive when a hive table is created is

1.hive_version and last_modified by

2. last_modified_by and last_modified_time

3. last_modified_time and hive_version

4.last_modified_by and table_location


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

1. '01'

2. 'oo2'

3. 'oo3'

4. 'oo4'


Question:
The drawback of managed tables in hive is

1. They are always stored under default directory

2.They cannot grow bigger than a fixed size of 100GB

3. They can never be dropped

4.They cannot be shared with other applications


Question:
The main advantage of creating table partition is

1. Effective storage memory utilization

2. Faster query performance

3. Less RAM required by namenode

4.Simpler query syntax


Question:
The partition of an Indexed table is dropped. then,

1. Corresponding partition from all indexes are dropped.

2. No indexes are dropped

3.Indexes refresh themselves automatically

4. Error is shown asking to first drop the indexes


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

1. hive.exec.mode.local.auto

2. hive.exec.mode.local.override

3.hive.exec.mode.local.settings

4. hive.exec.mode.local.config


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

1. Containing h in their name

2.Starting with h

3.Ending with h

4.Containing 'h.'


Question:
The results of a hive query can be stored as

 Local File
 HDFS file
 Both the above
 

1.Local File

2.HDFS file

3. Both the above

4.Can not be stored


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

1.Standard UDF

2.Aggregate UDF

3.Table Generating UDF

4.None of the above


Question:
The tables created in hive are stored as

1. A file under the database directory

2.A subdirectory under the database directory

3.A .java file present in the database directory

4.A HDFS block containing the database directory


Question:
The thrift service component in hive is used for

1.Moving hive data files between different servers

2.Use multiple hive versions

3.Submit hive queries from a remote client

4. Installing hive


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

1.Describe

2. Describe extended

3.Show

4.Show extended


Question:
Users can pass configuration information to the SerDe using

1. SET SERDEPRPERTIES

2. WITH SERDEPRPERTIES

3. BY SERDEPRPERTIES

4.CONFIG SERDEPRPERTIES


Question:
Using the ALTER DATABASE command in an database you can change the

1. Database name

2.dbproperties

3. Database creation time

4.Directory where the database is stored


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

1. It slows down the namenode

2.Storage space is wasted

3.Join quires become slow

4.All of the above


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

1.1

2.2

3.3

4.None of the above


Question:
When a partition is archived in Hive it

1. Reduces space through compression

2.Reduces the length of records

3. Reduces the number of files stored

4. Reduces the block size


Question:
Which file controls the logging of Mapreduce Tasks?

1. hive-log4j.properties

2.hive-exec-log4j.properties

3.hive-cli-log4j.properties

4. hive-create-log4j.properties


Question:
Which kind of keys(CONSTRAINTS) Hive can have?

1.Primary Keys

2.Foreign Keys

3.Unique Keys

4.None of the above


Question:
Which of the following data type is supported by Hive?

1. map

2.record

3.string

4.enum


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

1. /* joinlast(table_name) */

2. /* joinfirst(table_name) */

3. /* streamtable(table_name) */

4./* cacheable(table_name) */


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

1. Matrix

2.Array

3.Map

4.STRUCT


Question:
Which of the following is the commonly used Hive services

1.Command Line Interface (cli)

2. Hive Web Interface (hwi)

3.HiveServer (hiveserver)

4. All of the above


Question:
Which of the following is the data types in Hive

1.ARRAY

2.STRUCT

3.MAP

4.All of the above


Question:
Which of the following is the join in Hive?

1. Join

2.Full outer join

3.Right outer join

4.All of the above


Question:
Which of the following is the Key components of Hive Architecture

1. User Interface

2.Metastore

3.Driver

4.All of the above


Question:
Which of the following is used to analyse data stored in Hadoop cluster using SQL like query

1. Mahoot

2.Hive

3.Pig

4.All of the above


Question:
Which of the following query displays the name of the database, the root location on the file system and comments if any.

1.Describe extended

2.Show

3.Describe

4.Show extended


More MCQS

  1. Hive Mcq
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!