MCPcopy Create free account
hub / github.com/apache/impala / DetermineShardBits

Function DetermineShardBits

be/src/util/cache/cache.cc:63–68  ·  view source on GitHub ↗

Determine the number of bits of the hash that should be used to determine the cache shard. This, in turn, determines the number of shards.

Source from the content-addressed store, hash-verified

61// Determine the number of bits of the hash that should be used to determine
62// the cache shard. This, in turn, determines the number of shards.
63int DetermineShardBits() {
64 int bits = PREDICT_FALSE(FLAGS_cache_force_single_shard) ?
65 0 : Bits::Log2Ceiling(base::NumCPUs());
66 VLOG(1) << "Will use " << (1 << bits) << " shards for recency list cache.";
67 return bits;
68}
69
70string ToString(Cache::EvictionPolicy p) {
71 switch (p) {

Callers 1

ShardedCacheMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected