Repository: mesos Updated Branches: refs/heads/master a8414b507 -> 691b2eea8
Fixed bug in fetcher.cpp when HDFS client is not available. When trying to download an artifact with the Hadoop client, and the client is not `available()` we correctly return a false value, but then in the error message, we tried to make a call to `Try::error` which failed and crashed Master. This fixes it. Review: https://reviews.apache.org/r/37584 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/691b2eea Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/691b2eea Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/691b2eea Branch: refs/heads/master Commit: 691b2eea830bdeaa22c5600641a626952b76e329 Parents: a8414b5 Author: Marco Massenzio <[email protected]> Authored: Tue Aug 18 12:17:18 2015 -0700 Committer: Vinod Kone <[email protected]> Committed: Tue Aug 18 12:24:27 2015 -0700 ---------------------------------------------------------------------- src/launcher/fetcher.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/691b2eea/src/launcher/fetcher.cpp ---------------------------------------------------------------------- diff --git a/src/launcher/fetcher.cpp b/src/launcher/fetcher.cpp index f8b46b8..79b1d98 100644 --- a/src/launcher/fetcher.cpp +++ b/src/launcher/fetcher.cpp @@ -97,8 +97,9 @@ static Try<string> downloadWithHadoopClient( Try<bool> available = hdfs.available(); if (available.isError() || !available.get()) { - return Error("Skipping fetch with Hadoop Client as" - " Hadoop Client not available: " + available.error()); + return Error( + "Skipping fetch with Hadoop client: " + + (available.isError() ? available.error() : " client not found")); } LOG(INFO) << "Downloading resource with Hadoop client from '" << sourceUri
