Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Learning Hbase
Learning Hbase

Learning Hbase: Learn the fundamentals of HBase administration and development with the help of real-time scenarios

eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Learning Hbase

Chapter 2. Let's Begin with HBase

In the previous chapter, we learned in depth about HBase and its ecosystem. In this chapter, we will discuss HBase and its components in a bit more detail. This chapter will guide you through understanding the prerequisites and assumptions that one has to make when one starts using HBase. It will also focus on the requirements to configure HBase cluster and the parameters that you need to keep in mind to have a healthy and helpful HBase. You will also get to know HBase components and their deployment considerations. Let's take a look at the topics that we are going to discuss in this chapter:

  • HFile
  • HBase region
  • Scalability
  • Reading and writing cycle
  • Write-Ahead Logs
  • MemStore
  • Some HBase housekeeping concepts
  • Region operations
  • Capacity planning
  • List of available HBase distributions
  • Prerequisites for HBase

Understanding HBase components in detail

To understand the components of HBase, let's start from the bottom, from HFile to RegionServers, and then progress towards the master. There can be one to n RegionServers, one to n DataNodes, and one to n ZooKeeper nodes. Refer to the following figure:

Understanding HBase components in detail

HFile

HFile is designed after Google SSTable, which is a reinterpretation of Google's implementation based on their Bigtable paper. It was implemented after HBase v0.20.0; earlier, an alternate file format, that is, MapFile was being temporarily used. An HFile internally consists of HFile blocks that are its building blocks.

Note

Go through the links https://hbase.apache.org/book/apes03.html and https://issues.apache.org/jira/browse/HBASE-3857, and also go through the PDF files present on the previous link for an actual file representation of HFile on the disk.

Region

Regions are the basic blocks of RegionServers that provide distribution, availability, and storage for columns and column families...

Reading and writing cycle

Now, let's see how the read-and-write operation takes place in HBase diagrammatically:

Reading and writing cycle

Let's discuss and understand how the read-and-write operation takes place in and from HBase tables. In HBase, the client does not write data to HFile directly; it is first written to WAL and then to HBase MemStore, which is shared by an HStore in the main memory and then flushed to HFile later. Refer to the following figure:

Reading and writing cycle

Write-Ahead Logs

Write-Ahead Logs facilitate the data reliability and reside on HDFS; each RegionServer hosts a single WAL. In the case of a RegionServer crash where MemStore is not flushed, WAL is used to restore the data to a new RegionServer. So, only once data is written successfully to WAL and MemStore, the write operation is said to be successful.

MemStore

MemStore acts as an in-memory write buffer with a default size of 64 MB. Once data in MemStore reaches the threshold (which is by default 40 percent of the heap size or 64 MB), it is flushed...

HBase housekeeping

As data is being added to HBase, it writes an immutable file to store. Each store is made up of column families, and regions consist of these row-key ordered files as it's immutable. So, there will be more files rather than one on the fly. Due to many files, the I/O will be slower, and hence lag in reading and writing, resulting in slower operation. To overcome these types of problems, HBase uses the compaction methodology; let's look into it now. Refer to the following figure for a better understanding:

HBase housekeeping

Compaction

As the name suggests, compaction makes files more compact and, hence, efficient to read up files. When new data is written to HBase, HFile is generated and the number of HFiles might increase the I/O overhead. So, to minimize this, the HFiles are merged to one HFile periodically. As MemStore gets filled, a new HFile is created. If these files are not merged in time, there will be a huge overhead on the system. Compaction is nothing but the merging of...

The HBase delete request

When HBase receives a delete request for some data, it does not delete it immediately. The data that needs to be deleted is marked as a tombstone using the tombstone marker. It is a predicate deletion, which is a feature supported by LSM-trees on which HBase is based. This is done because HFile is immutable, and deletion of this is not available inside HFile on HDFS. One of the major compactions takes place when the marked record or data is discarded, and a new HFile is created without the marked data.

The reading and writing cycle

The following figure shows us how the overall reading and writing is done in HBase:

The reading and writing cycle

As we can see in the preceding figure, whenever a write request is sent, it is first written to WAL and then to MemStore, and when MemStore and WAL reach the threshold, it is flushed to the disk file for persistence. Also, when client needs to read some data, it queries the .META. table and then contacts the specific RegionServer; if data is found, it is...

List of available HBase distributions

Let's see the list of HBase distributions that we can use. While building up the HBase cluster, we need to keep in mind that if we use the distribution of a specific vendor, we must use the Hadoop distribution of the same vendor. This is required for compatibility and ease of configuration.

Some major distributions of Hadoop/HBase are as follows:

There are also many other distributions that are still evolving.

Understanding HBase components in detail


To understand the components of HBase, let's start from the bottom, from HFile to RegionServers, and then progress towards the master. There can be one to n RegionServers, one to n DataNodes, and one to n ZooKeeper nodes. Refer to the following figure:

HFile

HFile is designed after Google SSTable, which is a reinterpretation of Google's implementation based on their Bigtable paper. It was implemented after HBase v0.20.0; earlier, an alternate file format, that is, MapFile was being temporarily used. An HFile internally consists of HFile blocks that are its building blocks.

Note

Go through the links https://hbase.apache.org/book/apes03.html and https://issues.apache.org/jira/browse/HBASE-3857, and also go through the PDF files present on the previous link for an actual file representation of HFile on the disk.

Region

Regions are the basic blocks of RegionServers that provide distribution, availability, and storage for columns and column families on an HBase...

Reading and writing cycle


Now, let's see how the read-and-write operation takes place in HBase diagrammatically:

Let's discuss and understand how the read-and-write operation takes place in and from HBase tables. In HBase, the client does not write data to HFile directly; it is first written to WAL and then to HBase MemStore, which is shared by an HStore in the main memory and then flushed to HFile later. Refer to the following figure:

Write-Ahead Logs

Write-Ahead Logs facilitate the data reliability and reside on HDFS; each RegionServer hosts a single WAL. In the case of a RegionServer crash where MemStore is not flushed, WAL is used to restore the data to a new RegionServer. So, only once data is written successfully to WAL and MemStore, the write operation is said to be successful.

MemStore

MemStore acts as an in-memory write buffer with a default size of 64 MB. Once data in MemStore reaches the threshold (which is by default 40 percent of the heap size or 64 MB), it is flushed to a new HFile...

Left arrow icon Right arrow icon

Description

If you are an administrator or developer who wants to enter the world of Big Data and BigTables and would like to learn about HBase, this is the book for you.

What you will learn

  • Understand the fundamentals of HBase
  • Understand the prerequisites necessary to get started with HBase
  • Install and configure a new HBase cluster
  • Optimize an HBase cluster using different Hadoop and HBase parameters
  • Make clusters more reliable using different troubleshooting and maintenance techniques
  • Get to grips with the HBase data model and its operations
  • Get to know the benefits of using Hadoop tools/JARs for HBase
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2014
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781783985944
Vendor :
Apache
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Nov 25, 2014
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781783985944
Vendor :
Apache
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 142.97
Learning Hbase
$48.99
Mastering Hadoop
$54.99
Hbase Essentials
$38.99
Total $ 142.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. Understanding the HBase Ecosystem Chevron down icon Chevron up icon
2. Let's Begin with HBase Chevron down icon Chevron up icon
3. Let's Start Building It Chevron down icon Chevron up icon
4. Optimizing the HBase/Hadoop Cluster Chevron down icon Chevron up icon
5. The Storage, Structure Layout, and Data Model of HBase Chevron down icon Chevron up icon
6. HBase Cluster Maintenance and Troubleshooting Chevron down icon Chevron up icon
7. Scripting in HBase Chevron down icon Chevron up icon
8. Coding HBase in Java Chevron down icon Chevron up icon
9. Advance Coding in Java for HBase Chevron down icon Chevron up icon
10. HBase Use Cases Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(8 Ratings)
5 star 62.5%
4 star 12.5%
3 star 0%
2 star 25%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Sören Mar 24, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
For a future project, I had to read up on both Hadoop and HBase. For HBase, I decided to purchase Learning HBase by Shashwat Shriparv. The author starts by introducing HBase and the ecosystem and later guides the reader through installation and configuration (of both the Apache and Cloudera flavours). Of course, the coding aspects such as scripting and Java development are not forgotten and there is a separate chapter on maintenance and troubleshooting, which is very handy to have. In my case, the decision for HBase had already been made, but the uses cases in the last chapter were nonetheless very interesting. The book is written in an accessible style with enough detail and coverage to get started with HBase. I am glad I bought it and can definitely recommend it as a starting point for the HBase beginner.
Amazon Verified review Amazon
D Mar 27, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Learning HBASE book contains everything a beginner needs to get started with HBASE. The book provides the reader basic understanding of HBASE concepts as well as Hadoop and Zookeeper. The author does a nice job of walking through the reader with installing, running, using, and maintaining HBase.
Amazon Verified review Amazon
Phani Mutyala Mar 24, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am in love with this book. The concept, the way the explanation has been give was solid. The best part I liked was the example that have been provided throughout the book and for every use case that was described. My Learning path on NoSQL got changed after my readings. I would certainly recommend this book to the audience that are beginners to NoSQL word.
Amazon Verified review Amazon
Natalia Mar 20, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book has been a great source for me when I was studying for Cloudera HBase Specialist exam earlier this year (which I passed). I would say the audience for this book is people who have been exposed to various Big Data technologies and have good understanding of HDFS. Which was great for me because I did not have to skip sections that are often added to the books as an intro to Hadoop ecosystem. "HBase Use Cases" portion was very informative for me personally. Chapter on Coding HBase in Java covers material that would generally interest development team but I found it very useful for me (my duties can be mostly described as Hadoop administration) because information there is tied to HBase API topics that - as an admin - you should know.
Amazon Verified review Amazon
varun Mar 16, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I liked this book,this book is very useful for developer and administrator.He has covered all the issue and challenges faced in real time and best practices in implementation and developing of Hbase.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela