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

Method Lookup

be/src/util/cache/cache-test.h:64–67  ·  view source on GitHub ↗

Lookup the key. Return the value on success or -1 on failure.

Source from the content-addressed store, hash-verified

62
63 // Lookup the key. Return the value on success or -1 on failure.
64 int Lookup(int key, Cache::LookupBehavior behavior = Cache::NORMAL) {
65 auto handle(cache_->Lookup(EncodeInt(key), behavior));
66 return handle ? DecodeInt(cache_->Value(handle)) : -1;
67 }
68
69 void UpdateCharge(int key, int charge) {
70 auto handle(cache_->Lookup(EncodeInt(key), Cache::NO_UPDATE));

Callers 1

UpdateChargeMethod · 0.45

Calls 3

EncodeIntFunction · 0.70
DecodeIntFunction · 0.70
ValueMethod · 0.45

Tested by

no test coverage detected