Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

__________ command disables drops and recreates a table.(a) drop(b) truncate(c) delete(d) none of the mentionedI had been asked this question in a national level competition.This key question is from Schema Design in HBase topic in section Hive and HBase of Hadoop

Answer»

Correct ANSWER is (b) truncate

The BEST explanation: The SYNTAX of truncate is as follows: hbase> truncate ‘table NAME’.

2.

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 mentionedI got this question in homework.This key question is from Schema Design in HBase topic in section Hive and HBase of Hadoop

Answer»

The correct option is (c) disable_all

The best I can EXPLAIN: The SYNTAX for disable_all command is as FOLLOWS : hbase> disable_all ‘R.*’

3.

__________ does re-write data and pack rows into columns for certain time-periods.(a) OpenTS(b) OpenTSDB(c) OpenTSD(d) OpenDBThe question was asked during an internship interview.My doubt stems from Schema Design in HBase in portion Hive and HBase of Hadoop

Answer»

Right answer is (b) OPENTSDB

Best EXPLANATION: OpenTSDB is a very ADVANCED PROCESSING technique.

4.

The _________ suffers from the monotonically increasing rowkey problem.(a) rowkey(b) columnkey(c) counterkey(d) all of the mentionedI got this question in an online quiz.I would like to ask this question from Schema Design in HBase topic in section Hive and HBase of Hadoop

Answer» CORRECT answer is (a) rowkey

To explain I would say: Attention must be PAID to the number of BUCKETS because this will require the same number of scans to RETURN RESULTS.
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 mentionedI have been asked this question during an internship interview.My question is from Schema Design in HBase in chapter Hive and HBase of Hadoop

Answer»

The correct option is (c) HBASE does not currently support ‘constraints’ in TRADITIONAL (SQL) database parlance

For explanation: The advised USAGE for Constraints is in enforcing BUSINESS rules for ATTRIBUTES in the table.

6.

One supported data type that deserves special mention are ____________(a) money(b) counters(c) smallint(d) tinyintThis question was posed to me during an interview.My doubt is from Schema Design in HBase in chapter Hive and HBase of Hadoop

Answer»

Correct answer is (B) counters

The BEST explanation: SYNCHRONIZATION on counters are done on the REGIONSERVER, not in the CLIENT.

7.

HBase supports a ____________ interface via Put and Result.(a) “bytes-in/bytes-out”(b) “bytes-in”(c) “bytes-out”(d) none of the mentionedThis question was posed to me in quiz.My doubt stems from Schema Design in HBase in division Hive and HBase of Hadoop

Answer»

Correct ANSWER is (a) “BYTES-in/bytes-out”

Easy explanation: Input COULD be STRINGS, numbers, complex OBJECTS, or even images as long as they can rendered as bytes.

8.

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 mentionedThe question was asked in an internship interview.I'm obligated to ask this question of Schema Design in HBase topic in division Hive and HBase of Hadoop

Answer»

Correct OPTION is (a) The DEFAULT for max versions is 1

Best EXPLANATION: The number of max versions MAY need to be increased or decreased depending on application NEEDS.

9.

The minimum number of row versions to keep is configured per column family via _____________(a) HBaseDecriptor(b) HTabDescriptor(c) HColumnDescriptor(d) All of the mentionedI have been asked this question in an internship interview.My doubt stems from Schema Design in HBase in chapter Hive and HBase of Hadoop

Answer»

Correct choice is (C) HColumnDescriptor

Explanation: 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.

10.

_________ command fetches the contents of a row or a cell.(a) select(b) get(c) put(d) none of the mentionedThe question was asked in an interview for internship.My question is from Introduction to HBase in chapter Hive and HBase of Hadoop

Answer»

The correct CHOICE is (b) get

Easy explanation: put COMMAND puts a cell VALUE at a specified column in a specified ROW in a PARTICULAR table.

11.

Which of the following command does not operate on tables?(a) enabled(b) disabled(c) drop(d) all of the mentionedI got this question in an interview.I need to ask this question from Introduction to HBase topic in portion Hive and HBase of Hadoop

Answer»

The CORRECT ANSWER is (b) disabled

The BEST EXPLANATION: is_disabled command verifies whether a table is disabled.

12.

Which of the following command provides information about the user?(a) status(b) version(c) whoami(d) userThis question was addressed to me in an online quiz.My question comes from Introduction to HBase in division Hive and HBase of Hadoop

Answer»

Correct option is (C) whoami

Explanation: status command PROVIDES the status of HBase, for example, the NUMBER of SERVERS.

13.

The _________ Server assigns regions to the region servers and takes the help of Apache ZooKeeper for this task.(a) Region(b) Master(c) Zookeeper(d) All of the mentionedThis question was addressed to me during an interview.Asked question is from Introduction to HBase topic in chapter Hive and HBase of Hadoop

Answer»

Right answer is (b) Master

The EXPLANATION is: Master SERVER maintains the state of the CLUSTER by negotiating the load BALANCING.

14.

Apache HBase is a non-relational database modeled after Google’s _________(a) BigTop(b) Bigtable(c) Scanner(d) FoundationDBThis question was posed to me in class test.My query is from Introduction to HBase topic in section Hive and HBase of Hadoop

Answer» RIGHT option is (b) Bigtable

The explanation is: Bigtable acts up on Google FILE SYSTEM, likewise APACHE HBase WORKS on top of Hadoop and HDFS.
15.

Point out the wrong statement.(a) HBase provides only sequential access to data(b) HBase provides high latency batch processing(c) HBase internally provides serialized access(d) All of the mentionedThe question was posed to me in a job interview.My doubt stems from Introduction to HBase in chapter Hive and HBase of Hadoop

Answer» RIGHT OPTION is (c) HBase internally PROVIDES serialized access

Explanation: HBase internally USES Hash tables and provides random access.
16.

HBase is ________ defines only column families.(a) Row Oriented(b) Schema-less(c) Fixed Schema(d) All of the mentionedThe question was posed to me in a national level competition.Origin of the question is Introduction to HBase topic in division Hive and HBase of Hadoop

Answer»

Correct OPTION is (b) Schema-less

For explanation I would say: HBASE doesn’t have the CONCEPT of FIXED COLUMNS schema.

17.

Point out the correct statement.(a) HDFS provides low latency access to single rows from billions of records (Random access)(b) HBase sits on top of the Hadoop File System and provides read and write access(c) HBase is a distributed file system suitable for storing large files(d) None of the mentionedThe question was posed to me during an interview.The question is from Introduction to HBase topic in chapter Hive and HBase of Hadoop

Answer» RIGHT choice is (b) HBase sits on top of the Hadoop File System and provides READ and write access

The best explanation: ONE can store the data in HDFS either directly or through HBase. Data consumer reads/accesses the data in HDFS randomly using HBase.
18.

HBase is a distributed ________ database built on top of the Hadoop file system.(a) Column-oriented(b) Row-oriented(c) Tuple-oriented(d) None of the mentionedThe question was asked in an international level competition.The query is from Introduction to HBase topic in portion Hive and HBase of Hadoop

Answer» CORRECT option is (a) Column-oriented

For explanation I would say: HBase is a data model that is SIMILAR to Google’s BIG table designed to provide quick RANDOM ACCESS to huge amounts of structured data.
19.

_________ will overwrite any existing data in the table or partition.(a) INSERT WRITE(b) INSERT OVERWRITE(c) INSERT INTO(d) None of the mentionedThis question was addressed to me during an interview.I need to ask this question from Querying Data with HiveQL topic in section Hive and HBase of Hadoop

Answer» RIGHT ANSWER is (c) INSERT INTO

To elaborate: INSERT INTO will append to the table or PARTITION, keeping the EXISTING data intact.
20.

Which of the following statement will create a column with varchar datatype?(a) CREATE TABLE foo (bar CHAR(10))(b) CREATE TABLE foo (bar VARCHAR(10))(c) CREATE TABLE foo (bar CHARVARYING(10))(d) All of the mentionedThis question was posed to me during an interview.Question is taken from Querying Data with HiveQL topic in chapter Hive and HBase of Hadoop

Answer» RIGHT OPTION is (b) CREATE TABLE FOO (bar VARCHAR(10))

Explanation: Varchar datatype was INTRODUCED in Hive 0.12.0
21.

Integral literals are assumed to be _________ by default.(a) SMALL INT(b) INT(c) BIG INT(d) TINY INTThe question was asked during an internship interview.The question is from Querying Data with HiveQL in division Hive and HBase of Hadoop

Answer» RIGHT OPTION is (b) INT

For explanation: Integral literals are ASSUMED to be INT by default, UNLESS the number EXCEEDS the range of INT in which case it is interpreted as a BIGINT, or if one of the following postfixes is present on the number.
22.

Point out the wrong statement.(a) TIMESTAMP is Only available starting with Hive 0.10.0(b) DECIMAL introduced in Hive 0.11.0 with a precision of 38 digits(c) Hive 0.13.0 introduced user definable precision and scale(d) All of the mentionedThe question was posed to me in an international level competition.This interesting question is from Querying Data with HiveQL topic in portion Hive and HBase of Hadoop

Answer»

The correct option is (B) DECIMAL introduced in Hive 0.11.0 with a precision of 38 digits

To EXPLAIN: TIMESTAMP is available STARTING with Hive 0.8.0

23.

Hive uses _____ style escaping within the strings.(a) C(b) Java(c) Python(d) ScalaI had been asked this question in an interview for internship.My question comes from Querying Data with HiveQL topic in division Hive and HBase of Hadoop

Answer»

The CORRECT choice is (a) C

To explain I WOULD say: String literals can be expressed with either single quotes (‘) or DOUBLE quotes (“).

24.

Which of the following will prefix the query string with parameters?(a) SET hive.exec.compress.output=false(b) SET hive.compress.output=false(c) SET hive.exec.compress.output=true(d) All of the mentionedThis question was posed to me during a job interview.My doubt is from Querying Data with HiveQL topic in division Hive and HBase of Hadoop

Answer»

The correct CHOICE is (a) SET hive.exec.compress.output=false

The explanation: Use lzop command UTILITY or your CUSTOM Java to generate .lzo.index for the .lzo files.

25.

_______ is a lossless data compression library that favors speed over compression ratio.(a) LOZ(b) LZO(c) OLZ(d) All of the mentionedI have been asked this question by my school principal while I was bunking the class.Question is taken from Querying Data with HiveQL in chapter Hive and HBase of Hadoop

Answer»

Correct choice is (a) LOZ

Explanation: lzo and lzop NEED to be INSTALLED on EVERY NODE in the Hadoop cluster.

26.

Point out the correct statement.(a) The Avro file dump utility analyzes ORC files(b) Streams are compressed using a codec, which is specified as a table property for all streams in that table(c) The ODC file dump utility analyzes ORC files(d) All of the mentionedThe question was asked in an online interview.Question is taken from Querying Data with HiveQL in section Hive and HBase of Hadoop

Answer»

Right CHOICE is (b) Streams are compressed using a codec, which is specified as a table property for all streams in that table

The EXPLANATION is: The codec can be Snappy, ZLIB, or none.

27.

Serialization of string columns uses a ________ to form unique column values.(a) Footer(b) STRIPES(c) Dictionary(d) IndexThis question was posed to me by my school teacher while I was bunking the class.The doubt is from Querying Data with HiveQL topic in section Hive and HBase of Hadoop

Answer» RIGHT choice is (c) Dictionary

The BEST I can explain: The dictionary is SORTED to speed up predicate FILTERING and IMPROVE compression ratios.
28.

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 mentionedThe question was posed to me in an internship interview.This intriguing question originated from Querying Data with HiveQL in chapter Hive and HBase of Hadoop

Answer»

Correct answer is (a) *hive –hiveconf hive.root.logger=INFO,console*

The best EXPLANATION: 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.

29.

________ was designed to overcome limitations of the other Hive file formats.(a) ORC(b) OPC(c) ODC(d) None of the mentionedI got this question in a job interview.I need to ask this question from Querying Data with HiveQL topic in chapter Hive and HBase of Hadoop

Answer»

The CORRECT option is (a) ORC

The best I can explain: The OPTIMIZED Row Columnar (ORC) FILE format provides a highly EFFICIENT way to store Hive DATA.

30.

_______ is interpolated into the quotes to correctly handle spaces within the schema.(a) $SCHEMA(b) $ROW(c) $SCHEMASPACES(d) $NAMESPACESI had been asked this question by my school teacher while I was bunking the class.The doubt is from Querying Data with HiveQL in section Hive and HBase of Hadoop

Answer»

The correct choice is (a) $SCHEMA

Easy explanation: USE NONE to IGNORE either avro.schema.literal or avro.schema.url.

31.

Use ________ and embed the schema in the create statement.(a) schema.literal(b) schema.lit(c) row.literal(d) all of the mentionedThis question was posed to me in an international level competition.This key question is from Querying Data with HiveQL in portion Hive and HBase of Hadoop

Answer»

The correct OPTION is (a) schema.literal

To elaborate: You can embed the schema DIRECTLY into the CREATE statement.

32.

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 mentionedI have been asked this question in class test.The query is from Querying Data with HiveQL in section Hive and HBase of Hadoop

Answer»

The correct ANSWER is (C) The AvroSerde cannot SERIALIZE any Hive table to Avro FILES

The best I can EXPLAIN: The AvroSerde can serialize any Hive table to Avro files.

33.

The files that are written by the _______ job are valid Avro files.(a) Avro(b) Map Reduce(c) Hive(d) All of the mentionedI have been asked this question during an interview.The above asked question is from Querying Data with HiveQL in section Hive and HBase of Hadoop

Answer»

Right option is (C) Hive

To elaborate: If you copy these FILES out, you’ll LIKELY want to rename them with .AVRO.

34.

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 mentionedThe question was asked by my school teacher while I was bunking the class.The above asked question is from Querying Data with HiveQL topic in chapter Hive and HBase of Hadoop

Answer»

Correct choice is (a) Union

Easiest explanation: 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.

35.

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 mentionedThis question was addressed to me in my homework.This question is from Querying Data with HiveQL in portion Hive and HBase of Hadoop

Answer»

Right answer is (b) Avro Bytes type should be DEFINED in Hive as LISTS of TINY ints

Easiest EXPLANATION: The AvroSerde will CONVERT these to Bytes during the saving process.

36.

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”I got this question in an interview for internship.My question is from Querying Data with HiveQL in chapter Hive and HBase of Hadoop

Answer»

Correct option is (a) “STORED AS AVRO”

EASIEST explanation: AVROSERDE TAKES care of CREATING the appropriate Avro schema from the HIVE table schema.

37.

Which of the following data type is supported by Hive?(a) map(b) record(c) string(d) enumThe question was asked during an online exam.I want to ask this question from HiveQL topic in chapter Hive and HBase of Hadoop

Answer»

The correct OPTION is (d) enum

The explanation: HIVE has no CONCEPT of ENUMS.

38.

The AvroSerde has been built and tested against Hive 0.9.1 and later, and uses Avro _______ as of Hive 0.13 and 0.14.(a) 1.7.4(b) 1.7.2(c) 1.7.3(d) None of the mentionedI have been asked this question at a job interview.Enquiry is from HiveQL topic in division Hive and HBase of Hadoop

Answer» RIGHT choice is (d) NONE of the mentioned

The EXPLANATION is: The AvroSerde uses Avro 1.7.5.
39.

Starting in Hive _______ the Avro schema can be inferred from the Hive table schema.(a) 0.14(b) 0.12(c) 0.13(d) 0.11This question was posed to me during an interview for a job.This key question is from HiveQL topic in portion Hive and HBase of Hadoop

Answer» CORRECT answer is (a) 0.14

Explanation: STARTING in HIVE 0.14, columns can be ADDED to an Avro backed Hive table using the Alter Table statement.
40.

The ________ allows users to read or write Avro data as Hive tables.(a) AvroSerde(b) HiveSerde(c) SqlSerde(d) None of the mentionedThe question was asked during an internship interview.This interesting question is from HiveQL topic in portion Hive and HBase of Hadoop

Answer»

The correct ANSWER is (a) AVROSERDE

The explanation: AvroSerde UNDERSTANDS COMPRESSED Avro files.

41.

Which of the following is used to set transaction isolation level?(a) –incremental=[true/false](b) –isolation=LEVEL(c) –force=[true/false](d) –truncateTable=[true/false]This question was posed to me in an online interview.Asked question is from HiveQL in chapter Hive and HBase of Hadoop

Answer» CORRECT OPTION is (B) –isolation=LEVEL

To explain I would say: Set the transaction isolation level to TRANSACTION_READ_COMMITTED or TRANSACTION_SERIALIZABLE.
42.

Point out the wrong statement.(a) HiveServer2 has a new JDBC driver(b) CSV and TSV output formats are maintained for forward compatibility(c) HiveServer2 supports both embedded and remote access to HiveServer2(d) None of the mentionedI had been asked this question by my school teacher while I was bunking the class.My enquiry is from HiveQL in section Hive and HBase of Hadoop

Answer»

Correct CHOICE is (B) CSV and TSV output formats are MAINTAINED for forward COMPATIBILITY

To EXPLAIN: CSV and TSV output formats are maintained for backward compatibility.

43.

_________ reduce the amount of informational messages displayed (true) or not (false).(a) –silent=[true/false](b) –autosave=[true/false](c) –force=[true/false](d) All of the mentionedThe question was asked in semester exam.I'm obligated to ask this question of HiveQL topic in division Hive and HBase of Hadoop

Answer»

The CORRECT OPTION is (a) –silent=[true/false]

Explanation: It also stops displaying the LOG MESSAGES for the QUERY from HiveServer2.

44.

Point out the correct statement.(a) –helpusage display a usage message(b) The JDBC connection URL format has the prefix jdbc:hive:(c) Starting with Hive 0.14, there are improved SV output formats(d) None of the mentionedThis question was posed to me during an interview.The above asked question is from HiveQL in division Hive and HBase of Hadoop

Answer»

Right choice is (c) STARTING with Hive 0.14, there are IMPROVED SV output FORMATS

Easiest explanation: Output formats available are namely DSV, CSV2 and TSV2.

45.

Hive specific commands can be run from Beeline, when the Hive _______ driver is used.(a) ODBC(b) JDBC(c) ODBC-JDBC(d) All of the MentionedI had been asked this question in final exam.The origin of the question is HiveQL in portion Hive and HBase of Hadoop

Answer»

The CORRECT CHOICE is (B) JDBC

Easy explanation: HIVE specific COMMANDS are same as Hive CLI commands.

46.

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 mentionedThe question was asked by my college professor while I was bunking the class.The doubt is from HiveQL topic in division Hive and HBase of Hadoop

Answer»

Right ANSWER is (a) set hive.VARIABLE.substitute=false;

The EXPLANATION: Variable SUBSTITUTION is on by default (hive.variable.substitute=true).

47.

_______ supports a new command shell Beeline that works with HiveServer2.(a) HiveServer2(b) HiveServer3(c) HiveServer4(d) None of the mentionedI got this question in homework.My doubt stems from HiveQL topic in division Hive and HBase of Hadoop

Answer» RIGHT ANSWER is (a) HiveServer2

Easy EXPLANATION: The Beeline SHELL works in both embedded MODE as well as remote mode.
48.

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 mentionedThe question was asked during a job interview.Question is taken from HiveQL in portion Hive and HBase of Hadoop

Answer»

The correct option is (d) NONE of the mentioned

To EXPLAIN: The hiveconf VARIABLES are set as NORMAL by set x=myvalue.

49.

HCatalog is installed with Hive, starting with Hive release is ___________(a) 0.10.0(b) 0.9.0(c) 0.11.0(d) 0.12.0This question was posed to me by my school principal while I was bunking the class.Question is from HiveQL topic in portion Hive and HBase of Hadoop

Answer» CORRECT OPTION is (C) 0.11.0

The explanation is: hcat commands can be ISSUED as hive commands, and vice versa.
50.

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 mentionedThe question was asked by my school teacher while I was bunking the class.My enquiry is from HiveQL in division Hive and HBase of Hadoop

Answer» CORRECT answer is (a) There are FOUR NAMESPACES for VARIABLES in Hive

The explanation: Three namespaces for variables are hiveconf, system, and ENV.