Database Reference
In-Depth Information
The HBase Advanced API
It is time to understand the power the API HBase provides. In this chapter, we are
going to cover the advance HBase API used for the client application, as well as for
the administrative operations. The following are the topics that will be covered in
this chapter:
• Counters
• Coprocessors
• The administrative API
Let's start with counters irst.
Counters
In the Web 2.0 world, most of the e-commerce applications collect statistics such
as user clicks, likes, views, and so on. Earlier this data used to be collected from
the application logiles, which were subsequently analyzed to get the results.
Counters are another advanced and useful feature provided by HBase. Counters
allow us to increment a column value with the least overhead by providing a
mechanism to treat columns as counters. Using counters enables the potential
of real-time accounting and completely takes away the ofline batch-oriented
logile analysis.
Normally, incrementing column values requires steps such as locking the row,
reading, incrementing, writing the value, and inally releasing the row for other
writers. These steps cause a lot of I/O overheads and wait for other writers.
Counters avoid all these I/O-centric steps by synchronizing the write operation
over a row and incrementing values under a single row lock. Therefore, counters
work only with a single row.
Search WWH ::




Custom Search