MCPcopy Create free account
hub / github.com/bytedance/bolt / loadData

Method loadData

bolt/dwio/common/CachedBufferedInput.cpp:390–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388 cache_.makePins(
389 keys_,
390 [&](int32_t index) { return sizes_[index]; },
391 [&](int32_t /*index*/, CachePin pin) {
392 if (isPrefetch) {
393 pin.checkedEntry()->setPrefetch(true);
394 }
395 pins.push_back(std::move(pin));
396 },
397 false);
398 if (pins.empty()) {
399 return pins;
400 }
401 auto stats = cache::readPins(
402 pins,
403 maxCoalesceDistance_,
404 1000,
405 [&](int32_t i) { return pins[i].entry()->offset(); },
406 [&](const std::vector<CachePin>& /*pins*/,
407 int32_t /*begin*/,
408 int32_t /*end*/,
409 uint64_t offset,
410 const std::vector<folly::Range<char*>>& buffers) {
411 input_->read(buffers, offset, LogType::FILE);
412 });
413 updateStats(stats, isPrefetch, false);
414 return pins;
415 }
416
417 std::shared_ptr<ReadFileInputStream> input_;
418 const int32_t maxCoalesceDistance_;
419};
420
421// Represents a CoalescedLoad from local SSD cache.
422class SsdLoad : public DwioCoalescedLoadBase {
423 public:

Callers

nothing calls this directly

Calls 11

readPinsFunction · 0.85
setPrefetchMethod · 0.80
checkedEntryMethod · 0.80
entryMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
makePinsMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
offsetMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected