Efficient Indexing of Hashtags Using Bitmap Indices

Lawan Thamsuhang Subba, Christian Thomsen, Torben Bach PedersenDOLAP 2019

Abstract

This paper introduces a flexible, open-source distributed bitmap indexing framework designed to accelerate hashtag and substring searches in big data environments. By integrating Roaring bitmaps and HBase with Apache Hive and Orc, the framework overcomes the limitations of traditional min/max and Bloom filter indices. Key innovations include a modular architecture and the introduction of "ghost rowgroups" to ensure consistent indexing across variable-sized data stripes. Experimental results on large-scale Twitter datasets demonstrate significant query speedups for selective searches and join operations, despite an increased initial write-time overhead.

Introduction

In Big Data management, storage is relatively inexpensive, but data retrieval remains a primary bottleneck. Columnar storage formats like Apache Orc typically employ "predicate pushdown" to accelerate queries. This technique relies on basic indices, such as min/max values for data blocks, to skip irrelevant segments. However, this method fails in two critical scenarios: substring searches (e.g., finding #BigData within long text) and unordered or skewed data where min/max ranges overlap significantly.

While distributed bitmap indexing solutions exist, they are often "rigid," being tightly coupled to specific compression algorithms or storage backends. This research proposes a modular framework that allows users to swap compression methods (e.g., Roaring bitmaps) or key-value stores (e.g., HBase) based on their specific needs.

System Architecture and Methods

The developed framework hooks directly into the Apache Hive and Orc ecosystem. Its modularity is a core feature, enabling the use of custom user-defined functions (UDFs) for key extraction, such as regex for hashtags.

System architecture showing the integration of the Bitmap Indexing Framework within the Hive/Orc ecosystem.

Key Components

  • Modular Architecture: Users can plug in preferred bitmap compression algorithms and key-value stores. The default implementation utilizes Roaring bitmaps for their efficiency in handling both dense and sparse data distributions.
  • Ghost Rowgroup Innovation: A significant challenge in indexing Orc files is that "stripes" (data divisions) can vary in size. To maintain a consistent global bitmap index where a bit's position reliably maps to a row's location, the authors introduced "ghost rowgroups." These are virtual padding rowgroups added during indexing to ensure every stripe appears to have the same maximum number of rowgroups, preserving index structure without modifying the underlying data files.
Illustration of the 'ghost rowgroup' (grg) mechanism used to maintain consistent row mapping across variable-sized stripes.

Experimental Evaluation

The system was evaluated using three real-world datasets from the Twitter API (2013), ranging from 55 GB (~192 million rows) to 220 GB (~765 million rows). These datasets represent typical social media workloads characterized by high text volume and millions of unique hashtags.

Key Results

  • Query Acceleration: The framework significantly outperformed default Hive/Orc full-scans for highly selective LIKE and OR-LIKE queries.
  • Join Optimization: The most dramatic performance gains occurred during JOIN operations. The bitmap index allowed the system to skip irrelevant data blocks on both sides of the join, avoiding massive unnecessary processing.
  • Storage Efficiency: The HBase-backed indices and Roaring bitmaps maintained a tiny footprint, often less than 1% of the original data size.
  • Write Overhead: A notable trade-off is the "write tax." Index building increased table creation time by 4 to 6 times compared to default Orc writes, suggesting the framework is best suited for "write-once, read-many" analytical environments.

Conclusion and Future Work

The proposed framework effectively addresses the limitations of standard columnar indices for complex string searches. While it provides substantial read-time benefits, the primary limitation remains the high computational cost of index creation. Future research will focus on optimizing the initial build phase and developing automated methods to identify the "tipping point" where the overhead of index processing exceeds the benefits of skipping data blocks.

Summary updated

BibTeX
@inproceedings{subba2019efficient,
  author = {Lawan Thamsuhang Subba and Christian Thomsen and Torben Bach Pedersen},
  title = {{Efficient Indexing of Hashtags Using Bitmap Indices}},
  booktitle = {DOLAP},
  year = {2019},
  url = {https://openreview.net/forum?id=66eo0XCSoO},
}
Figure