MCPcopy Create free account
hub / github.com/apache/mesos / cacheFiles

Method cacheFiles

src/slave/containerizer/fetcher.cpp:662–685  ·  view source on GitHub ↗

For testing only.

Source from the content-addressed store, hash-verified

660
661// For testing only.
662Try<list<Path>> FetcherProcess::cacheFiles() const
663{
664 list<Path> result;
665
666 if (!os::exists(flags.fetcher_cache_dir)) {
667 return result;
668 }
669
670 const Try<list<string>> find =
671 os::find(flags.fetcher_cache_dir, CACHE_FILE_NAME_PREFIX);
672
673 if (find.isError()) {
674 return Error("Could not access cache directory '" +
675 flags.fetcher_cache_dir + "' with error: " + find.error());
676 }
677
678 transform(
679 find->begin(),
680 find->end(),
681 std::back_inserter(result),
682 [](const string& path) { return Path(path); });
683
684 return result;
685}
686
687
688// For testing only.

Callers 2

verifyCacheMetricsMethod · 0.80
TEST_FFunction · 0.80

Calls 9

findFunction · 0.85
transformFunction · 0.85
PathClass · 0.85
errorMethod · 0.65
existsFunction · 0.50
ErrorFunction · 0.50
isErrorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

verifyCacheMetricsMethod · 0.64
TEST_FFunction · 0.64