HBase Workloads on Amazon EMR
When you migrate HBase to Amazon EMR, choose between two storage modes: HDFS for a direct lift-and-shift, or Amazon S3 (available with EMR 5.2.0 and later) to decouple storage from compute. HBase on S3 can introduce significant cost savings for read-heavy workloads, because data is stored durably in S3 and the cluster only needs enough capacity for active reads and writes, without maintaining multiple HDFS replicas. For write-heavy or latency-sensitive workloads, HDFS remains viable on EMR and can serve as an intermediate step before you migrate to S3 storage.
HBase upgrades
For upgrades and migrations, run the newer version alongside the previous version until testing is complete. This blue-green upgrade strategy minimizes risk with an easy rollback and no data loss. We recommend the following process:
-
Take a snapshot from the existing HBase cluster by using HBase snapshots.
-
Use that snapshot to start a new cluster with the upgraded HBase version. For HBase on S3, point the new cluster at the same S3 root directory or a copy. For HBase on HDFS, use the
ExportSnapshottool to copy the snapshot. -
Run both clusters simultaneously, and perform updates and reads against both to validate data consistency and application compatibility.
-
Gradually shift application traffic to the new cluster, and validate correct results.
-
When testing is complete and stable, decommission the old cluster. Roll back to the old cluster if issues arise.
Version compatibility: EMR 5.x to EMR 7.x
Migrating HBase from EMR 5.x to EMR 7.x involves a major HBase version change (HBase 1.x to HBase 2.x). A direct in-place upgrade is not supported. Take a snapshot on EMR 5.x and launch a new EMR 7.x cluster that points to the same S3 root directory, following the blue-green process.
-
Store File Tracking (EMR 6.2.0–7.3.0 to 7.4.0 and later) — If your source cluster uses Amazon's Store File Tracking (the
hbase:storefilesystem table, enabled by default in EMR 6.2.0 through 7.3.0), you must disable and drop thehbase:storefiletable, flushhbase:meta, and then launch the target cluster withDefaultStoreFileTrackerbefore you convert toFileBasedStoreFileTracker. For more information, see Migrating to Amazon EMR version 7.4.0 or later. -
Read-Replica Migration (EMR 6.0.0 and later to 7.12.0 and later) — Launch a new EMR 7.12.0 or later cluster as a read-replica that points to the same S3 location, validate data accessibility, and then switch it from read-only to active mode by using the
readonly_switchcommand. There can be only one active cluster pointing to an S3 location at any time. Switch to active only after the source cluster is terminated. -
Pre-1.0 HBase — If your on-premises cluster runs a pre-1.0 HBase version, consult Upgrading and HBase version number and compatibility in the Apache HBase Reference Guide for required intermediate steps.
Read-Replica Prewarm (EMR 7.12 and later)
EMR 7.12 introduces the read-replica prewarm feature, which reduces HBase upgrade downtime from hours to minutes. This feature enables blue-green deployments at scale by allowing the new cluster to prewarm its block cache before traffic is switched over, eliminating cold-start latency during version upgrades, AMI rotations, and instance type changes.
For guidance on specific migration scenarios and version compatibility, see the following resources:
File system connector: EMRFS, EMR S3A, and HBase on S3
Through EMR 7.9, EMR used EMRFS as its primary connector for HBase on S3. Starting with EMR 7.3, the EMR S3A connector achieved performance parity with EMRFS. Beginning with EMR 7.10, EMR S3A is the default file system connector for HBase on S3.
Performance benchmarks that use YCSB (Yahoo! Cloud Serving Benchmark) with 100 million rows demonstrate that EMR S3A achieves comparable performance to EMRFS and delivers up to 65% lower latency compared to open-source S3A (OSS S3A) in read-heavy and mixed read/write workloads. The transition to EMR S3A brings better standardization, improved portability, stronger community support, and AWS SDK V2 integration.
Optimize bulk loads on HBase on S3
A common approach when you migrate an existing cluster to HBase on S3, or perform initial data loads, is to use bulk loads. There are several ways to optimize bulk loads for best performance. Depending on your version of HBase and where your generated StoreFiles are located, the bulk load command is similar to the following:
hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles \ <s3://bucket/storefileoutput/> <tablename>
The command initiates the CompleteBulkLoad process.
-
Lists all available StoreFiles in the
storefileoutputlocation on S3. -
Determines in which Region each StoreFile should be placed, and whether it fits within the given Region based on the configured maximum region size (
hbase.hregion.max.filesize). -
If a StoreFile is too large for the Region, or if the Region has split since the files were created, the primary node splits the StoreFile into two new files and re-adds them to the queue.
-
For each Region that has StoreFiles to load, the primary node issues a request to the responsible RegionServer to initiate a BulkLoad.
-
The RegionServer copies the StoreFile from S3 to the target Region, loads it into HBase, and acknowledges completion.
Figure 28: Overview of CompleteBulkLoad process
As with any distributed system, bulk load performance depends on available CPU cores, memory, and network bandwidth.
Optimize Amazon S3 uploads
Adjust the following S3A configuration settings (S3A is the default S3 connector starting with EMR 7.10.0):
-
fs.s3a.threads.maxcontrols the maximum number of threads for parallel uploads. Increasing it allows more parallel multipart uploads. Each thread consumes CPU, so use an instance type with a higher vCPU count. -
fs.s3a.multipart.sizeincreases when you upload large files to avoid hitting multipart-count limits and improve throughput.
If you migrate from EMRFS, EMR automatically maps the legacy fs.s3.* and
fs.s3n.* equivalents to these S3A properties when the S3A value is not
explicitly set. For HBase-on-S3A specifics, see the File system connector section earlier in
this chapter. For the full configuration mapping, see Migration Guide: EMRFS to S3A
Filesystem.
Increase threads on the primary node
The primary node (or whichever node you run LoadIncrementalHFiles on)
performs two operations: splitting StoreFiles that do not fit within a Region, and coordinating
BulkLoad requests with each responsible RegionServer. These operations execute in a thread pool
whose default size equals the number of available CPUs on the node. For example, a small
m4.large primary node with only 2 vCPUs can block the entire bulk load when
two or more StoreFiles must be split simultaneously. Address this by using a larger instance
type with more vCPUs for the primary node (consider Graviton-based types such as
m7g.4xlarge or m7g.8xlarge for large bulk loads), or by
defining the hbase.loadincremental.threads.max variable explicitly when you
run the job.
Even with 100 RegionServers, the LoadIncrementalHFiles command can only
use as many RegionServers as the value of hbase.loadincremental.threads.max
allows. If your primary node has 8 vCPUs, by default only 8 RegionServers are used
concurrently. You can increase this value to match your RegionServer count, but StoreFile
splitting on the primary node competes for the same thread pool, potentially creating a
bottleneck.
Increase RPC timeout for large StoreFiles
If you have generated large StoreFiles (upwards of 10 GB) or a high number of StoreFiles
assigned to a specific RegionServer, LoadIncrementalHFiles might occasionally
return an Error connecting to server message due to a
CallTimeoutException. This is expected when operations take longer than the
default RPC timeout window, but it causes retries and can fail the load. Work around it by
increasing the RPC timeout with the hbase.rpc.timeout variable when you start
your bulk load job. A value of 600000 (10 minutes) is typically sufficient
for large StoreFiles.
HBase observability
Figure 29: HBase metrics flow from EMR cluster nodes through the CloudWatch Agent to CloudWatch or Prometheus (EMR 7.1 and later). Ganglia is removed starting with EMR 7.0.
When you migrate HBase workloads from on-premises to EMR, replace your existing monitoring stack (typically Ganglia, JMX polling, or custom Hadoop metrics sinks) with the EMR-native observability model. Starting with EMR 7.0, EMR replaced Ganglia with the Amazon CloudWatch Agent for metrics collection. From EMR 7.1 onwards, setup is simplified through the EMR configuration API: you specify your metrics destination (CloudWatch or Prometheus) and the HBase JMX MBeans to collect at cluster creation, with no bootstrap actions or manual downloads. Ganglia is not available on EMR 7.x releases.
The CloudWatch Agent on EMR collects three categories of metrics across all cluster nodes:
-
System metrics (CPU, disk, memory, network I/O, swap)
-
Hadoop daemon metrics (DataNode, NameNode, YARN ResourceManager and NodeManager)
-
HBase-specific metrics (Master, RegionServer, REST Server, and Thrift Server)
Metrics are JMX-based and published to CloudWatch under the CWAgent
custom namespace, or sent to an Amazon Managed Service for Prometheus endpoint through remote
write. For migration, configure the metrics that match what you monitored on-premises. Key HBase
metrics to track post-migration include AssignFailedCount,
numActiveHandler (RegionServer IPC load),
regionserver.Server.Bulkload_count, and request latency percentiles. Set up
CloudWatch alarms on critical thresholds (RegionServer handler saturation, GC pressure) with
Amazon SNS notifications to replicate on-premises alerting. For more information, see
Set up metrics and Using the Metrics Destination.
Monitoring bulk loads with Amazon CloudWatch
While a bulk load runs, the HBase web UI does not provide enough metric granularity.
Starting with EMR 7.1, use the CloudWatch Agent to monitor bulk load progress by configuring
emr-hbase-region-server-metrics to collect the JMX metric
regionserver.Server.Bulkload_count, which tracks how many bulk loads have
completed across each RegionServer over time. This confirms that load is distributed evenly and
progressing. Create a CloudWatch dashboard to visualize bulk load count per node alongside
network throughput and disk I/O to identify bottlenecks. For more information, see
Monitoring EMR HBase with Amazon CloudWatch and Set up
metrics.
Debugging bulk load issues
If you encounter errors during a bulk load, enable DEBUG logging for the
LoadIncrementalHFiles class to capture detailed diagnostic output. Set the
following property in your hbase-log4j configuration:
log4j.logger.org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles=DEBUG # For RPC-level debugging, also enable: log4j.logger.org.apache.hadoop.hbase.ipc.RpcServer=TRACE
Summary and configuration examples
There are three primary strategies to optimize HBase bulk loads on S3.
-
Maximize S3 and network bandwidth by tuning the S3 threadpool size and multipart upload split size.
-
Maximize CPU utilization on the primary node by using a larger instance type or increasing the incremental load thread count, or both.
-
Tune HBase settings for the expected workload, including RPC timeout and region file size thresholds.
You can specify all configuration variables as command-line arguments to
LoadIncrementalHFiles, or configure them cluster-wide by using Hadoop or HBase
configuration classifications at cluster creation.
Example 1: Increasing threads and RPC timeout (command line)
The following command sets concurrent threads to 20 and HBase RPC timeout to 10 minutes (600,000 ms):
hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles \ -Dhbase.loadincremental.threads.max=20 \ -Dhbase.rpc.timeout=600000 \ <s3://bucket/storefileoutput/> \ <tablename>
Example 2: Cluster configuration JSON (AWS CLI or SDK)
[ { "Classification": "hbase", "Properties": { "hbase.emr.storageMode": "s3" } }, { "Classification": "hbase-site", "Properties": { "hbase.rootdir": "s3://<bucket>/<hbaseroot>", "hbase.hregion.max.filesize": "21474836480" } }, { "Classification": "hbase-log4j", "Properties": { "log4j.logger.org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles": "DEBUG", "log4j.logger.org.apache.hadoop.hbase.ipc.RpcServer": "TRACE" } } ]
Example 3: Creating an HBase on S3 cluster (AWS CLI)
aws emr create-cluster \ --release-label emr-7.12.0 \ --applications Name=HBase \ --instance-type m5.xlarge \ --instance-count 3 \ --configurations https://s3.amazonaws.com/mybucket/config/hbase-s3-config.json
Recent HBase performance improvements on Amazon EMR
The following table summarizes recent HBase performance improvements on EMR.
| Feature / Release | Description and impact |
|---|---|
| Persistent HFile Tracking | EMR 6.2.0 and later introduced a hbase:storefile system table that
directly tracks HFile paths, reducing reliance on S3 rename operations. It improves flush
operations and compactions, and supports faster write-heavy workloads. |
| EMR S3A as Default | EMR 7.10 and later replaces EMRFS as the default S3 connector, achieving performance parity with EMRFS while delivering up to 65% lower latency than open-source S3A on read-heavy workloads. It supports AWS SDK v2. |
| Bucket Caching | EBS gp3 SSD-based persistent bucket caching reduces read latency and improves throughput compared to uncached S3 reads. |
| Read-Replica Prewarm | EMR 7.12 and later reduces HBase upgrade and maintenance downtime from hours to minutes by allowing new clusters to prewarm. It applies to version upgrades, AMI rotations, and instance type changes. |
| Multiple primary node HA | EMR supports launching 3 primary nodes, enabling HBase to tolerate primary node failures. |