Skip to main content

Using the Apache Flume HBase Sink: How the Integration Works and How to Configure It

The first Apache Flume HBase sink introduced a simple way to stream events directly into HBase tables. This modernized walkthrough explains how the sink works, what its limitations are, how Flume resolves HBase configuration files, and how to set up a minimal but functional Flume-to-HBase pipeline. Although this feature originated in early Flume versions, many legacy Hadoop deployments still rely on it today.

Overview

The HBase sink was added to the Flume trunk and provided direct write support from Flume channels into HBase tables. It relies on synchronous HBase client operations and requires that HBase table metadata already exists. The sink handles flushes, transactions and rollbacks, allowing Flume to treat HBase as a durable storage target.

Building Flume from Trunk

In early versions the HBase sink was only available in the trunk source. The following sequence checks out Flume and builds it using Maven:

git clone git://git.apache.org/flume.git
cd flume
git checkout trunk
mvn package -DskipTests
cd flume-ng-dist/target

Inside the repository, the sink is located under:

flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/

Important Details

  • Flume uses the first hbase-site.xml it finds on the CLASSPATH. If multiple HBase versions coexist on a machine, pay attention to classpath ordering.
  • The target HBase table, column family and qualifier must already exist.
  • The sink initially supported only synchronous HBase operations; asynchronous support was planned under FLUME-1252.

Example Flume Configuration for HBase Sink

The following configuration shows a simple in-memory channel feeding an HBase sink:

host1.sources = src1
host1.sinks = sink1
host1.channels = ch1

# Source definition (Seq source)
host1.sources.src1.type = seq
host1.sources.src1.port = 25001
host1.sources.src1.bind = localhost
host1.sources.src1.channels = ch1

# HBase sink
host1.sinks.sink1.type = org.apache.flume.sink.hbase.HBaseSink
host1.sinks.sink1.channel = ch1
host1.sinks.sink1.table = test3
host1.sinks.sink1.columnFamily = testing
host1.sinks.sink1.column = foo

# Serializer (converting event data into HBase-compatible format)
host1.sinks.sink1.serializer = org.apache.flume.sink.hbase.SimpleHbaseEventSerializer
host1.sinks.sink1.serializer.payloadColumn = pcol
host1.sinks.sink1.serializer.incrementColumn = icol

# Channel
host1.channels.ch1.type = memory

Why the Serializer Matters

HBase expects KeyValue or Cell structures. The Flume HBase sink uses serializers to convert Flume events into a format suitable for HBase storage. The SimpleHbaseEventSerializer is a basic serializer that writes event payloads into a configured column family and qualifier.

Operational Notes (Modern Context)

  • Flume-to-HBase pipelines still exist in legacy estates; treat them as migration candidates.
  • Ensure RegionServers are not overloaded—HBase writes are synchronous in this sink.
  • For modern ingestion, consider Kafka → HBase Connectors or NiFi PutHBase processors.
  • Classpath conflicts remain a common operational issue with the HBase sink.

References

If you need help with distributed systems, backend engineering, or data platforms, check my Services.

Most read articles

Why Is Customer Obsession Disappearing?

Many companies trade real customer-obsession for automated, low-empathy support. Through examples from Coinbase, PayPal, GO Telecommunications and AT&T, this article shows how reliance on AI chatbots, outsourced call centers, and KPI-driven workflows erodes trust, NPS and customer retention. It argues that human-centric support—treating support as strategic investment instead of cost—is still a core growth engine in competitive markets. It's wild that even with all the cool tech we've got these days, like AI solving complex equations and doing business across time zones in a flash, so many companies are still struggling with the basics: taking care of their customers. The drama around Coinbase's customer support is a prime example of even tech giants messing up. And it's not just Coinbase — it's a big-picture issue for the whole industry. At some point, the idea of "customer obsession" got replaced with "customer automation," and no...

How to scale MySQL perfectly

When MySQL reaches its limits, scaling cannot rely on hardware alone. This article explains how strategic techniques such as caching, sharding and operational optimisation can drastically reduce load and improve application responsiveness. It outlines how in-memory systems like Redis or Memcached offload repeated reads, how horizontal sharding mechanisms distribute data for massive scale, and how tools such as Vitess, ProxySQL and HAProxy support routing, failover and cluster management. The summary also highlights essential practices including query tuning, indexing, replication and connection management. Together these approaches form a modern DevOps strategy that transforms MySQL from a single bottleneck into a resilient, scalable data layer able to grow with your application. When your MySQL database reaches its performance limits, vertical scaling through hardware upgrades provides a temporary solution. Long-term growth, though, requires a more comprehensive approach. This invo...

What the Heck is Superposition and Entanglement?

This post is about superposition and interference in simple, intuitive terms. It describes how quantum states combine, how probability amplitudes add, and why interference patterns appear in systems such as electrons, photons and waves. The goal is to give a clear, non mathematical understanding of how quantum behavior emerges from the rules of wave functions and measurement. If you’ve ever heard the words superposition or entanglement thrown around in conversations about quantum physics, you may have nodded politely while your brain quietly filed them away in the "too confusing to deal with" folder.  These aren't just theoretical quirks; they're the foundation of mind-bending tech like Google's latest quantum chip, the Willow with its 105 qubits. Superposition challenges our understanding of reality, suggesting that particles don't have definite states until observed. This principle is crucial in quantum technologies, enabling phenomena like quantum comp...