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

Function fetch

src/launcher/fetcher.cpp:452–475  ·  view source on GitHub ↗

Returns the resulting file or in case of extraction the destination directory (for logging).

Source from the content-addressed store, hash-verified

450// Returns the resulting file or in case of extraction the destination
451// directory (for logging).
452static Try<string> fetch(
453 const FetcherInfo::Item& item,
454 const Option<string>& cacheDirectory,
455 const string& sandboxDirectory,
456 const Option<string>& frameworksHome,
457 const Option<Duration>& stallTimeout)
458{
459 LOG(INFO) << "Fetching URI '" << item.uri().value() << "'";
460
461 if (item.action() == FetcherInfo::Item::BYPASS_CACHE) {
462 return fetchBypassingCache(
463 item.uri(),
464 sandboxDirectory,
465 frameworksHome,
466 stallTimeout);
467 }
468
469 return fetchThroughCache(
470 item,
471 cacheDirectory,
472 sandboxDirectory,
473 frameworksHome,
474 stallTimeout);
475}
476
477
478// Checks to see if it's necessary to create a fetcher cache directory for this

Callers 6

foreachFunction · 0.70
_fetchMethod · 0.50
TEST_FFunction · 0.50
_launchMethod · 0.50
fetchMethod · 0.50

Calls 4

fetchBypassingCacheFunction · 0.85
fetchThroughCacheFunction · 0.85
actionMethod · 0.80
valueMethod · 0.45

Tested by 3

_fetchMethod · 0.40
TEST_FFunction · 0.40