Hadoop HBase Interview Questions and Answers

Q1. When should you use HBase and what are the key components of HBase?

Ans:HBase should be used when the big data application has –

1)A variable schema

2)When data is stored in the form of collections

3)If the application demands key based access to data while retrieving.

Key components of HBase are:

Region- This component contains memory data store and Hfile.

Region Server-This monitors the Region.

HBase Master-It is responsible for monitoring the region server.

Zookeeper- It takes care of the coordination between the HBase Master component and the client.

Catalog Tables-The two important catalog tables are ROOT and META.ROOT table tracks where the META table is and META table stores all the regions in the system.

 

Q2. What are the different operational commands in HBase at record level and table level?

Ans: Record Level Operational Commands in HBase are –put, get, increment, scan and delete.

Table Level Operational Commands in HBase are-describe, list, drop, disable and scan.

 

Q3. What is Row Key?

Ans:Every row in an HBase table has a unique identifier known as RowKey. It is used for grouping cells logically and it ensures that all cells that have the same RowKeys are co-located on the same server. RowKey is internally regarded as a byte array.

 

Q4. Explain the difference between RDBMS data model and HBase data model.

Ans: RDBMS is a schema based database whereas HBase is schema less data model.

  • RDBMS does not have support for in-built partitioning whereas in HBase there is automated partitioning.
  • RDBMS stores normalized data whereas HBase stores de-normalized data.

 

Q5. Explain about the different catalog tables in HBase?

Ans: The two important catalog tables in HBase, are ROOT and META. ROOT table tracks where the META table is and META table stores all the regions in the system.

 

Q6. What is column families? What happens if you alter the block size of ColumnFamily on an already populated database?

Ans: The logical deviation of data is represented through a key known as column Family. Column families consist of the basic unit of physical storage on which compression features can be applied. In an already populated database, when the block size of column family is altered, the old data will remain within the old block size whereas the new data that comes in will take the new block size. When compaction takes place, the old data will take the new block size so that the existing data is read correctly.

 

Q7. Explain the difference between HBase and Hive?

Ans: HBase and Hive both are completely different hadoop based technologies-Hive is a data warehouse infrastructure on top of Hadoop whereas HBase is a NoSQL key value store that runs on top of Hadoop. Hive helps SQL savvy people to run MapReduce jobs whereas HBase supports 4 primary operations-put, get, scan and delete. HBase is ideal for real time querying of big data where Hive is an ideal choice for analytical querying of data collected over period of time.

 

Q8. Explain the process of row deletion in HBase?

Ans: On issuing a delete command in HBase through the HBase client, data is not actually deleted from the cells but rather the cells are made invisible by setting a tombstone marker. The deleted cells are removed at regular intervals during compaction.

 

Q9. What are the different types of tombstone markers in HBase for deletion?

Ans: There are 3 different types of tombstone markers in HBase for deletion-

  • Family Delete Marker: This markers marks all columns for a column family.
  • Version Delete Marker:This marker marks a single version of a column.
  • Column Delete Marker: This markers marks all the versions of a column.

 

Q10. Explain about HLog and WAL in HBase?

Ans: All edits in the HStore are stored in the HLog. Every region server has one HLog. HLog contains entries for edits of all regions performed by a particular Region Server.WAL abbreviates to Write Ahead Log (WAL) in which all the HLog edits are written immediately.WAL edits remain in the memory till the flush period in case of deferred log flush.

Random Articles for You!