HBase tables are sometimes used as queues. In this case, special care must be taken to regularly perform major compactions on tables used in this manner. As is documented in Chapter 5, Data Model, marking rows as deleted creates additional StoreFiles which then need to be processed on reads. Tombstones only get cleaned up with major compactions.
See also Section 9.7.7.7, “Compaction” and HBaseAdmin.majorCompact.
Be aware that htable.delete(Delete)
doesn't use the writeBuffer. It will
execute an RegionServer RPC with each invocation. For a large number of deletes, consider
htable.delete(List)
.