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

Method Insert

be/src/kudu/util/cache-test.cc:88–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 void Insert(int key, int value, int charge = 1) {
89 std::string key_str = EncodeInt(key);
90 std::string val_str = EncodeInt(value);
91 auto handle(cache_->Allocate(key_str, val_str.size(), charge));
92 CHECK(handle);
93 memcpy(cache_->MutableValue(&handle), val_str.data(), val_str.size());
94 cache_->Insert(std::move(handle), this);
95 }
96
97 void Erase(int key) {
98 cache_->Erase(EncodeInt(key));

Callers

nothing calls this directly

Calls 6

moveFunction · 0.85
EncodeIntFunction · 0.70
AllocateMethod · 0.45
sizeMethod · 0.45
MutableValueMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected