Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Interview MCQ Set 1

1. _______ can change the maximum number of cells of a column family.
a) set
b) reset
c) alter
d) select

View Answer

Answer: c [Reason:] Alter is the command used to make changes to an existing table.

2. Point out the correct statement :
a) You can add a column family to a table using the method addColumn()
b) Using alter, you can also create a column family
c) Using disable-all, you can truncate a column family
d) None of the mentioned

View Answer

Answer: a [Reason:] Columns can also be added through HbaseAdmin.

3. Which of the following is not a table scope operator ?
a) MEMSTORE_FLUSH
b) MEMSTORE_FLUSHSIZE
c) MAX_FILESIZE
d) All of the mentioned

View Answer

Answer: a [Reason:] Using alter, you can set and remove table scope operators such as MAX_FILESIZE, READONLY, MEMSTORE_FLUSHSIZE, DEFERRED_LOG_FLUSH, etc.

4. You can delete a column family from a table using the method _________ of HBAseAdmin class.
a) delColumn()
b) removeColumn()
c) deleteColumn()
d) all of the mentioned

View Answer

Answer: c [Reason:] Alter command also can be used to delete a column family.

5. Point out the wrong statement :
a) To read data from an HBase table, use the get() method of the HTable class
b) You can retrieve data from the HBase table using the get() method of the HTable class
c) While retrieving data, you can get a single row by id, or get a set of rows by a set of row ids, or scan an entire table or a subset of rows
d) None of the mentioned

View Answer

Answer: d [Reason:] You can retrieve an HBase table data using the add method variants in Get class.

6. __________ class adds HBase configuration files to its object.
a) Configuration
b) Collector
c) Component
d) None of the mentioned

View Answer

Answer: a [Reason:] You can create a configuration object using the create() method of the HbaseConfiguration class.

7. The ________ class provides the getValue() method to read the values from its instance.
a) Get
b) Result
c) Put
d) Value

View Answer

Answer: b [Reason:] Get the result by passing your Get class instance to the get method of the HTable class. This method returns the Result class object, which holds the requested result.

8. ________ communicate with the client and handle data-related operations.
a) Master Server
b) Region Server
c) Htable
d) All of the mentioned

View Answer

Answer: b [Reason:] Region Server handle read and write requests for all the regions under it.

9. _________ is the main configuration file of HBase.
a) hbase.xml
b) hbase-site.xml
c) hbase-site-conf.xml
d) none of the mentioned

View Answer

Answer: b [Reason:] Set the data directory to an appropriate location by opening the HBase home folder in /usr/local/HBase.

10. HBase uses the _______ File System to store its data.
a) Hive
b) Imphala
c) Hadoop
d) Scala

View Answer

Answer: c [Reason:] The data storage will be in the form of regions (tables). These regions will be split up and stored in region servers.

Interview MCQ Set 2

1. The minimum number of row versions to keep is configured per column family via :
a) HBaseDecriptor
b) HTabDescriptor
c) HColumnDescriptor
d) All of the mentioned

View Answer

Answer: c [Reason:] The minimum number of row versions parameter is used together with the time-to-live parameter and can be combined with the number of row versions parameter.

2. Point out the correct statement :
a) The default for max versions is 1
b) It is recommended setting the number of max versions to an exceedingly high level
c) HBase does overwrite row values
d) All of the mentioned

View Answer

Answer: a [Reason:] The number of max versions may need to be increased or decreased depending on application needs.

3. HBase supports a ____________ interface via Put and Result
a) “bytes-in/bytes-out”
b) “bytes-in”
c) “bytes-out”
d) none of the mentioned

View Answer

Answer: a [Reason:] Input could be strings, numbers, complex objects, or even images as long as they can rendered as bytes.

4. One supported datatype that deserves special mention are :
a) money
b) counters
c) smallint
d) tinyint

View Answer

Answer: b [Reason:] Synchronization on counters are done on the RegionServer, not in the client.

5. Point out the wrong statement :
a) Where time-ranges are very wide (e.g., year-long report) and where the data is voluminous, summary tables are a common approach
b) Coprocessors act like RDBMS triggers
c) HBase does not currently support ‘constraints’ in traditional (SQL) database parlance
d) None of the mentioned

View Answer

Answer: c [Reason:] The advised usage for Constraints is in enforcing business rules for attributes in the table.

6. The _________ suffers from the monotonically increasing rowkey problem
a) rowkey
b) columnkey
c) counterkey
d) all of the mentioned

View Answer

Answer: a [Reason:] Attention must be paid to the number of buckets, because this will require the same number of scans to return results.

7. __________ does re-write data and pack rows into columns for certain time-periods.
a) OpenTS
b) OpenTSDB
c) OpenTSD
d) OpenDB

View Answer

Answer: b [Reason:] OpenTSDB is a very advanced processing technique.

8. Which command is used to disable all the tables matching the given regex ?
a) remove all
b) drop all
c) disable_all
d) all of the mentioned

View Answer

Answer: c [Reason:] The syntax for disable_all command is as follows : hbase> disable_all ‘r.*’

9. __________ command disables drops and recreates a table.
a) drop
b) truncate
c) delete
d) none of the mentioned

View Answer

Answer: b [Reason:] The syntax of truncate is as follows: hbase> truncate ‘table name’

10. Correct and valid syntax for count command is :

a) count ‘<row number>’ 
b) count ‘<table name>’ 
c) count ‘<column name>’ 
d) None of the mentioned

View Answer

Answer: b [Reason:] You can count the number of rows of a table using the count command.

Interview MCQ Set 3

1. _________________ property allow users to override the expiry time specified.
a) hcat.desired.partition.num.splits
b) hcatalog.hive.client.cache.expiry.time
c) hcatalog.hive.client.cache.disabled
d) hcat.append.limit

View Answer

Answer: b [Reason:] This property is an int, and specifies number of seconds.

2. Point out the correct statement :
a) The HCatLoader and HCatStorer interfaces are used with Pig scripts to read and write data in HCatalog-managed tables
b) HCatalog is not thread safe
c) HCatLoader is used with Pig scripts to read data from HCatalog-managed tables.
d) All of the mentioned

View Answer

Answer: d [Reason:] HCatLoader is accessed via a Pig load statement.

3. ____________ is used with Pig scripts to write data to HCatalog-managed tables.
a) HamaStorer
b) HCatStam
c) HCatStorer
d) All of the mentioned

View Answer

Answer: c [Reason:] HCatStorer is accessed via a Pig store statement.

4. Hive does not have a data type corresponding to the ____________ type in Pig.
a) decimal
b) short
c) biginteger
d) datetime

View Answer

Answer: c [Reason:] Hive 0.12.0 and earlier releases support writing Pig primitive data types with HCatStorer.

5. Point out the wrong statement :
a) The Hive metastore lets you create tables without specifying a database
b) Restrictions apply to the types of columns HCatLoader can read from HCatalog-managed tables
c) If the table is partitioned, you can indicate which partitions to scan by immediately following the load statement with a partition filter statement
d) None of the mentioned

View Answer

Answer: d [Reason:] If you created tables using metastore, then the database name is ‘default’ and is not required when specifying the table for HCatLoader.

6. _______________ method is used to include a projection schema, to specify the output fields.
a) OutputSchema
b) setOut
c) setOutputSchema
d) none of the mentioned

View Answer

Answer: c [Reason:] If a schema is not specified, all the columns in the table will be returned.

7. The first call on the HCatOutputFormat must be :
a) setOutputSchema
b) setOutput
c) setOut
d) OutputSchema

View Answer

Answer: b [Reason:] Any other call will throw an exception saying the output format is not initialized.

8. ___________ is the type supported for storing values in HCatalog tables.
a) HCatRecord
b) HCatColumns
c) HCatValues
d) All of the mentioned

View Answer

Answer: a [Reason:] The types in an HCatalog table schema determine the types of objects returned for different fields in HCatRecord.

9. The output descriptor for the table to be written is created by calling :
a) OutputJobInfo.describe
b) OutputJobInfo.create
c) OutputJobInfo.put
d) None of the mentioned

View Answer

Answer: b [Reason:] The implementation of Map takes HCatRecord as an input and the implementation of Reduce produces it as an output.

10. Which of the following Hive commands is not supported by HCatalog ?
a) ALTER INDEX … REBUILD
b) CREATE VIEW
c) SHOW FUNCTIONS
d) DROP TABLE

View Answer

Answer: a [Reason:] Any command which is not supported throws an exception with the message “Operation Not Supported”.

Interview MCQ Set 4

1. Avro-backed tables can simply be created by using _________ in a DDL statement.
a) “STORED AS AVRO”
b) “STORED AS HIVE”
c) “STORED AS AVROHIVE”
d) “STORED AS SERDE”

View Answer

Answer: a [Reason:] AvroSerDe takes care of creating the appropriate Avro schema from the Hive table schema.

2. Point out the correct statement :
a) Avro Fixed type should be defined in Hive as lists of tiny ints
b) Avro Bytes type should be defined in Hive as lists of tiny ints
c) Avro Enum type should be defined in Hive as strings
d) All of the mentioned

View Answer

Answer: b [Reason:] The AvroSerde will convert these to Bytes during the saving process.

3. Types that may be null must be defined as a ______ of that type and Null within Avro.
a) Union
b) Intersection
c) Set
d) All of the mentioned

View Answer

Answer: a [Reason:] A null in a field that is not so defined will result in an exception during the save. No changes need be made to the Hive schema to support this, as all fields in Hive can be null.

4. The files that are written by the _______ job are valid Avro files.
a) Avro
b) Map Reduce
c) Hive
d) All of the mentioned

View Answer

Answer: c [Reason:] If you copy these files out, you’ll likely want to rename them with .avro.

5. Point out the wrong statement :
a) To create an Avro-backed table, specify the serde as org.apache.hadoop.hive.serde2.avro.AvroSerDe
b) Avro-backed tables can be created in Hive using AvroSerDe
c) The AvroSerde cannot serialize any Hive table to Avro files
d) None of the mentioned

View Answer

Answer: c [Reason:] The AvroSerde can serialize any Hive table to Avro files.

6. Use ________ and embed the schema in the create statement.
a) schema.literal
b) schema.lit
c) row.literal
d) all of the mentioned

View Answer

Answer: a [Reason:] You can embed the schema directly into the create statement.

7. _______ is interpolated into the quotes to correctly handle spaces within the schema.
a) $SCHEMA
b) $ROW
c) $SCHEMASPACES
d) $NAMESPACES

View Answer

Answer: a [Reason:] Use none to ignore either avro.schema.literal or avro.schema.url.

8. To force Hive to be more verbose, it can be started with :
a) *hive –hiveconf hive.root.logger=INFO,console*
b) *hive –hiveconf hive.subroot.logger=INFO,console*
c) *hive –hiveconf hive.root.logger=INFOVALUE,console*
d) All of the mentioned

View Answer

Answer: a [Reason:] This Statement will spit orders of magnitude more information to the console and will likely include any information the AvroSerde is trying to get you about what went wrong.

9. ________ was designed to overcome limitations of the other Hive file formats.
a) ORC
b) OPC
c) ODC
d) None of the mentioned

View Answer

Answer: a [Reason:] The Optimized Row Columnar (ORC) file format provides a highly efficient way to store Hive data.

10. An ORC file contains groups of row data called :
a) postscript
b) stripes
c) script
d) none of the mentioned

View Answer

Answer: b [Reason:] The default stripe size is 250 MB. Large stripe sizes enable large, efficient reads from HDFS.

Interview MCQ Set 5

1. Hive uses _________ for logging.
a) logj4
b) log4l
c) log4i
d) log4j

View Answer

Answer: d [Reason:] By default Hive will use hive-log4j.default in the conf/ directory of the Hive installation.

2. Point out the correct statement :
a) list FILE[S] <filepath>* executes a Hive query and prints results to standard output
b) <query string> executes a Hive query and prints results to standard output
c) <query> executes a Hive query and prints results to standard output
d) All of the mentioned

View Answer

Answer: b [Reason:] list FILE[S] <filepath>* checks whether the given resources are already added to the distributed cache or not. See Hive Resources below for more information.

3. What does the hive.rrot.logger specifies in the following statement ?

 $HIVE_HOME/bin/hive --hiveconf hive.root.logger=INFO,console 

a) Log level
b) Log modes
c) Log source
d) All of the mentioned

View Answer

Answer: a [Reason:] hive.root.logger specifies the logging level as well as the log destination. Specifying console as the target sends the logs to the standard error.

4. HiveServer2 introduced in Hive 0.11 has a new CLI called __________
a) BeeLine
b) SqlLine
c) HiveLine
d) CLilLine

View Answer

Answer: a [Reason:] Beeline is a JDBC client based on SQLLine.

5. Point out the wrong statement :
a) There are four namespaces for variables in Hive
b) Custom variables can be created in a separate namespace with the define
c) Custom variables can also be created in a separate namespace with hivevar
d) None of the mentioned

View Answer

Answer: a [Reason:] Three namespaces for variables are hiveconf, system, and env.

6. HCatalog is installed with Hive, starting with Hive release
a) 0.10.0
b) 0.9.0
c) 0.11.0
d) 0.12.0

View Answer

Answer: c [Reason:] hcat commands can be issued as hive commands, and vice versa.

7. hiveconf variables are set as normal by using the following statement :
a) set -v x=myvalue
b) set x=myvalue
c) reset x=myvalue
d) none of the mentioned

View Answer

Answer: d [Reason:] The hiveconf variables are set as normalby set x=myvalue.

8. Variable Substitution is disabled by using :
a) set hive.variable.substitute=false;
b) set hive.variable.substitutevalues=false;
c) set hive.variable.substitute=true;
d) all of the mentioned

View Answer

Answer: a [Reason:] Variable substitution is on by default (hive.variable.substitute=true)

9. _______ supports a new command shell Beeline that works with HiveServer2.
a) HiveServer2
b) HiveServer3
c) HiveServer4
d) None of the mentioned

View Answer

Answer: a [Reason:] The Beeline shell works in both embedded mode as well as remote mode.

10. In ______ mode HiveServer2 only accepts valid Thrift calls.
a) Remote
b) HTTP
c) Embedded
d) Interactive

View Answer

Answer: a [Reason:] In HTTP mode, the message body contains Thrift payloads.