Hello Thomas Tauber-Marshall, Sahil Takiar, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/15179

to look at the new patch set (#8).

Change subject: IMPALA-8690 (prep 3): Factor out common code for cache 
implementations
......................................................................

IMPALA-8690 (prep 3): Factor out common code for cache implementations

The existing cache implementation handles LRU/FIFO eviction algorithms,
but it also implements several components that are useful for other
cache implementations. Specifically, there is a simple hash table
(HandleTable) and a simple sharding implementation (ShardedCache).
These can be reused across other eviction algorithms by making them
generic.

This pulls them out of be/src/util/cache/cache.cc and into a new
be/src/util/cache/cache-internal.h file. To make the HandleTable
generic, this introduces a HandleBase class that contains common
code between the implementations (such as the key, the value,
the hash, etc). The HandleTable works on this base class, and the
RLHandle now derives from HandleBase.

To support this, Allocate/Free needs to treat the handle as an object
(calling constructors/destructors) rather than treating it like
a chunk of memory (or simple struct).

ShardedCache is made generic by having cache implementations derive
from a base CacheShard class that defines the appropriate methods
needed by the sharding class. This is purely an interface, and the
base class defines no functions. The existing CacheShard is renamed
to RLCachedShard and derives from this class.

Testing:
 - Release core run with a data cache enabled
 - ASAN core
 - The cache-test backend test continues to pass

Change-Id: I67294244a3e8a2812f1482fe786bf7f8e6ce054e
---
A be/src/util/cache/cache-internal.h
M be/src/util/cache/cache.cc
M bin/rat_exclude_files.txt
3 files changed, 424 insertions(+), 286 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/79/15179/8
--
To view, visit http://gerrit.cloudera.org:8080/15179
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I67294244a3e8a2812f1482fe786bf7f8e6ce054e
Gerrit-Change-Number: 15179
Gerrit-PatchSet: 8
Gerrit-Owner: Joe McDonnell <joemcdonn...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <stak...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>

Reply via email to