Duczer East
Healthcare

In-perimeter AI on governed clinical and operational data.

Financial Services

Private AI and data platforms built to clear model-risk and audit review.

Financial services

Private AI, KYC/AML, API gateways and data governance for banks.

Insurance

Change data capture, governed agents and integration for insurers.

Healthcare

PHI document intelligence, FHIR APIs and in-perimeter AI for health systems and plans.

GuideCloudera / Data Services & AI7 min read

Apache HBase on Cloudera: architecture, sizing, operations and common issues

What to know before you size, run or upgrade HBase

Authored byCo-Founder and Managing Partner, Duczer East
Part of the Insights topic: Private AI & Data Architecture
On this page
  1. Architecture
  2. Sizing
  3. Row-key design and hotspots
  4. Compaction in plain terms
  5. Operations checklist
  6. Backup, replication and recovery
  7. Common issues
  8. Questions we hear
  9. A first engagement

HBase is a store for reading and writing single records by key at large scale. On Cloudera it runs as a set of region servers coordinated by an HMaster, with data in HFiles and changes first written to a write-ahead log. Most incidents trace back to row-key design, region count, compaction backlog or untested recovery. This guide covers all four, with a checklist you can run this week.

Architecture

Tables are split into regions, and each region is served by one region server. Writes go to a write-ahead log and an in-memory store, which flushes to HFiles. Compaction merges HFiles. The HMaster assigns regions and ZooKeeper tracks server state. Cloudera Runtime 7.3.1 on Private Cloud Base uses HBase 2.4.17 and supports JDK 17.

The Apache HBase reference guide gives the flush rule: when the in-memory store reaches the size set in hbase.hregion.memstore.flush.size, it flushes to a store file. Over time the store file count rises, which is why compaction exists.

Sizing

DriverWhy it mattersWhat to check
Row-key designDecides how evenly load spreads across regionsLook at request counts per region
Data size and growthSets region and server countsPlan for peak plus growth
Read and write mixSets cache and memory splitMeasure, do not guess
Number of column familiesEach has its own files and compactionKeep them few
Recovery targetSets replication and backup designTime a restore

Specific numbers, such as regions per server and heap sizes, depend on your release and workload. We set them from measurements, not rules of thumb. For orientation, the Apache reference guide says HBase is designed to run a small number of relatively large regions per server, in the range of 20 to 200 regions of 5 to 20 GB, and that around 100 regions per server has often given the best results. It gives two reasons. Each region's memstore takes buffer memory before any data arrives, and too many regions force tiny flushes that trigger extra compactions. Treat these as the guide's orientation, not as your target.

Row-key design and hotspots

HBase sorts rows by key. That helps scans, but a poorly designed key sends most traffic to one region server. The reference guide names four techniques:

TechniqueHow it worksCost
SaltingAdd a random prefix so writes spread over several regionsReads must gather rows from every prefix, and lose natural order
HashingUse a one-way hash so each key always gets the same prefixPoint reads stay easy, range scans on the original key do not
Reversing the keyPut the fast-changing digits firstLoses the natural sort order
Reverse timestampAppend Long.MAX_VALUE minus the timestamp so the newest row sorts firstSuits "latest value for a key" reads only

Row keys cannot be changed later. The only way to change one is to delete the row and insert it again, so settle the design before the table holds much data. Pre-split new tables so load spreads from day one: in the HBase shell, n split points create n plus 1 regions.

ruby
# HBase shell: create a table pre-split into five regions on hex keys
create 'events', 'f', { NUMREGIONS => 5, SPLITALGO => 'HexStringSplit' }

Compaction in plain terms

Minor compactions merge a few small adjacent files. Major compactions rewrite every file in a store into one, and only they remove deleted data and expired versions. Deletes write a tombstone first, and the data goes only at major compaction. By default major compactions run about once every seven days. The reference guide warns against disabling them altogether, because they are needed for store file clean-up. On a busy cluster, schedule them for a quiet window and run them by hand if you need to control the timing.

Keep column families to a minimum. The guide says HBase does not do well beyond two or three, because flushing works per region and compaction per store, so a busy family drags its quiet neighbors into extra I/O.

Operations checklist

  1. Watch request counts per region, to catch hotspots early.
  2. Track compaction queues and storefile counts per region.
  3. Alert on region server memory pressure and long pauses.
  4. Monitor replication lag if you replicate between clusters.
  5. Time a full restore at least twice a year.
  6. Rehearse upgrades and keep a rollback.

Backup, replication and recovery

Cloudera's HBase backup guide covers snapshots, export and replication. A snapshot has little impact on region servers, and clone and restore copy no data, because HFiles are immutable. Exporting a snapshot to another cluster also has little impact on the source servers. A restore sets the table back to the snapshot, so changes made afterward are lost.

MechanismGood forKnow this
SnapshotPoint-in-time copy, safe changes, quick restoreIt is a copy in the same cluster until you export it
Snapshot exportMoving a copy to another clusterTime the import on the target
Asynchronous replicationDisaster recovery and keeping a second cluster currentThe reference guide says recovery from it can lose recent data, because the WAL is shipped in the background
Synchronous replicationTighter recovery goalsA different mechanism, described separately in the guide

The guide also notes that replication works per column family, that you create the table and families on the target first, and that replication and WAL compression have a known compatibility problem, so check your settings together.

Recovery time after a server loss has a formula in the guide: ZooKeeper session timeout, plus split time, plus assignment and replay time. In-flight queries are retried, not lost. The more regions on the failed server, the longer the last two parts take, so region count is also a recovery setting.

Common issues

  • Hotspots from monotonically increasing row keys. Use salting or reversed or hashed prefixes where reads allow.
  • Compaction backlog after a burst of writes, shown as rising storefile counts and slower reads.
  • Long recovery after a region server loss because too many regions sat on it.
  • Slow scans because a workload that needs analytics runs on HBase. Consider Kudu or Iceberg for those reads.
  • Native-API edits to tables that Phoenix manages, which Cloudera warns can corrupt data and indexes.

Questions we hear

Can HBase run analytics? It can scan, but it is built for key lookups and short ranges. Heavy scans belong on Impala with Kudu or Iceberg.

How many column families should we use? One if you can. Add a second or third only when you usually read one family or the other, not both.

For SQL on HBase see Apache Phoenix on HBase. If your storage layer is changing, see HDFS to Ozone migration steps. A review of an existing cluster is described in an HBase health check example and on the Cloudera Operational Database page.

A first engagement

Duczer East offers an HBase health check: we read your region and compaction metrics, review your row keys against real traffic, time a restore and hand back a ranked fix list.

Frequently asked questions

What is Apache HBase?

A column-oriented, distributed store that gives strongly consistent, real-time random access to very large tables, running on Hadoop storage.

Which HBase version does Cloudera ship?

Cloudera Runtime 7.3.1 on Private Cloud Base uses Apache HBase 2.4.17, per Cloudera release notes.

What causes HBase hotspots?

Usually row keys that send most traffic to a few regions, such as keys that begin with a timestamp. Key design that spreads writes is the fix.

How do we shorten HBase recovery?

Keep region counts per server sensible, test restores, and plan for server failure. Measure restore time, not just back-up success.

How do we avoid HBase hotspots with sequential keys?

The Apache HBase guide lists salting, hashing, reversing the key and reverse timestamps. Each trades read convenience for write spread, so pick by your read pattern.

Should we disable major compactions?

No. The HBase guide says they are needed for store file clean-up. By default they run about every 7 days, and you can time them yourself for a quiet window.

How many column families should a table have?

Keep them few. The HBase guide says it does not do well beyond two or three, and suggests one if you can.

Authored by

Co-Founder and Managing Partner, Duczer East

David deBoisblanc is co-founder of Duczer East and a digital transformation and innovation leader in data-centric AI, agentic systems, and enterprise integration. He shapes intent-driven AI solutions that modernize how organizations use data, drawing on deep experience with Cloudera and complex enterprise integration landscapes.

Newsletter

The Practitioner's Briefing

Senior-level insights on agentic AI, data engineering and enterprise integration, delivered to your inbox.

One email when there is something worth reading. Unsubscribe any time.

Let's Talk

Want to discuss the ideas raised here?

Tell us what you are working on. A senior practitioner replies, and only your email is required.

Get a quote