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

Method FileCache

be/src/kudu/util/file_cache.cc:479–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477const char* const FileCache::kAlreadyDeleted = "File already marked as deleted";
478
479FileCache::FileCache(const string& cache_name,
480 Env* env,
481 int max_open_files,
482 const scoped_refptr<MetricEntity>& entity)
483 : env_(env),
484 cache_name_(cache_name),
485 eviction_cb_(new EvictionCallback()),
486 cache_(NewCache(max_open_files, cache_name)),
487 running_(1) {
488 if (entity) {
489 unique_ptr<FileCacheMetrics> metrics(new FileCacheMetrics(entity));
490 cache_->SetMetrics(std::move(metrics), Cache::ExistingMetricsPolicy::kKeep);
491 }
492 LOG(INFO) << Substitute("Constructed file cache $0 with capacity $1",
493 cache_name, max_open_files);
494}
495
496FileCache::~FileCache() {
497 running_.CountDown();

Callers

nothing calls this directly

Calls 4

NewCacheFunction · 0.85
moveFunction · 0.85
SubstituteFunction · 0.85
SetMetricsMethod · 0.45

Tested by

no test coverage detected